@geminixiang/mikan 1.0.0-beta.2 → 1.0.0-beta.20
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/CHANGELOG.md +354 -0
- package/README.md +42 -16
- package/dist/adapter.d.ts +1 -1
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js.map +1 -1
- package/dist/adapters/discord/bot.d.ts +1 -0
- package/dist/adapters/discord/bot.d.ts.map +1 -1
- package/dist/adapters/discord/bot.js +36 -67
- package/dist/adapters/discord/bot.js.map +1 -1
- package/dist/adapters/discord/context.d.ts.map +1 -1
- package/dist/adapters/discord/context.js +17 -42
- package/dist/adapters/discord/context.js.map +1 -1
- package/dist/adapters/github/bot.d.ts +148 -0
- package/dist/adapters/github/bot.d.ts.map +1 -0
- package/dist/adapters/github/bot.js +1031 -0
- package/dist/adapters/github/bot.js.map +1 -0
- package/dist/adapters/github/client.d.ts +118 -0
- package/dist/adapters/github/client.d.ts.map +1 -0
- package/dist/adapters/github/client.js +309 -0
- package/dist/adapters/github/client.js.map +1 -0
- package/dist/adapters/github/cloudbuild.d.ts +24 -0
- package/dist/adapters/github/cloudbuild.d.ts.map +1 -0
- package/dist/adapters/github/cloudbuild.js +71 -0
- package/dist/adapters/github/cloudbuild.js.map +1 -0
- package/dist/adapters/github/context.d.ts +9 -0
- package/dist/adapters/github/context.d.ts.map +1 -0
- package/dist/adapters/github/context.js +175 -0
- package/dist/adapters/github/context.js.map +1 -0
- package/dist/adapters/github/gcp-auth.d.ts +31 -0
- package/dist/adapters/github/gcp-auth.d.ts.map +1 -0
- package/dist/adapters/github/gcp-auth.js +196 -0
- package/dist/adapters/github/gcp-auth.js.map +1 -0
- package/dist/adapters/github/ids.d.ts +34 -0
- package/dist/adapters/github/ids.d.ts.map +1 -0
- package/dist/adapters/github/ids.js +53 -0
- package/dist/adapters/github/ids.js.map +1 -0
- package/dist/adapters/github/repo.d.ts +30 -0
- package/dist/adapters/github/repo.d.ts.map +1 -0
- package/dist/adapters/github/repo.js +136 -0
- package/dist/adapters/github/repo.js.map +1 -0
- package/dist/adapters/github/tool-pack.d.ts +14 -0
- package/dist/adapters/github/tool-pack.d.ts.map +1 -0
- package/dist/adapters/github/tool-pack.js +56 -0
- package/dist/adapters/github/tool-pack.js.map +1 -0
- package/dist/adapters/github/tools/checks.d.ts +24 -0
- package/dist/adapters/github/tools/checks.d.ts.map +1 -0
- package/dist/adapters/github/tools/checks.js +116 -0
- package/dist/adapters/github/tools/checks.js.map +1 -0
- package/dist/adapters/github/tools/issue.d.ts +22 -0
- package/dist/adapters/github/tools/issue.d.ts.map +1 -0
- package/dist/adapters/github/tools/issue.js +59 -0
- package/dist/adapters/github/tools/issue.js.map +1 -0
- package/dist/adapters/github/tools/pr.d.ts +22 -0
- package/dist/adapters/github/tools/pr.d.ts.map +1 -0
- package/dist/adapters/github/tools/pr.js +59 -0
- package/dist/adapters/github/tools/pr.js.map +1 -0
- package/dist/adapters/github/tools/read.d.ts +22 -0
- package/dist/adapters/github/tools/read.d.ts.map +1 -0
- package/dist/adapters/github/tools/read.js +152 -0
- package/dist/adapters/github/tools/read.js.map +1 -0
- package/dist/adapters/github/tools/review-reply.d.ts +19 -0
- package/dist/adapters/github/tools/review-reply.d.ts.map +1 -0
- package/dist/adapters/github/tools/review-reply.js +49 -0
- package/dist/adapters/github/tools/review-reply.js.map +1 -0
- package/dist/adapters/github/tools/sync.d.ts +17 -0
- package/dist/adapters/github/tools/sync.d.ts.map +1 -0
- package/dist/adapters/github/tools/sync.js +45 -0
- package/dist/adapters/github/tools/sync.js.map +1 -0
- package/dist/adapters/github/types.d.ts +350 -0
- package/dist/adapters/github/types.d.ts.map +1 -0
- package/dist/adapters/github/types.js +2 -0
- package/dist/adapters/github/types.js.map +1 -0
- package/dist/adapters/intake.d.ts +16 -5
- package/dist/adapters/intake.d.ts.map +1 -1
- package/dist/adapters/intake.js +79 -22
- package/dist/adapters/intake.js.map +1 -1
- package/dist/adapters/slack/bot.d.ts +8 -6
- package/dist/adapters/slack/bot.d.ts.map +1 -1
- package/dist/adapters/slack/bot.js +81 -133
- package/dist/adapters/slack/bot.js.map +1 -1
- package/dist/adapters/slack/context.d.ts.map +1 -1
- package/dist/adapters/slack/context.js +3 -14
- package/dist/adapters/slack/context.js.map +1 -1
- package/dist/adapters/slack/response-lifecycle.d.ts.map +1 -1
- package/dist/adapters/slack/response-lifecycle.js +14 -17
- package/dist/adapters/slack/response-lifecycle.js.map +1 -1
- package/dist/adapters/slack/session.d.ts.map +1 -1
- package/dist/adapters/slack/session.js +5 -8
- package/dist/adapters/slack/session.js.map +1 -1
- package/dist/adapters/streaming.d.ts +4 -0
- package/dist/adapters/streaming.d.ts.map +1 -1
- package/dist/adapters/streaming.js +11 -0
- package/dist/adapters/streaming.js.map +1 -1
- package/dist/adapters/telegram/bot.d.ts +1 -2
- package/dist/adapters/telegram/bot.d.ts.map +1 -1
- package/dist/adapters/telegram/bot.js +27 -62
- package/dist/adapters/telegram/bot.js.map +1 -1
- package/dist/adapters/telegram/context.d.ts.map +1 -1
- package/dist/adapters/telegram/context.js +8 -27
- package/dist/adapters/telegram/context.js.map +1 -1
- package/dist/adapters/types.d.ts +28 -2
- package/dist/adapters/types.d.ts.map +1 -1
- package/dist/adapters/types.js.map +1 -1
- package/dist/agent.d.ts +38 -14
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +358 -224
- package/dist/agent.js.map +1 -1
- package/dist/cli/download.d.ts.map +1 -0
- package/dist/cli/download.js.map +1 -0
- package/dist/cli/ext-git.d.ts +22 -0
- package/dist/cli/ext-git.d.ts.map +1 -0
- package/dist/cli/ext-git.js +76 -0
- package/dist/cli/ext-git.js.map +1 -0
- package/dist/cli/ext.d.ts +2 -0
- package/dist/cli/ext.d.ts.map +1 -0
- package/dist/cli/ext.js +217 -0
- package/dist/cli/ext.js.map +1 -0
- package/dist/commands/admin.d.ts.map +1 -1
- package/dist/commands/admin.js +2 -1
- package/dist/commands/admin.js.map +1 -1
- package/dist/commands/auto-reply.d.ts.map +1 -1
- package/dist/commands/auto-reply.js +2 -6
- package/dist/commands/auto-reply.js.map +1 -1
- package/dist/commands/extensions.d.ts.map +1 -1
- package/dist/commands/extensions.js +16 -6
- package/dist/commands/extensions.js.map +1 -1
- package/dist/commands/login.d.ts +2 -1
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +30 -1
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/manifest.d.ts +72 -0
- package/dist/commands/manifest.d.ts.map +1 -0
- package/dist/commands/manifest.js +121 -0
- package/dist/commands/manifest.js.map +1 -0
- package/dist/commands/model.d.ts.map +1 -1
- package/dist/commands/model.js +3 -1
- package/dist/commands/model.js.map +1 -1
- package/dist/commands/new.d.ts.map +1 -1
- package/dist/commands/new.js +2 -1
- package/dist/commands/new.js.map +1 -1
- package/dist/commands/sandbox.d.ts.map +1 -1
- package/dist/commands/sandbox.js +16 -12
- package/dist/commands/sandbox.js.map +1 -1
- package/dist/commands/text.d.ts +2 -0
- package/dist/commands/text.d.ts.map +1 -0
- package/dist/commands/text.js +16 -0
- package/dist/commands/text.js.map +1 -0
- package/dist/commands/types.d.ts +14 -1
- package/dist/commands/types.d.ts.map +1 -1
- package/dist/commands/types.js.map +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +90 -54
- package/dist/config.js.map +1 -1
- package/dist/events.d.ts +10 -0
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +14 -5
- package/dist/events.js.map +1 -1
- package/dist/execution-resolver.d.ts +3 -2
- package/dist/execution-resolver.d.ts.map +1 -1
- package/dist/execution-resolver.js +28 -12
- package/dist/execution-resolver.js.map +1 -1
- package/dist/harness/extensions/loader.d.ts +39 -9
- package/dist/harness/extensions/loader.d.ts.map +1 -1
- package/dist/harness/extensions/loader.js +258 -54
- package/dist/harness/extensions/loader.js.map +1 -1
- package/dist/harness/extensions/registry.d.ts +48 -1
- package/dist/harness/extensions/registry.d.ts.map +1 -1
- package/dist/harness/extensions/registry.js +146 -0
- package/dist/harness/extensions/registry.js.map +1 -1
- package/dist/harness/extensions/types.d.ts +161 -14
- package/dist/harness/extensions/types.d.ts.map +1 -1
- package/dist/harness/extensions/types.js.map +1 -1
- package/dist/harness/index.d.ts +5 -5
- package/dist/harness/index.d.ts.map +1 -1
- package/dist/harness/index.js +2 -2
- package/dist/harness/index.js.map +1 -1
- package/dist/harness/models.d.ts +5 -0
- package/dist/harness/models.d.ts.map +1 -1
- package/dist/harness/models.js +10 -0
- package/dist/harness/models.js.map +1 -1
- package/dist/harness/runner.d.ts +21 -2
- package/dist/harness/runner.d.ts.map +1 -1
- package/dist/harness/runner.js +80 -22
- package/dist/harness/runner.js.map +1 -1
- package/dist/harness/session-store.d.ts +4 -1
- package/dist/harness/session-store.d.ts.map +1 -1
- package/dist/harness/session-store.js +11 -2
- package/dist/harness/session-store.js.map +1 -1
- package/dist/harness/subagent-runner.d.ts +17 -0
- package/dist/harness/subagent-runner.d.ts.map +1 -0
- package/dist/harness/subagent-runner.js +307 -0
- package/dist/harness/subagent-runner.js.map +1 -0
- package/dist/harness/types.d.ts +53 -0
- package/dist/harness/types.d.ts.map +1 -1
- package/dist/harness/types.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.js +232 -29
- package/dist/main.js.map +1 -1
- package/dist/provisioner.d.ts.map +1 -1
- package/dist/provisioner.js +2 -5
- package/dist/provisioner.js.map +1 -1
- package/dist/runtime/conversation-runtime.d.ts +1 -1
- package/dist/runtime/conversation-runtime.d.ts.map +1 -1
- package/dist/runtime/conversation-runtime.js +264 -41
- package/dist/runtime/conversation-runtime.js.map +1 -1
- package/dist/runtime/types.d.ts +32 -5
- package/dist/runtime/types.d.ts.map +1 -1
- package/dist/runtime/types.js.map +1 -1
- package/dist/sandbox/cloudflare.d.ts +2 -0
- package/dist/sandbox/cloudflare.d.ts.map +1 -1
- package/dist/sandbox/cloudflare.js +7 -0
- package/dist/sandbox/cloudflare.js.map +1 -1
- package/dist/sandbox/container.d.ts +3 -0
- package/dist/sandbox/container.d.ts.map +1 -1
- package/dist/sandbox/container.js +8 -2
- package/dist/sandbox/container.js.map +1 -1
- package/dist/sandbox/firecracker.d.ts +2 -0
- package/dist/sandbox/firecracker.d.ts.map +1 -1
- package/dist/sandbox/firecracker.js +7 -1
- package/dist/sandbox/firecracker.js.map +1 -1
- package/dist/sandbox/gondolin-fleet.d.ts +104 -0
- package/dist/sandbox/gondolin-fleet.d.ts.map +1 -0
- package/dist/sandbox/gondolin-fleet.js +330 -0
- package/dist/sandbox/gondolin-fleet.js.map +1 -0
- package/dist/sandbox/gondolin-gateway.d.ts +85 -0
- package/dist/sandbox/gondolin-gateway.d.ts.map +1 -0
- package/dist/sandbox/gondolin-gateway.js +400 -0
- package/dist/sandbox/gondolin-gateway.js.map +1 -0
- package/dist/sandbox/gondolin-inventory.d.ts +89 -0
- package/dist/sandbox/gondolin-inventory.d.ts.map +1 -0
- package/dist/sandbox/gondolin-inventory.js +267 -0
- package/dist/sandbox/gondolin-inventory.js.map +1 -0
- package/dist/sandbox/gondolin-join.d.ts +62 -0
- package/dist/sandbox/gondolin-join.d.ts.map +1 -0
- package/dist/sandbox/gondolin-join.js +261 -0
- package/dist/sandbox/gondolin-join.js.map +1 -0
- package/dist/sandbox/gondolin-nfs-advisory.d.ts +15 -0
- package/dist/sandbox/gondolin-nfs-advisory.d.ts.map +1 -0
- package/dist/sandbox/gondolin-nfs-advisory.js +60 -0
- package/dist/sandbox/gondolin-nfs-advisory.js.map +1 -0
- package/dist/sandbox/gondolin-placement.d.ts +32 -0
- package/dist/sandbox/gondolin-placement.d.ts.map +1 -0
- package/dist/sandbox/gondolin-placement.js +83 -0
- package/dist/sandbox/gondolin-placement.js.map +1 -0
- package/dist/sandbox/gondolin-remote.d.ts +73 -0
- package/dist/sandbox/gondolin-remote.d.ts.map +1 -0
- package/dist/sandbox/gondolin-remote.js +352 -0
- package/dist/sandbox/gondolin-remote.js.map +1 -0
- package/dist/sandbox/gondolin-worker-client.d.ts +139 -0
- package/dist/sandbox/gondolin-worker-client.d.ts.map +1 -0
- package/dist/sandbox/gondolin-worker-client.js +325 -0
- package/dist/sandbox/gondolin-worker-client.js.map +1 -0
- package/dist/sandbox/gondolin-worker-main.d.ts +2 -0
- package/dist/sandbox/gondolin-worker-main.d.ts.map +1 -0
- package/dist/sandbox/gondolin-worker-main.js +22 -0
- package/dist/sandbox/gondolin-worker-main.js.map +1 -0
- package/dist/sandbox/gondolin-worker.d.ts +55 -0
- package/dist/sandbox/gondolin-worker.d.ts.map +1 -0
- package/dist/sandbox/gondolin-worker.js +201 -0
- package/dist/sandbox/gondolin-worker.js.map +1 -0
- package/dist/sandbox/gondolin.d.ts +52 -0
- package/dist/sandbox/gondolin.d.ts.map +1 -0
- package/dist/sandbox/gondolin.js +425 -0
- package/dist/sandbox/gondolin.js.map +1 -0
- package/dist/sandbox/host.d.ts +2 -0
- package/dist/sandbox/host.d.ts.map +1 -1
- package/dist/sandbox/host.js +11 -0
- package/dist/sandbox/host.js.map +1 -1
- package/dist/sandbox/identity.d.ts +21 -0
- package/dist/sandbox/identity.d.ts.map +1 -0
- package/dist/sandbox/identity.js +36 -0
- package/dist/sandbox/identity.js.map +1 -0
- package/dist/sandbox/index.d.ts +4 -3
- package/dist/sandbox/index.d.ts.map +1 -1
- package/dist/sandbox/index.js +5 -3
- package/dist/sandbox/index.js.map +1 -1
- package/dist/sandbox/types.d.ts +26 -1
- package/dist/sandbox/types.d.ts.map +1 -1
- package/dist/sandbox/types.js.map +1 -1
- package/dist/sandbox/utils.d.ts +11 -0
- package/dist/sandbox/utils.d.ts.map +1 -1
- package/dist/sandbox/utils.js +35 -0
- package/dist/sandbox/utils.js.map +1 -1
- package/dist/sessions/agent-memory-file-manager.d.ts.map +1 -1
- package/dist/sessions/agent-memory-file-manager.js +16 -30
- package/dist/sessions/agent-memory-file-manager.js.map +1 -1
- package/dist/sessions/history-line.d.ts +20 -0
- package/dist/sessions/history-line.d.ts.map +1 -0
- package/dist/sessions/history-line.js +24 -0
- package/dist/sessions/history-line.js.map +1 -0
- package/dist/sessions/policy.d.ts.map +1 -1
- package/dist/sessions/policy.js +5 -3
- package/dist/sessions/policy.js.map +1 -1
- package/dist/sessions/session-key.d.ts +31 -0
- package/dist/sessions/session-key.d.ts.map +1 -0
- package/dist/sessions/session-key.js +44 -0
- package/dist/sessions/session-key.js.map +1 -0
- package/dist/sessions/store.d.ts.map +1 -1
- package/dist/sessions/store.js +2 -2
- package/dist/sessions/store.js.map +1 -1
- package/dist/tools/bash.d.ts +3 -1
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/bash.js +24 -17
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/edit.d.ts.map +1 -1
- package/dist/tools/edit.js +9 -12
- package/dist/tools/edit.js.map +1 -1
- package/dist/tools/event.d.ts +1 -1
- package/dist/tools/event.d.ts.map +1 -1
- package/dist/tools/event.js +33 -4
- package/dist/tools/event.js.map +1 -1
- package/dist/tools/generate-image.d.ts +17 -0
- package/dist/tools/generate-image.d.ts.map +1 -0
- package/dist/tools/generate-image.js +63 -0
- package/dist/tools/generate-image.js.map +1 -0
- package/dist/tools/index.d.ts +16 -2
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +27 -3
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/react.d.ts +15 -0
- package/dist/tools/react.d.ts.map +1 -0
- package/dist/tools/react.js +40 -0
- package/dist/tools/react.js.map +1 -0
- package/dist/tools/sandbox.d.ts +2 -2
- package/dist/tools/sandbox.d.ts.map +1 -1
- package/dist/tools/sandbox.js +8 -7
- package/dist/tools/sandbox.js.map +1 -1
- package/dist/tools/subagent.d.ts +69 -0
- package/dist/tools/subagent.d.ts.map +1 -0
- package/dist/tools/subagent.js +286 -0
- package/dist/tools/subagent.js.map +1 -0
- package/dist/tools/types.d.ts +34 -1
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/types.js.map +1 -1
- package/dist/tools/write.d.ts.map +1 -1
- package/dist/tools/write.js +1 -8
- package/dist/tools/write.js.map +1 -1
- package/dist/trigger.d.ts.map +1 -1
- package/dist/trigger.js +1 -2
- package/dist/trigger.js.map +1 -1
- package/dist/types.d.ts +139 -7
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/vault/disabled.d.ts +9 -0
- package/dist/vault/disabled.d.ts.map +1 -0
- package/dist/vault/disabled.js +23 -0
- package/dist/vault/disabled.js.map +1 -0
- package/dist/vault/index.d.ts.map +1 -1
- package/dist/vault/index.js +3 -24
- package/dist/vault/index.js.map +1 -1
- package/dist/vault/policy.d.ts +20 -0
- package/dist/vault/policy.d.ts.map +1 -0
- package/dist/vault/policy.js +20 -0
- package/dist/vault/policy.js.map +1 -0
- package/dist/vault/routing.d.ts +1 -0
- package/dist/vault/routing.d.ts.map +1 -1
- package/dist/vault/routing.js +3 -10
- package/dist/vault/routing.js.map +1 -1
- package/dist/web/admin/portal.d.ts +27 -0
- package/dist/web/admin/portal.d.ts.map +1 -1
- package/dist/web/admin/portal.js +91 -130
- package/dist/web/admin/portal.js.map +1 -1
- package/dist/web/admin/types.d.ts +3 -0
- package/dist/web/admin/types.d.ts.map +1 -1
- package/dist/web/admin/types.js.map +1 -1
- package/dist/web/login/oauth.d.ts +2 -3
- package/dist/web/login/oauth.d.ts.map +1 -1
- package/dist/web/login/oauth.js +0 -31
- package/dist/web/login/oauth.js.map +1 -1
- package/dist/web/login/portal.js +1 -1
- package/dist/web/login/portal.js.map +1 -1
- package/dist/web/login/types.d.ts +0 -11
- package/dist/web/login/types.d.ts.map +1 -1
- package/dist/web/login/types.js.map +1 -1
- package/dist/web/portal-shell.d.ts +4 -0
- package/dist/web/portal-shell.d.ts.map +1 -0
- package/dist/{portal-shell.js → web/portal-shell.js} +2 -2
- package/dist/web/portal-shell.js.map +1 -0
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/server.js +7 -0
- package/dist/web/server.js.map +1 -1
- package/dist/web/session-view/command.d.ts.map +1 -1
- package/dist/web/session-view/command.js +4 -1
- package/dist/web/session-view/command.js.map +1 -1
- package/dist/web/session-view/portal.d.ts.map +1 -1
- package/dist/web/session-view/portal.js +4 -3
- package/dist/web/session-view/portal.js.map +1 -1
- package/dist/web/session-view/service.d.ts.map +1 -1
- package/dist/web/session-view/service.js +2 -1
- package/dist/web/session-view/service.js.map +1 -1
- package/dist/web/session-view/types.d.ts +2 -1
- package/dist/web/session-view/types.d.ts.map +1 -1
- package/dist/web/session-view/types.js.map +1 -1
- package/package.json +7 -4
- package/dist/download.d.ts.map +0 -1
- package/dist/download.js.map +0 -1
- package/dist/model-registry.d.ts +0 -4
- package/dist/model-registry.d.ts.map +0 -1
- package/dist/model-registry.js +0 -7
- package/dist/model-registry.js.map +0 -1
- package/dist/portal-shell.d.ts +0 -4
- package/dist/portal-shell.d.ts.map +0 -1
- package/dist/portal-shell.js.map +0 -1
- package/dist/runtime/agent-run-controller.d.ts +0 -31
- package/dist/runtime/agent-run-controller.d.ts.map +0 -1
- package/dist/runtime/agent-run-controller.js +0 -195
- package/dist/runtime/agent-run-controller.js.map +0 -1
- /package/dist/{download.d.ts → cli/download.d.ts} +0 -0
- /package/dist/{download.js → cli/download.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,360 @@ any release.
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [1.0.0-beta.20]
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- Validate subagent `outputSchema` correctly when it arrives as plain JSON Schema (the only form tool calls can carry), instead of throwing `ValueCheckUnknownTypeError` because it lacks TypeBox's `Kind` metadata.
|
|
17
|
+
|
|
18
|
+
### Tests
|
|
19
|
+
|
|
20
|
+
- Add coverage for plain JSON Schema hydration, nested objects, arrays, unions, and validation failures.
|
|
21
|
+
|
|
22
|
+
## [1.0.0-beta.19]
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- Add fresh in-memory subagents for the main agent and extensions, with explicit tools, budgets, structured output, parallel batches, and bounded DAG orchestration.
|
|
27
|
+
- Stream debounced subagent node progress through the shared Slack, Discord, and Telegram response lifecycle.
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- Let final responses at the LLM-call cap complete without tripping the run budget when no continuation is required.
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
|
|
35
|
+
- Install worker binaries from the newest GitHub release that contains a matching asset, including prereleases.
|
|
36
|
+
- Restore generic Google Workspace CLI credential mounts in sandbox vaults.
|
|
37
|
+
|
|
38
|
+
### Tests
|
|
39
|
+
|
|
40
|
+
- Add coverage for subagent isolation, recursion guards, budgets, structured output, parallel execution, DAG validation and dependency flow, and platform-neutral progress rendering.
|
|
41
|
+
|
|
42
|
+
## [1.0.0-beta.18]
|
|
43
|
+
|
|
44
|
+
### Added
|
|
45
|
+
|
|
46
|
+
- Add an idempotent Debian and Ubuntu worker-host initialization script.
|
|
47
|
+
- Add persistent `mikan-worker` installation as a delegated systemd service.
|
|
48
|
+
- Add NFS export detection with OS-specific setup guidance for `gondolin:remote` workspaces.
|
|
49
|
+
- Ship host-side vault credential files securely to remote workers without placing them in the shared workspace.
|
|
50
|
+
- Add bounded shared-workspace health probes and worker degradation reporting.
|
|
51
|
+
|
|
52
|
+
### Changed
|
|
53
|
+
|
|
54
|
+
- Require each Gondolin remote gateway and static worker to declare its shared `workspaceRoot`.
|
|
55
|
+
- Exclude workers with unhealthy shared workspaces from new placements and restore them after a healthy heartbeat.
|
|
56
|
+
|
|
57
|
+
### Fixed
|
|
58
|
+
|
|
59
|
+
- Fail remote execution with actionable diagnostics instead of hanging on dead shared-workspace mounts.
|
|
60
|
+
- Create runtime cgroups beneath the worker's delegated cgroup and report missing `Delegate=yes` configuration.
|
|
61
|
+
- Verify downloaded worker binaries against the matching release checksum filename.
|
|
62
|
+
- Validate `gondolin:remote` only after gateway and worker transports are configured.
|
|
63
|
+
|
|
64
|
+
### Security
|
|
65
|
+
|
|
66
|
+
- Materialize remote credential files as owner-only, read-only runtime files outside shared workspaces.
|
|
67
|
+
|
|
68
|
+
### Tests
|
|
69
|
+
|
|
70
|
+
- Add coverage for worker host services, cgroup delegation, workspace health, credential delivery, NFS advice, remote validation, and idle execution deadlines.
|
|
71
|
+
|
|
72
|
+
## [1.0.0-beta.17]
|
|
73
|
+
|
|
74
|
+
### Added
|
|
75
|
+
|
|
76
|
+
- Add `gondolin:remote` for scheduling sandbox runtimes across a fleet of Linux/KVM workers.
|
|
77
|
+
- Add a standalone `mikan-worker` daemon with mutual TLS, fenced leases, crash recovery, capacity-aware placement, draining, and sticky conversation assignment.
|
|
78
|
+
- Add dial-home worker enrollment through one-time join tokens and a mikan-hosted gateway.
|
|
79
|
+
- Add private workspace projection, vault injection, resource limits, lifecycle reconciliation, and drift recovery to Gondolin runtimes.
|
|
80
|
+
- Add worker installation, enrollment, operations, and remote quickstart documentation with a one-command end-to-end smoke test.
|
|
81
|
+
- Publish `mikan-worker` binaries and checksums with GitHub releases.
|
|
82
|
+
|
|
83
|
+
### Changed
|
|
84
|
+
|
|
85
|
+
- Rename the preview sandbox mode from `microvm:default` to `gondolin:default` and the image build command to `npm run gondolin:image:build`.
|
|
86
|
+
|
|
87
|
+
### Fixed
|
|
88
|
+
|
|
89
|
+
- Project mounted files correctly into Gondolin guests.
|
|
90
|
+
- Refresh rotated credentials when Gondolin runtimes are recreated.
|
|
91
|
+
|
|
92
|
+
### Security
|
|
93
|
+
|
|
94
|
+
- Authenticate remote workers with mutual TLS and fence stale workers through expiring leases.
|
|
95
|
+
- Keep enrollment tokens one-time and store worker credentials privately.
|
|
96
|
+
|
|
97
|
+
### Tests
|
|
98
|
+
|
|
99
|
+
- Add coverage for Gondolin lifecycle, workspace isolation, vaults, resource controls, fleet scheduling, gateways, enrollment, workers, leases, and remote execution.
|
|
100
|
+
|
|
101
|
+
## [1.0.0-beta.16]
|
|
102
|
+
|
|
103
|
+
### Added
|
|
104
|
+
|
|
105
|
+
- Add a preview `gondolin:default` sandbox backed by Gondolin and QEMU.
|
|
106
|
+
- Add a curated microVM guest image build with Node.js, Python, uv, Git, ripgrep, fd, jq, SSH, and build tools.
|
|
107
|
+
- Manage one process-local microVM per conversation with idle shutdown and recreation on demand.
|
|
108
|
+
|
|
109
|
+
### Changed
|
|
110
|
+
|
|
111
|
+
- Broaden the coverage gate across all source modules.
|
|
112
|
+
|
|
113
|
+
### Fixed
|
|
114
|
+
|
|
115
|
+
- Keep top-level Slack file uploads out of threads.
|
|
116
|
+
|
|
117
|
+
### Tests
|
|
118
|
+
|
|
119
|
+
- Add coverage for microVM execution and lifecycle, events, logging, disabled vaults, channel storage, and core file and shell tools.
|
|
120
|
+
|
|
121
|
+
## [1.0.0-beta.15]
|
|
122
|
+
|
|
123
|
+
### Added
|
|
124
|
+
|
|
125
|
+
- Add native image generation with automatic upload through the active model provider.
|
|
126
|
+
- Add extension chat commands via `api.registerCommand`: deterministic `/name` dispatch with no model call; built-ins and first registrations win.
|
|
127
|
+
- Add an extension disposal lifecycle (`api.onDispose` or an `activate` return value), run when a harness instance is discarded (`/pi-new`, idle eviction, session rotation).
|
|
128
|
+
- Add `api.triggerRun(text)` to fire an immediate autonomous agent run, `api.uploadFile(path, title)` for proactive file uploads, and an explicit `conversationId` option on `api.notify` for cross-conversation posting.
|
|
129
|
+
- Add `agent_error` and `budget_exceeded` extension hooks so monitoring extensions see failed turns and tripped run budgets.
|
|
130
|
+
- Pass a `RunOrigin` (platform, triggering message id, user identity, attachments) to extension hook events, making `api.react` and per-user extension policy usable.
|
|
131
|
+
- Let `before_agent_start` extensions rewrite the user prompt or block the turn before the model runs; blocked turns leave no trace in the transcript or session store.
|
|
132
|
+
- Let `tool_result` extensions rewrite tool output (content and error flag) before the model and the session store see it, enabling secret redaction and output truncation.
|
|
133
|
+
|
|
134
|
+
### Changed
|
|
135
|
+
|
|
136
|
+
- Dispatch `before_agent_start` and `tool_result` hooks with chaining semantics (each handler sees earlier handlers' rewrites; any `block` wins) instead of first-result-wins.
|
|
137
|
+
|
|
138
|
+
### Fixed
|
|
139
|
+
|
|
140
|
+
- Dispose cached runners when models switch or environment credentials refresh.
|
|
141
|
+
|
|
142
|
+
### Tests
|
|
143
|
+
|
|
144
|
+
- Add coverage for image generation, extension lifecycle and hook rewrites, and runner disposal.
|
|
145
|
+
|
|
146
|
+
## [1.0.0-beta.14]
|
|
147
|
+
|
|
148
|
+
### Added
|
|
149
|
+
|
|
150
|
+
- Add GitHub inline review-thread intake and a `github_review_reply` tool.
|
|
151
|
+
- Add `github_sync`, `github_read`, and `github_issue` tools for repository refresh and issue or pull request operations.
|
|
152
|
+
- Add host-side Cloud Build log retrieval using GCP ADC or Workload Identity Federation.
|
|
153
|
+
- Add a minimal embedder example that runs without portal services.
|
|
154
|
+
|
|
155
|
+
### Changed
|
|
156
|
+
|
|
157
|
+
- Update eligible GitHub pull request head branches in place instead of opening duplicate pull requests.
|
|
158
|
+
- Drive platform command registration and routing from a shared command manifest.
|
|
159
|
+
- Use one cross-platform stop grammar, including `/stop` in GitHub conversations.
|
|
160
|
+
- Route sandbox file reads and writes through executors with staged, shell-safe transport.
|
|
161
|
+
- Keep sandbox settings nested through configuration resolution and updates.
|
|
162
|
+
|
|
163
|
+
### Fixed
|
|
164
|
+
|
|
165
|
+
- Preserve raw session keys when using Slack's Force Stop button.
|
|
166
|
+
- Spill large bash output into the runtime workspace so sandboxed agents can read it.
|
|
167
|
+
- Keep malformed event files visible in the admin portal for deletion.
|
|
168
|
+
- Unify platform formatting guidance across adapter and conversation contexts.
|
|
169
|
+
|
|
170
|
+
### Security
|
|
171
|
+
|
|
172
|
+
- Keep Cloud Build credentials host-side and outside agent sandboxes.
|
|
173
|
+
- Centralize runtime identity and sandbox path sanitization.
|
|
174
|
+
|
|
175
|
+
### Tests
|
|
176
|
+
|
|
177
|
+
- Add coverage for GitHub tool operations, review threads, Cloud Build logs, executor file transport, command manifests, runtime embedding, and session serialization.
|
|
178
|
+
|
|
179
|
+
## [1.0.0-beta.13]
|
|
180
|
+
|
|
181
|
+
### Added
|
|
182
|
+
|
|
183
|
+
- Add the `max` thinking level to commands, configuration, and the admin portal.
|
|
184
|
+
- Add quickstart and extension development guides across all supported locales.
|
|
185
|
+
|
|
186
|
+
### Changed
|
|
187
|
+
|
|
188
|
+
- Update pi agent dependencies to 0.80.6.
|
|
189
|
+
- Load platform-specific tool packs only for their configured adapters.
|
|
190
|
+
- Improve `github_checks` output and guidance for external CI providers.
|
|
191
|
+
- Synchronize configuration, platform, sandbox, session, skill, event, portal, and deployment documentation across locales.
|
|
192
|
+
|
|
193
|
+
### Fixed
|
|
194
|
+
|
|
195
|
+
- Fix broken CLI tables and dead documentation links across locales.
|
|
196
|
+
|
|
197
|
+
### Security
|
|
198
|
+
|
|
199
|
+
- Derive ambient shared-vault access from each platform's declared trust model and sandbox topology.
|
|
200
|
+
|
|
201
|
+
### Tests
|
|
202
|
+
|
|
203
|
+
- Add coverage for platform tool-pack isolation, external CI checks, and vault trust policy.
|
|
204
|
+
|
|
205
|
+
## [1.0.0-beta.12]
|
|
206
|
+
|
|
207
|
+
### Added
|
|
208
|
+
|
|
209
|
+
- Let `github_checks` fetch the log tail for a failing GitHub Actions job by job ID.
|
|
210
|
+
|
|
211
|
+
### Changed
|
|
212
|
+
|
|
213
|
+
- Require GitHub App Actions read permission for job log inspection.
|
|
214
|
+
|
|
215
|
+
### Fixed
|
|
216
|
+
|
|
217
|
+
- Treat skipped and neutral GitHub checks separately from failures in check summaries.
|
|
218
|
+
|
|
219
|
+
### Tests
|
|
220
|
+
|
|
221
|
+
- Add coverage for job log retrieval and check conclusion classification.
|
|
222
|
+
- Use collision-resistant temporary directories across parallel tests.
|
|
223
|
+
|
|
224
|
+
## [1.0.0-beta.11]
|
|
225
|
+
|
|
226
|
+
### Added
|
|
227
|
+
|
|
228
|
+
- Add a read-only `github_checks` tool for inspecting branch and pull request check runs.
|
|
229
|
+
|
|
230
|
+
### Changed
|
|
231
|
+
|
|
232
|
+
- Make `github_pr` idempotent so pushing an existing branch updates its open pull request.
|
|
233
|
+
- Teach the GitHub agent workflow to inspect CI, fix failures, and push updates.
|
|
234
|
+
- Require GitHub App Checks read permission for CI inspection.
|
|
235
|
+
|
|
236
|
+
### Tests
|
|
237
|
+
|
|
238
|
+
- Add coverage for GitHub check summaries and existing pull request updates.
|
|
239
|
+
|
|
240
|
+
## [1.0.0-beta.10]
|
|
241
|
+
|
|
242
|
+
### Fixed
|
|
243
|
+
|
|
244
|
+
- Retry cloning a GitHub repository on later triggers when the conversation clone is missing.
|
|
245
|
+
|
|
246
|
+
### Security
|
|
247
|
+
|
|
248
|
+
- Stop applying the ambient default shared vault to GitHub conversations while preserving explicit conversation vault grants.
|
|
249
|
+
- Document the platform, shared machine, and personal credential trust boundaries.
|
|
250
|
+
|
|
251
|
+
### Tests
|
|
252
|
+
|
|
253
|
+
- Add coverage for GitHub clone retries and platform-gated default vault resolution.
|
|
254
|
+
|
|
255
|
+
## [1.0.0-beta.9]
|
|
256
|
+
|
|
257
|
+
### Added
|
|
258
|
+
|
|
259
|
+
- Clone GitHub repositories into conversation workspaces and check out pull request heads.
|
|
260
|
+
- Add a `github_pr` tool that pushes agent changes from `pi/*` branches and opens pull requests.
|
|
261
|
+
|
|
262
|
+
### Changed
|
|
263
|
+
|
|
264
|
+
- Require GitHub App Contents read and write permission for repository automation.
|
|
265
|
+
- Post completed GitHub responses as single comments instead of streaming edits.
|
|
266
|
+
|
|
267
|
+
### Fixed
|
|
268
|
+
|
|
269
|
+
- Keep GitHub issue context inside the history recency window.
|
|
270
|
+
|
|
271
|
+
### Security
|
|
272
|
+
|
|
273
|
+
- Require commenters to have repository write permission or higher before triggering the agent.
|
|
274
|
+
- Keep installation tokens out of sandboxes and restrict agent pushes to non-force `pi/*` branches.
|
|
275
|
+
|
|
276
|
+
### Tests
|
|
277
|
+
|
|
278
|
+
- Add coverage for GitHub repository checkout, permission gating, pull request creation, and branch restrictions.
|
|
279
|
+
|
|
280
|
+
## [1.0.0-beta.8]
|
|
281
|
+
|
|
282
|
+
### Added
|
|
283
|
+
|
|
284
|
+
- Add a GitHub messaging adapter where each issue or pull request is an independent conversation.
|
|
285
|
+
- Add GitHub App authentication, mention and participation triggers, persisted polling cursors, and downtime replay.
|
|
286
|
+
- Add GitHub adapter deployment configuration and documentation.
|
|
287
|
+
|
|
288
|
+
### Tests
|
|
289
|
+
|
|
290
|
+
- Add coverage for GitHub polling, authentication, conversation context, triggers, and responses.
|
|
291
|
+
|
|
292
|
+
## [1.0.0-beta.7]
|
|
293
|
+
|
|
294
|
+
### Added
|
|
295
|
+
|
|
296
|
+
- Add TypeScript and npm-package extensions with `package.json` entrypoints and runtime dependencies.
|
|
297
|
+
- Add `mikan ext install`, `validate`, `list`, and `remove` commands.
|
|
298
|
+
- Add extension installation from Git sources and repository subpaths.
|
|
299
|
+
|
|
300
|
+
### Changed
|
|
301
|
+
|
|
302
|
+
- Treat reinstalling an extension as an update while preserving its data directory.
|
|
303
|
+
- Use `package.json` as the primary extension metadata source with `manifest.json` as a fallback.
|
|
304
|
+
- Convert the agent project manager example to TypeScript with a typed extension API.
|
|
305
|
+
- Add the Slack `reactions:write` scope and missing slash commands to the manifests and setup guides.
|
|
306
|
+
|
|
307
|
+
### Tests
|
|
308
|
+
|
|
309
|
+
- Add coverage for TypeScript loading, package metadata, extension CLI operations, and Git installation.
|
|
310
|
+
|
|
311
|
+
## [1.0.0-beta.6]
|
|
312
|
+
|
|
313
|
+
### Added
|
|
314
|
+
|
|
315
|
+
- Add emoji reactions for agents and extensions across Slack, Discord, and Telegram.
|
|
316
|
+
|
|
317
|
+
### Changed
|
|
318
|
+
|
|
319
|
+
- Default the agent project manager example to conversation-scoped extension data.
|
|
320
|
+
- Log when extensions rewrite the system prompt and report the resulting size change.
|
|
321
|
+
|
|
322
|
+
### Fixed
|
|
323
|
+
|
|
324
|
+
- Render Slack session links outside the triggered-by italic span.
|
|
325
|
+
|
|
326
|
+
### Tests
|
|
327
|
+
|
|
328
|
+
- Add coverage for the reaction tool and extension reaction API.
|
|
329
|
+
|
|
330
|
+
## [1.0.0-beta.5]
|
|
331
|
+
|
|
332
|
+
### Added
|
|
333
|
+
|
|
334
|
+
- Add `api.paths.sharedDataDir` for extension state intentionally shared across conversations.
|
|
335
|
+
- Add an idempotent, dry-run-first script for migrating extension code and data to the new layout.
|
|
336
|
+
|
|
337
|
+
### Changed
|
|
338
|
+
|
|
339
|
+
- Store conversation extension code and data under `conversations/<id>/` and global extension assets under `global/`.
|
|
340
|
+
- Make `api.paths.dataDir` conversation-scoped by default to prevent accidental cross-conversation state sharing.
|
|
341
|
+
|
|
342
|
+
### Tests
|
|
343
|
+
|
|
344
|
+
- Update extension loader and command coverage for the conversation-scoped layout.
|
|
345
|
+
|
|
346
|
+
## [1.0.0-beta.4]
|
|
347
|
+
|
|
348
|
+
### Changed
|
|
349
|
+
|
|
350
|
+
- Show an extension's slug in `/pi-extensions` when it differs from the manifest display name.
|
|
351
|
+
|
|
352
|
+
### Fixed
|
|
353
|
+
|
|
354
|
+
- Reject extensions installed directly at a scope root and show an actionable warning to use a named subdirectory.
|
|
355
|
+
|
|
356
|
+
### Tests
|
|
357
|
+
|
|
358
|
+
- Add coverage for scope-root extension mis-install detection and inventory warnings.
|
|
359
|
+
|
|
360
|
+
## [1.0.0-beta.3]
|
|
361
|
+
|
|
362
|
+
### Fixed
|
|
363
|
+
|
|
364
|
+
- Route `/pi-extensions` through Slack and include it in the bundled app manifests.
|
|
365
|
+
|
|
12
366
|
## [1.0.0-beta.2]
|
|
13
367
|
|
|
14
368
|
### Added
|
package/README.md
CHANGED
|
@@ -51,19 +51,45 @@ npm install && npm run build
|
|
|
51
51
|
|
|
52
52
|
## Quick Start
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
Run mikan under [PM2](https://pm2.keymetrics.io/) so it stays up, restarts after failures, and starts on boot:
|
|
55
55
|
|
|
56
56
|
```bash
|
|
57
|
-
|
|
57
|
+
npm i -g @geminixiang/mikan pm2
|
|
58
|
+
|
|
59
|
+
# One-time setup: create the state directory and settings
|
|
60
|
+
mikan --onboard --state-dir=~/.mikan
|
|
61
|
+
|
|
62
|
+
# Grab the maintained ecosystem file, then edit `args` and `env`
|
|
63
|
+
curl -O https://raw.githubusercontent.com/geminixiang/mikan/main/deploy/pm2/ecosystem.config.cjs
|
|
64
|
+
|
|
65
|
+
pm2 start ecosystem.config.cjs
|
|
66
|
+
pm2 save
|
|
67
|
+
pm2 startup # run the printed command to enable boot autostart
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
In `ecosystem.config.cjs`, point `args` at your state dir, sandbox mode, and working directory:
|
|
71
|
+
|
|
72
|
+
```js
|
|
73
|
+
args: "--state-dir=/srv/mikan/state --sandbox=host /srv/mikan/workspace",
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Then set the platform tokens you need in `env`; you can run multiple platforms at once:
|
|
77
|
+
|
|
78
|
+
```js
|
|
79
|
+
env: {
|
|
80
|
+
SLACK_APP_TOKEN: "xapp-...",
|
|
81
|
+
SLACK_BOT_TOKEN: "xoxb-...",
|
|
82
|
+
TELEGRAM_BOT_TOKEN: "123456:ABC-...",
|
|
83
|
+
DISCORD_BOT_TOKEN: "MTI...",
|
|
84
|
+
},
|
|
58
85
|
```
|
|
59
86
|
|
|
60
|
-
|
|
87
|
+
Tail logs with `pm2 logs mikan`; upgrade with `npm i -g @geminixiang/mikan && pm2 reload mikan`. See [the deployment guide](src/content/docs/deployment.mdx) for sandbox images, graceful shutdown, and the health endpoint.
|
|
88
|
+
|
|
89
|
+
For a one-off foreground run, the same CLI works directly:
|
|
61
90
|
|
|
62
91
|
```bash
|
|
63
|
-
|
|
64
|
-
export SLACK_BOT_TOKEN=xoxb-...
|
|
65
|
-
export TELEGRAM_BOT_TOKEN=123456:ABC-...
|
|
66
|
-
export DISCORD_BOT_TOKEN=MTI...
|
|
92
|
+
mikan [--state-dir=~/.mikan] [--sandbox=<mode>] <working-directory>
|
|
67
93
|
```
|
|
68
94
|
|
|
69
95
|
## Platforms
|
|
@@ -88,16 +114,16 @@ For routing, mounts, vault behavior, managed container details, and Firecracker/
|
|
|
88
114
|
|
|
89
115
|
## Chat commands
|
|
90
116
|
|
|
91
|
-
| Command
|
|
92
|
-
|
|
|
93
|
-
| `/login` / `/pi-login`
|
|
94
|
-
| `session` / `/session`
|
|
95
|
-
|
|
|
96
|
-
|
|
|
97
|
-
|
|
|
98
|
-
| `stop` / `/stop`
|
|
117
|
+
| Command | Purpose |
|
|
118
|
+
| ------------------------------------------------ | ------------------------------------------------ |
|
|
119
|
+
| `/login` / `/pi-login` | Store API keys or run built-in OAuth flows |
|
|
120
|
+
| `session` / `/session` | Open a read-only web view of the current session |
|
|
121
|
+
| `/new` / `/pi-new` | Reset the current session |
|
|
122
|
+
| `/model` / `/pi-model provider/model[:thinking]` | Switch the LLM for the current conversation |
|
|
123
|
+
| `/auto-reply` / `/pi-auto-reply on\|off\|status` | Control group/channel auto-reply |
|
|
124
|
+
| `stop` / `/stop` | Stop the current run (works on every platform) |
|
|
99
125
|
|
|
100
|
-
See [src/content/docs/commands.
|
|
126
|
+
`session` is the only command accepted without a leading slash. See [src/content/docs/commands.mdx](src/content/docs/commands.mdx) for the full command reference and web session viewer setup.
|
|
101
127
|
|
|
102
128
|
## Configuration
|
|
103
129
|
|
package/dist/adapter.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { MessagingBot, ConversationContext, ConversationEvent, MessagingEventHandler, ChatAdapter, ConversationMessage, ConversationResponder, ChatToolResult, ConversationKind, MessagingInfo, PlatformName, PlatformNotifier, RunningSession, } from "./types.js";
|
|
1
|
+
export type { MessagingBot, ConversationContext, ConversationEvent, MessagingEventHandler, ChatAdapter, ConversationMessage, ConversationResponder, ChatToolResult, ConversationKind, MessagingInfo, PlatformName, PlatformNotifier, PlatformReactor, PlatformUploader, RunningSession, } from "./types.js";
|
|
2
2
|
//# sourceMappingURL=adapter.d.ts.map
|
package/dist/adapter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,WAAW,EACX,mBAAmB,EACnB,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,cAAc,GACf,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,WAAW,EACX,mBAAmB,EACnB,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,cAAc,GACf,MAAM,YAAY,CAAC"}
|
package/dist/adapter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"","sourcesContent":["export type {\n MessagingBot,\n ConversationContext,\n ConversationEvent,\n MessagingEventHandler,\n ChatAdapter,\n ConversationMessage,\n ConversationResponder,\n ChatToolResult,\n ConversationKind,\n MessagingInfo,\n PlatformName,\n PlatformNotifier,\n RunningSession,\n} from \"./types.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"","sourcesContent":["export type {\n MessagingBot,\n ConversationContext,\n ConversationEvent,\n MessagingEventHandler,\n ChatAdapter,\n ConversationMessage,\n ConversationResponder,\n ChatToolResult,\n ConversationKind,\n MessagingInfo,\n PlatformName,\n PlatformNotifier,\n PlatformReactor,\n PlatformUploader,\n RunningSession,\n} from \"./types.js\";\n"]}
|
|
@@ -18,6 +18,7 @@ export declare class DiscordMessagingBot implements MessagingBot {
|
|
|
18
18
|
start(): Promise<void>;
|
|
19
19
|
postMessage(channel: string, text: string): Promise<string>;
|
|
20
20
|
updateMessage(channel: string, ts: string, text: string): Promise<void>;
|
|
21
|
+
addReaction(channel: string, messageTs: string, emoji: string): Promise<void>;
|
|
21
22
|
enqueueEvent(event: ConversationEvent): boolean;
|
|
22
23
|
getMessagingInfo(): MessagingInfo;
|
|
23
24
|
updateMessageRaw(channelId: string, messageId: string, text: string): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bot.d.ts","sourceRoot":"","sources":["../../../src/adapters/discord/bot.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,UAAU,EAEf,KAAK,UAAU,EAKhB,MAAM,YAAY,CAAC;AAIpB,OAAO,KAAK,EACV,YAAY,EAEZ,iBAAiB,EACjB,qBAAqB,EAIrB,aAAa,EACd,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"bot.d.ts","sourceRoot":"","sources":["../../../src/adapters/discord/bot.ts"],"names":[],"mappings":"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"}
|
|
@@ -5,6 +5,7 @@ import * as log from "../../log.js";
|
|
|
5
5
|
import { resolveChatSessionKey } from "../../sessions/policy.js";
|
|
6
6
|
import { formatNothingRunning } from "../../platform-messages.js";
|
|
7
7
|
import { appendBotResponseLog, appendChannelLog, MessagingEventQueue, downloadUrlToFile, resolveOnlyScopedStopTarget, resolveStopTarget, withRetry, } from "../shared.js";
|
|
8
|
+
import { COMMAND_MANIFEST } from "../../commands/manifest.js";
|
|
8
9
|
import { processMessageIntake } from "../intake.js";
|
|
9
10
|
import { createDiscordAdapters } from "./context.js";
|
|
10
11
|
// discord.js: DiscordAPIError exposes `.status` (HTTP status) and a `.code`.
|
|
@@ -55,48 +56,24 @@ export class DiscordMessagingBot {
|
|
|
55
56
|
this.loadCachedGuildData();
|
|
56
57
|
this.setupEventHandlers();
|
|
57
58
|
try {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
name: "model",
|
|
77
|
-
description: "Switch this conversation's LLM model",
|
|
78
|
-
options: [
|
|
79
|
-
{
|
|
80
|
-
name: "model",
|
|
81
|
-
description: "provider/model[:thinking], e.g. anthropic/claude-sonnet-4-6:off",
|
|
82
|
-
type: ApplicationCommandOptionType.String,
|
|
83
|
-
required: false,
|
|
84
|
-
},
|
|
85
|
-
],
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
name: "sandbox",
|
|
89
|
-
description: "Show or temporarily boost this conversation's sandbox limits",
|
|
90
|
-
options: [
|
|
91
|
-
{
|
|
92
|
-
name: "action",
|
|
93
|
-
description: "Use 'boost' to temporarily apply the configured boost limits",
|
|
94
|
-
type: ApplicationCommandOptionType.String,
|
|
95
|
-
required: false,
|
|
96
|
-
},
|
|
97
|
-
],
|
|
98
|
-
},
|
|
99
|
-
]);
|
|
59
|
+
// Registration derives from the command manifest; routing below
|
|
60
|
+
// handles new/stop natively and the rest through one generic path.
|
|
61
|
+
await readyClient.application.commands.set(COMMAND_MANIFEST.filter((entry) => entry.discord).map((entry) => ({
|
|
62
|
+
name: entry.name,
|
|
63
|
+
description: entry.description,
|
|
64
|
+
...(entry.arg
|
|
65
|
+
? {
|
|
66
|
+
options: [
|
|
67
|
+
{
|
|
68
|
+
name: entry.arg.name,
|
|
69
|
+
description: entry.arg.description,
|
|
70
|
+
type: ApplicationCommandOptionType.String,
|
|
71
|
+
required: entry.arg.required,
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
}
|
|
75
|
+
: {}),
|
|
76
|
+
})));
|
|
100
77
|
}
|
|
101
78
|
catch (err) {
|
|
102
79
|
log.logWarning("Failed to register Discord slash commands", err instanceof Error ? err.message : String(err));
|
|
@@ -117,6 +94,15 @@ export class DiscordMessagingBot {
|
|
|
117
94
|
async updateMessage(channel, ts, text) {
|
|
118
95
|
await this.updateMessageRaw(channel, ts, text);
|
|
119
96
|
}
|
|
97
|
+
async addReaction(channel, messageTs, emoji) {
|
|
98
|
+
// Discord uses Unicode emoji directly (e.g. "👀"); accept a bare name too
|
|
99
|
+
// but Slack-style short names won't resolve, so pass through as-is.
|
|
100
|
+
await discordRetry(async () => {
|
|
101
|
+
const ch = await this.fetchTextChannel(channel);
|
|
102
|
+
const msg = await ch.messages.fetch(messageTs);
|
|
103
|
+
await msg.react(emoji.replace(/^:|:$/g, ""));
|
|
104
|
+
});
|
|
105
|
+
}
|
|
120
106
|
enqueueEvent(event) {
|
|
121
107
|
const conversationId = event.conversationId;
|
|
122
108
|
const queue = this.getQueue(conversationId);
|
|
@@ -134,7 +120,8 @@ export class DiscordMessagingBot {
|
|
|
134
120
|
getMessagingInfo() {
|
|
135
121
|
return {
|
|
136
122
|
name: "discord",
|
|
137
|
-
|
|
123
|
+
trustModel: "membership",
|
|
124
|
+
formattingGuide: "## Discord Formatting (Markdown)\nBold: **text**, Italic: *text*, Code: `code`, Block: ```language\ncode```\nLinks: [text](url), Spoiler: ||text||\nKeep messages under 2000 characters. Use code blocks for code.",
|
|
138
125
|
channels: this.getAllChannels(),
|
|
139
126
|
users: this.getAllUsers(),
|
|
140
127
|
diagnostics: {
|
|
@@ -386,14 +373,9 @@ export class DiscordMessagingBot {
|
|
|
386
373
|
this.client.on(Events.InteractionCreate, async (interaction) => {
|
|
387
374
|
if (!interaction.isChatInputCommand())
|
|
388
375
|
return;
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
interaction.commandName !== "new" &&
|
|
392
|
-
interaction.commandName !== "stop" &&
|
|
393
|
-
interaction.commandName !== "model" &&
|
|
394
|
-
interaction.commandName !== "sandbox") {
|
|
376
|
+
const manifestEntry = COMMAND_MANIFEST.find((entry) => entry.discord && entry.name === interaction.commandName);
|
|
377
|
+
if (!manifestEntry)
|
|
395
378
|
return;
|
|
396
|
-
}
|
|
397
379
|
const isDM = !interaction.inGuild();
|
|
398
380
|
const { conversationId, threadTs } = this.resolveConversationContext({
|
|
399
381
|
channelId: interaction.channelId,
|
|
@@ -410,13 +392,9 @@ export class DiscordMessagingBot {
|
|
|
410
392
|
persistentTopLevel: true,
|
|
411
393
|
threadTs,
|
|
412
394
|
});
|
|
413
|
-
const
|
|
414
|
-
? interaction.options.getString(
|
|
415
|
-
: undefined;
|
|
416
|
-
const sandboxAction = interaction.commandName === "sandbox"
|
|
417
|
-
? interaction.options.getString("action")?.trim()
|
|
395
|
+
const commandArg = manifestEntry.arg
|
|
396
|
+
? interaction.options.getString(manifestEntry.arg.name)?.trim()
|
|
418
397
|
: undefined;
|
|
419
|
-
const commandArg = modelOption ?? sandboxAction;
|
|
420
398
|
const commandText = commandArg
|
|
421
399
|
? `/${interaction.commandName} ${commandArg}`
|
|
422
400
|
: `/${interaction.commandName}`;
|
|
@@ -525,21 +503,12 @@ export class DiscordMessagingBot {
|
|
|
525
503
|
userName,
|
|
526
504
|
text: cleanedText,
|
|
527
505
|
};
|
|
528
|
-
// Handle stop before trigger gate — "stop" should never be auto-reply judged.
|
|
529
|
-
if (cleanedText.toLowerCase() === "stop" || cleanedText.toLowerCase() === "/stop") {
|
|
530
|
-
const stopTarget = this.resolveStopTarget(conversationId, sessionKey);
|
|
531
|
-
if (stopTarget) {
|
|
532
|
-
await this.handler.handleStop(stopTarget, conversationId, this);
|
|
533
|
-
}
|
|
534
|
-
else if (!isAutoReplyCandidate) {
|
|
535
|
-
await this.postMessage(conversationId, formatNothingRunning("discord"));
|
|
536
|
-
}
|
|
537
|
-
return;
|
|
538
|
-
}
|
|
539
506
|
await processMessageIntake({
|
|
540
507
|
eventBase,
|
|
541
508
|
workingDir: this.workingDir,
|
|
542
509
|
isAutoReplyCandidate,
|
|
510
|
+
magicWord: { addressed: !isAutoReplyCandidate, scopeFallback: "top-level" },
|
|
511
|
+
busyPolicy: "queue",
|
|
543
512
|
logEntryBase: {
|
|
544
513
|
date: msg.createdAt.toISOString(),
|
|
545
514
|
ts: msgId,
|