pi-roundtable 0.34.0 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -2
- package/src/cli/checks/configuration.ts +2 -2
- package/src/cli/checks/database.ts +2 -2
- package/src/cli/checks/identity.ts +1 -1
- package/src/cli/checks/model.ts +1 -1
- package/src/cli/cli.ts +2 -2
- package/src/cli/principal.ts +1 -1
- package/src/cli/project.ts +2 -2
- package/src/cli/runtime.ts +3 -3
- package/src/cli/start.ts +1 -1
- package/src/core/agents/agent-claim.ts +4 -4
- package/src/core/agents/agent-dashboard.ts +3 -3
- package/src/core/agents/agent-messages.ts +2 -2
- package/src/core/agents/agent-outbox.ts +1 -1
- package/src/core/agents/agent-ports.ts +1 -1
- package/src/core/agents/agent-prompt.ts +4 -4
- package/src/core/agents/agent-rules.ts +1 -1
- package/src/core/agents/agent-schema.ts +4 -1
- package/src/core/agents/agent-settings.ts +2 -2
- package/src/core/agents/agent-store.ts +9 -9
- package/src/core/agents/agent-team-fixture.ts +4 -3
- package/src/core/agents/agent-team.ts +12 -16
- package/src/core/agents/agent-tools.ts +15 -15
- package/src/core/agents/avatar-refresh.ts +1 -1
- package/src/core/agents/avatar-studio.ts +2 -2
- package/src/core/agents/group-round.ts +2 -2
- package/src/core/agents/group-turns.ts +1 -1
- package/src/core/agents/helper-create.ts +24 -40
- package/src/core/agents/helper-modes.ts +2 -2
- package/src/core/agents/helper-preset-ops.ts +207 -0
- package/src/core/agents/helper-preset-tools.ts +109 -0
- package/src/core/agents/helper-presets.ts +128 -0
- package/src/core/agents/helper-test-kit.ts +1 -1
- package/src/core/agents/helper-tools.ts +42 -22
- package/src/core/agents/helper-work.ts +1 -1
- package/src/core/agents/message-target.ts +1 -1
- package/src/core/agents/routes.ts +1 -1
- package/src/core/agents/team-approval.ts +2 -2
- package/src/core/agents/team-editing.ts +2 -2
- package/src/core/agents/team-keys.ts +1 -1
- package/src/core/agents/team-layout.ts +1 -1
- package/src/core/agents/team-options.ts +4 -4
- package/src/core/agents/team-selection.ts +1 -1
- package/src/core/agents/team-status.ts +1 -1
- package/src/core/agents/team-text.ts +3 -3
- package/src/core/agents/team-turn-types.ts +7 -7
- package/src/core/agents/team-turns.ts +3 -3
- package/src/core/attachments/attachment-fetcher.ts +1 -1
- package/src/core/attachments/attachment-port.ts +2 -2
- package/src/core/attachments/attachment-retention.ts +3 -3
- package/src/core/attachments/attachment-store.ts +2 -2
- package/src/core/attachments/model-images.ts +1 -1
- package/src/core/attachments/turn-attachments.ts +1 -1
- package/src/core/builtin/agent-server.ts +17 -10
- package/src/core/builtin/channel-context.ts +2 -2
- package/src/core/builtin/discord-admin.ts +2 -2
- package/src/core/builtin/discord.ts +4 -3
- package/src/core/{identity/identity-plugin.ts → builtin/identity.ts} +15 -12
- package/src/core/builtin/modules.ts +12 -12
- package/src/core/builtin/prompts.ts +3 -3
- package/src/core/builtin/seeds.ts +1 -1
- package/src/core/builtin/session-tool.ts +1 -1
- package/src/core/builtin/skills.ts +3 -3
- package/src/core/builtin/stores.ts +10 -5
- package/src/core/builtin/threads.ts +2 -2
- package/src/core/builtin/worker-sessions.ts +3 -3
- package/src/core/config/access.ts +3 -3
- package/src/core/config/adapters.ts +1 -1
- package/src/core/config/config-schema.ts +9 -3
- package/src/core/config/config.ts +9 -10
- package/src/core/config/ops.ts +1 -1
- package/src/core/config/peer-bots.ts +74 -0
- package/src/core/config/routing.ts +1 -1
- package/src/core/contract/attachments.ts +1 -1
- package/src/core/contract/channels.ts +3 -5
- package/src/core/contract/runtime.ts +6 -6
- package/src/core/contract/surface.ts +3 -3
- package/src/core/conversations/conversation-registry.ts +1 -1
- package/src/core/conversations/conversation-retention.ts +2 -2
- package/src/core/conversations/conversation-store.ts +1 -1
- package/src/core/conversations/conversations-plugin.ts +2 -2
- package/src/core/db/migrations.ts +2 -2
- package/src/core/discord/agent-commands.ts +2 -2
- package/src/core/discord/agent-discord.ts +1 -1
- package/src/core/discord/agent-panel.ts +1 -1
- package/src/core/discord/card-audience.ts +1 -1
- package/src/core/discord/card-copies.ts +1 -1
- package/src/core/discord/channel-context.ts +1 -1
- package/src/core/discord/channel-executor.ts +1 -1
- package/src/core/discord/channel-operations.ts +1 -1
- package/src/core/discord/command-collection.ts +1 -1
- package/src/core/discord/compose-commands.ts +1 -1
- package/src/core/discord/context-images.ts +1 -1
- package/src/core/discord/discord-owners.ts +2 -2
- package/src/core/discord/discord-surface.ts +2 -2
- package/src/core/discord/member-events.ts +2 -2
- package/src/core/discord/message-changes.ts +1 -1
- package/src/core/discord/owner-cards.ts +1 -1
- package/src/core/discord/owner-command.ts +1 -1
- package/src/core/discord/schedule-commands.ts +1 -1
- package/src/core/domain/conversation.ts +5 -3
- package/src/core/{models.ts → domain/models.ts} +1 -1
- package/src/core/domain/ports.ts +2 -2
- package/src/core/{sessions.ts → domain/sessions.ts} +6 -6
- package/src/core/{define-roundtable.ts → host/define-roundtable.ts} +29 -29
- package/src/core/{drain.ts → host/drain.ts} +2 -7
- package/src/core/{events.ts → host/events.ts} +2 -2
- package/src/core/{host-background.ts → host/host-background.ts} +3 -3
- package/src/core/{host-registration.ts → host/host-registration.ts} +30 -30
- package/src/core/{host.ts → host/host.ts} +19 -15
- package/src/core/http/listeners.ts +2 -2
- package/src/core/http/websocket.ts +1 -1
- package/src/core/identity/access-policy.ts +8 -8
- package/src/core/identity/actor-facts.ts +1 -1
- package/src/core/identity/caching-principal-store.ts +1 -1
- package/src/core/identity/config-owner.ts +1 -1
- package/src/core/identity/contact.ts +2 -2
- package/src/core/identity/identity-links.ts +2 -2
- package/src/core/identity/identity-port.ts +2 -2
- package/src/core/identity/identity-schema.ts +1 -1
- package/src/core/identity/identity-service.ts +3 -3
- package/src/core/identity/identity-view.ts +1 -1
- package/src/core/{identity.ts → identity/owner-identity.ts} +1 -1
- package/src/core/identity/person-profiles.ts +1 -1
- package/src/core/identity/plugin-identities.ts +2 -2
- package/src/core/identity/principal-reads.ts +1 -1
- package/src/core/identity/principal-store.ts +1 -1
- package/src/core/identity/principal-types.ts +1 -1
- package/src/core/identity/seen-throttle.ts +1 -1
- package/src/core/{speakers.ts → identity/speakers.ts} +3 -6
- package/src/core/images/codex-images-plugin.ts +3 -3
- package/src/core/interactions/prompts.ts +1 -1
- package/src/core/judging/confirmation-judge.ts +1 -1
- package/src/core/judging/effort-judge.ts +2 -2
- package/src/core/judging/model-judge.ts +1 -1
- package/src/core/modes/conversation-modes.ts +4 -4
- package/src/core/modes/mode-inheritance.ts +1 -1
- package/src/core/modes/modes-plugin.ts +2 -2
- package/src/core/modules/background/background-turns.ts +4 -4
- package/src/core/modules/delegation/delegate.ts +3 -3
- package/src/core/modules/delegation/delegator.ts +4 -4
- package/src/core/modules/delegation/web-research-worker.ts +2 -2
- package/src/core/modules/delegation/worker-session.ts +5 -2
- package/src/core/modules/discord-admin/discord-admin.ts +1 -1
- package/src/core/modules/host-shell/shell-policy.ts +1 -1
- package/src/core/modules/memory/owner-memory-store.ts +1 -1
- package/src/core/modules/memory/owner-memory.ts +6 -3
- package/src/core/modules/notify/notify.ts +4 -1
- package/src/core/modules/notify/session-notify.ts +3 -3
- package/src/core/modules/prompts/prompt-documents.ts +1 -1
- package/src/core/modules/schedules/precheck-tools.ts +4 -4
- package/src/core/modules/schedules/prechecks.ts +2 -2
- package/src/core/modules/schedules/recurrence.ts +6 -1
- package/src/core/modules/schedules/schedule-prechecks.ts +4 -4
- package/src/core/modules/schedules/schedule-store.ts +2 -2
- package/src/core/modules/schedules/schedule-tools.ts +4 -4
- package/src/core/modules/schedules/scheduled-turn-text.ts +1 -1
- package/src/core/modules/schedules/scheduler.ts +3 -3
- package/src/core/modules/schedules/schedules.ts +5 -5
- package/src/core/modules/skills/missing-warning.ts +1 -1
- package/src/core/modules/skills/package-skills.ts +1 -1
- package/src/core/modules/skills/skill-registry.ts +2 -2
- package/src/core/modules/skills/skill-rules.ts +1 -1
- package/src/core/modules/skills/skill-tools.ts +1 -1
- package/src/core/ops/error-reporter.ts +2 -2
- package/src/core/ops/ops-alerts.ts +1 -1
- package/src/core/{define.ts → plugin-api/define.ts} +18 -20
- package/src/core/{event-types.ts → plugin-api/event-types.ts} +1 -1
- package/src/core/{holds.ts → plugin-api/holds.ts} +3 -3
- package/src/core/{plugin-removed.ts → plugin-api/plugin-removed.ts} +2 -2
- package/src/core/{plugin.ts → plugin-api/plugin.ts} +26 -26
- package/src/core/{services.ts → plugin-api/services.ts} +28 -28
- package/src/core/{tool-turn.ts → plugin-api/tool-turn.ts} +12 -5
- package/src/core/presence/delivery-router.ts +1 -1
- package/src/core/presence/direct-channels.ts +1 -1
- package/src/core/registry/chat-commands.ts +1 -1
- package/src/core/registry/contributions.ts +11 -11
- package/src/core/registry/providers.ts +2 -2
- package/src/core/registry/services.ts +2 -2
- package/src/core/registry/surface-service.ts +1 -1
- package/src/core/routing/actor-of.ts +1 -1
- package/src/core/routing/channel-queue.ts +2 -2
- package/src/core/routing/channel-router.ts +3 -3
- package/src/core/routing/claim-events.ts +2 -2
- package/src/core/routing/conversation-turns.ts +10 -6
- package/src/core/routing/forward-join.ts +1 -1
- package/src/core/routing/message-observers.ts +1 -1
- package/src/core/routing/message-text.ts +1 -1
- package/src/core/routing/peer-bots.ts +6 -74
- package/src/core/routing/queued-messages.ts +2 -2
- package/src/core/routing/settle-turn.ts +1 -1
- package/src/core/routing/surface-port.ts +3 -3
- package/src/core/runtime/ask-questions.ts +1 -1
- package/src/core/runtime/bridge-guard.ts +5 -5
- package/src/core/runtime/chat-only.ts +1 -1
- package/src/core/runtime/conversation-sessions.ts +2 -2
- package/src/core/runtime/extensions/agent-prompt.ts +1 -1
- package/src/core/runtime/extensions/ask-user-text.ts +5 -1
- package/src/core/runtime/extensions/ask-user.ts +4 -1
- package/src/core/runtime/extensions/card-ask.ts +1 -1
- package/src/core/runtime/extensions/confirmation-fixture.ts +1 -1
- package/src/core/runtime/extensions/confirmation-gate-extension.ts +1 -1
- package/src/core/runtime/extensions/confirmation-gate.ts +5 -5
- package/src/core/runtime/extensions/gate-refusals.ts +5 -2
- package/src/core/runtime/extensions/held-calls.ts +2 -2
- package/src/core/runtime/extensions/hold-describer.ts +3 -3
- package/src/core/runtime/extensions/hold-lookups.ts +4 -4
- package/src/core/runtime/extensions/persona-prompt.ts +1 -1
- package/src/core/runtime/extensions/prompt-read.ts +1 -1
- package/src/core/runtime/extensions/yolo.ts +1 -1
- package/src/core/runtime/interim-text.ts +1 -1
- package/src/core/runtime/pi-agent-runtime.ts +4 -4
- package/src/core/runtime/running-turn.ts +1 -1
- package/src/core/runtime/runtime-plugin.ts +13 -8
- package/src/core/runtime/runtime-types.ts +14 -10
- package/src/core/runtime/session-conversation.ts +3 -3
- package/src/core/runtime/session-factory.ts +5 -5
- package/src/core/runtime/thinking-level.ts +2 -2
- package/src/core/{tool-tiers.ts → runtime/tool-tiers.ts} +5 -5
- package/src/core/runtime/turn-answer.ts +1 -1
- package/src/core/runtime/turn-budget.ts +1 -1
- package/src/core/runtime/turn-limits.ts +1 -1
- package/src/core/runtime/turn-tools.ts +2 -2
- package/src/core/runtime/worker-task.ts +1 -1
- package/src/core/shared/attach-file-tool.ts +1 -1
- package/src/core/shared/delegate-tool.ts +1 -1
- package/src/core/shared/generate-image-tool.ts +1 -1
- package/src/core/{modules/background → shared}/personal-target.ts +2 -2
- package/src/core/{reply-files.ts → shared/reply-files.ts} +1 -1
- package/src/core/testing/eager-catalog.ts +1 -1
- package/src/core/testing/locale.ts +1 -1
- package/src/core/testing/map-identity.ts +5 -1
- package/src/core/testing/module-sessions.ts +3 -3
- package/src/core/testing/modules.ts +17 -13
- package/src/core/testing/owner.ts +2 -2
- package/src/core/testing/recording-logger.ts +1 -1
- package/src/core/testing/run-tool.ts +2 -2
- package/src/core/testing/surface-contract-support.ts +1 -1
- package/src/core/testing/surface-contract.ts +2 -2
- package/src/core/testing/test-host.ts +12 -12
- package/src/core/testing/thread-host.ts +1 -1
- package/src/core/testing/tool-set.ts +3 -3
- package/src/core/threads/dispatch-threads.ts +1 -1
- package/src/core/tool-set.snapshot.json +12 -0
- package/src/index.ts +76 -72
- package/src/kit/domain.ts +9 -9
- package/src/kit/holds.ts +4 -1
- package/src/kit/jev-judge.ts +1 -1
- package/src/kit/jev.ts +1 -1
- package/src/kit/presentation.ts +1 -1
- package/src/kit/support.ts +3 -3
- package/src/testing.ts +21 -20
- /package/src/core/{errors.ts → kernel/errors.ts} +0 -0
- /package/src/core/{freeze.ts → kernel/freeze.ts} +0 -0
- /package/src/core/{log.ts → kernel/log.ts} +0 -0
- /package/src/core/{time.ts → kernel/time.ts} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CATALOG, type CharacterSpec } from "../../characters/index.ts";
|
|
2
2
|
import { AgentError } from "../domain/errors.ts";
|
|
3
|
+
import type { ThinkingSetting } from "../domain/models.ts";
|
|
3
4
|
import { assistantName } from "../i18n/index.ts";
|
|
4
|
-
import
|
|
5
|
-
import type { AgentDirectory } from "../services.ts";
|
|
6
|
-
import { zonedStamp } from "../time.ts";
|
|
5
|
+
import { zonedStamp } from "../kernel/time.ts";
|
|
6
|
+
import type { AgentDirectory } from "../plugin-api/services.ts";
|
|
7
7
|
import type { ChannelMessage } from "./agent-ports.ts";
|
|
8
8
|
import { characterOf, isHelper } from "./agent-rules.ts";
|
|
9
9
|
import { describeThinking } from "./agent-settings.ts";
|
|
@@ -8,14 +8,14 @@ import type {
|
|
|
8
8
|
TurnResult,
|
|
9
9
|
} from "../domain/conversation.ts";
|
|
10
10
|
import type { AgentTurnScope } from "../domain/ports.ts";
|
|
11
|
+
import type { TurnSelection } from "../domain/sessions.ts";
|
|
11
12
|
import type { IdentityService } from "../identity/identity-port.ts";
|
|
12
|
-
import type { OwnerIdentity } from "../identity.ts";
|
|
13
|
-
import type {
|
|
14
|
-
import type {
|
|
15
|
-
import type {
|
|
16
|
-
import type {
|
|
17
|
-
import type {
|
|
18
|
-
import type { ToolTiers } from "../tool-tiers.ts";
|
|
13
|
+
import type { OwnerIdentity } from "../identity/owner-identity.ts";
|
|
14
|
+
import type { Speaker } from "../identity/speakers.ts";
|
|
15
|
+
import type { Logger } from "../kernel/log.ts";
|
|
16
|
+
import type { EventSink } from "../plugin-api/plugin.ts";
|
|
17
|
+
import type { AvatarStudio } from "../plugin-api/services.ts";
|
|
18
|
+
import type { ToolTiers } from "../runtime/tool-tiers.ts";
|
|
19
19
|
import type { AgentChannels, AgentTurnRunner } from "./agent-ports.ts";
|
|
20
20
|
import type { Agent, PgAgentStore } from "./agent-store.ts";
|
|
21
21
|
import type { RelevanceScorer } from "./group-round.ts";
|
|
@@ -12,12 +12,12 @@ import { AgentError } from "../domain/errors.ts";
|
|
|
12
12
|
import type { InterimPosts } from "../domain/interim.ts";
|
|
13
13
|
import type { AgentTurnScope } from "../domain/ports.ts";
|
|
14
14
|
import type { TurnProgress } from "../domain/progress.ts";
|
|
15
|
+
import type { Speaker } from "../identity/speakers.ts";
|
|
15
16
|
import { isQuiet, replyBody } from "../presentation/reply-body.ts";
|
|
16
17
|
import { splitReply } from "../presentation/reply-splitter.ts";
|
|
17
|
-
import { withReplyFiles } from "../reply-files.ts";
|
|
18
18
|
import { endOf, settleTurn } from "../routing/settle-turn.ts";
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
19
|
+
import { toolTiers } from "../runtime/tool-tiers.ts";
|
|
20
|
+
import { withReplyFiles } from "../shared/reply-files.ts";
|
|
21
21
|
import { AgentMessages } from "./agent-messages.ts";
|
|
22
22
|
import type { Agent } from "./agent-store.ts";
|
|
23
23
|
import { GroupTurns } from "./group-turns.ts";
|
|
@@ -7,7 +7,7 @@ import type {
|
|
|
7
7
|
AttachmentRef,
|
|
8
8
|
StoredAttachment,
|
|
9
9
|
} from "../domain/attachment.ts";
|
|
10
|
-
import { PluginError } from "../errors.ts";
|
|
10
|
+
import { PluginError } from "../kernel/errors.ts";
|
|
11
11
|
import { plainText } from "./attachment-name.ts";
|
|
12
12
|
|
|
13
13
|
export const MAX_ATTACHMENT_BYTES = 25 * 1024 * 1024;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AttachmentPort } from "../contract/attachments.ts";
|
|
2
|
-
import { PluginError } from "../errors.ts";
|
|
3
|
-
import type { Logger } from "../log.ts";
|
|
2
|
+
import { PluginError } from "../kernel/errors.ts";
|
|
3
|
+
import type { Logger } from "../kernel/log.ts";
|
|
4
4
|
import {
|
|
5
5
|
AttachmentStore,
|
|
6
6
|
type AttachmentStoreOptions,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AttachmentPort } from "../contract/attachments.ts";
|
|
2
|
-
import { PluginError } from "../errors.ts";
|
|
3
|
-
import type { Logger } from "../log.ts";
|
|
4
|
-
import type { Service } from "../plugin.ts";
|
|
2
|
+
import { PluginError } from "../kernel/errors.ts";
|
|
3
|
+
import type { Logger } from "../kernel/log.ts";
|
|
4
|
+
import type { Service } from "../plugin-api/plugin.ts";
|
|
5
5
|
|
|
6
6
|
/** How long used files are kept, and how often the host looks for the ones past it. */
|
|
7
7
|
export interface AttachmentRetention {
|
|
@@ -14,8 +14,8 @@ import type {
|
|
|
14
14
|
StoredAttachment,
|
|
15
15
|
TurnAttachments,
|
|
16
16
|
} from "../domain/attachment.ts";
|
|
17
|
-
import type {
|
|
18
|
-
import type {
|
|
17
|
+
import type { ChannelKey } from "../domain/sessions.ts";
|
|
18
|
+
import type { Logger } from "../kernel/log.ts";
|
|
19
19
|
import {
|
|
20
20
|
channelSegment,
|
|
21
21
|
listDir,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AttachmentContent } from "../contract/channels.ts";
|
|
2
2
|
import type { AttachmentRef, TurnAttachments } from "../domain/attachment.ts";
|
|
3
3
|
import type { InboundMessage } from "../domain/conversation.ts";
|
|
4
|
-
import type { Logger } from "../log.ts";
|
|
4
|
+
import type { Logger } from "../kernel/log.ts";
|
|
5
5
|
import { fetchAttachments } from "./attachment-fetcher.ts";
|
|
6
6
|
import { modelImagesOf } from "./model-images.ts";
|
|
7
7
|
|
|
@@ -18,15 +18,18 @@ import type { ResolvedRouting } from "../config/routing.ts";
|
|
|
18
18
|
import type { AgentSessions } from "../contract/runtime.ts";
|
|
19
19
|
import type { ChannelKey } from "../domain/conversation.ts";
|
|
20
20
|
import { ConfigError } from "../domain/errors.ts";
|
|
21
|
-
import
|
|
21
|
+
import {
|
|
22
|
+
AUTO_THINKING,
|
|
23
|
+
formatModelRef,
|
|
24
|
+
type ModelRef,
|
|
25
|
+
} from "../domain/models.ts";
|
|
26
|
+
import type { SessionTool } from "../domain/sessions.ts";
|
|
27
|
+
import type { OwnerIdentity } from "../identity/owner-identity.ts";
|
|
28
|
+
import type { Tier } from "../identity/speakers.ts";
|
|
22
29
|
import { ConfirmationJudge } from "../judging/confirmation-judge.ts";
|
|
23
|
-
import type { Logger } from "../log.ts";
|
|
24
|
-
import { AUTO_THINKING, formatModelRef, type ModelRef } from "../models.ts";
|
|
30
|
+
import type { Logger } from "../kernel/log.ts";
|
|
25
31
|
import type { ErrorReporter } from "../ops/error-reporter.ts";
|
|
26
|
-
import type { PluginContext, RoundtablePlugin } from "../plugin.ts";
|
|
27
|
-
import { splitReply } from "../presentation/reply-splitter.ts";
|
|
28
|
-
import { agentPromptExtension } from "../runtime/extensions/agent-prompt.ts";
|
|
29
|
-
import type { AgentSessionsSlot } from "../runtime/runtime-plugin.ts";
|
|
32
|
+
import type { PluginContext, RoundtablePlugin } from "../plugin-api/plugin.ts";
|
|
30
33
|
import {
|
|
31
34
|
AGENTS,
|
|
32
35
|
BACKGROUND_TURNS,
|
|
@@ -36,9 +39,10 @@ import {
|
|
|
36
39
|
RUNTIME,
|
|
37
40
|
SCHEDULES,
|
|
38
41
|
SKILLS,
|
|
39
|
-
} from "../services.ts";
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
+
} from "../plugin-api/services.ts";
|
|
43
|
+
import { splitReply } from "../presentation/reply-splitter.ts";
|
|
44
|
+
import { agentPromptExtension } from "../runtime/extensions/agent-prompt.ts";
|
|
45
|
+
import type { AgentSessionsSlot } from "../runtime/runtime-plugin.ts";
|
|
42
46
|
import { DISCORD } from "./discord.ts";
|
|
43
47
|
import { agentOnly } from "./session-tool.ts";
|
|
44
48
|
|
|
@@ -157,6 +161,9 @@ const AGENT_TIERS: Readonly<Record<string, Tier>> = {
|
|
|
157
161
|
// A knight may make temp knights for whoever is talking to it; the limits hold the cost.
|
|
158
162
|
helper_create: "member",
|
|
159
163
|
helper_end: "member",
|
|
164
|
+
helper_preset_set: "member",
|
|
165
|
+
helper_preset_list: "member",
|
|
166
|
+
helper_preset_delete: "member",
|
|
160
167
|
};
|
|
161
168
|
|
|
162
169
|
/** The tables the agent server keeps: its agents and groups. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RoundtablePlugin } from "../plugin.ts";
|
|
2
|
-
import { CHANNEL_CONTEXT } from "../services.ts";
|
|
1
|
+
import type { RoundtablePlugin } from "../plugin-api/plugin.ts";
|
|
2
|
+
import { CHANNEL_CONTEXT } from "../plugin-api/services.ts";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The channel context of every surface that reads it. The plugin provides one `CHANNEL_CONTEXT`
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { OwnerIdentity } from "../identity.ts";
|
|
1
|
+
import type { OwnerIdentity } from "../identity/owner-identity.ts";
|
|
2
2
|
import {
|
|
3
3
|
DISCORD_ADMIN_TOOLS,
|
|
4
4
|
discordAdminExtension,
|
|
5
5
|
} from "../modules/discord-admin/discord-admin.ts";
|
|
6
|
-
import type { RoundtablePlugin } from "../plugin.ts";
|
|
6
|
+
import type { RoundtablePlugin } from "../plugin-api/plugin.ts";
|
|
7
7
|
import { DISCORD } from "./discord.ts";
|
|
8
8
|
import { fixed } from "./session-tool.ts";
|
|
9
9
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { rmSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
+
import type { PeerBotsConfig } from "../config/peer-bots.ts";
|
|
3
4
|
import type {
|
|
4
5
|
ChannelContext,
|
|
5
6
|
ChannelContextOptions,
|
|
@@ -23,9 +24,9 @@ import type { DiscordPoster } from "../discord/poster/poster.ts";
|
|
|
23
24
|
import { restOf, restPoster } from "../discord/poster/rest-poster.ts";
|
|
24
25
|
import { stopButtonModule } from "../discord/stop-button.ts";
|
|
25
26
|
import type { InboundMessage } from "../domain/conversation.ts";
|
|
26
|
-
import type { RoundtablePlugin } from "../plugin.ts";
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
27
|
+
import type { RoundtablePlugin } from "../plugin-api/plugin.ts";
|
|
28
|
+
import { IDENTITY, THREADS } from "../plugin-api/services.ts";
|
|
29
|
+
import { PeerBots } from "../routing/peer-bots.ts";
|
|
29
30
|
import type { DispatchThreads } from "../threads/dispatch-threads.ts";
|
|
30
31
|
|
|
31
32
|
/** The Discord connection and what stands on it, as plugins use it. Provided by the Discord plugin. */
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import { isCheckDatabase } from "../db/check-database.ts";
|
|
2
|
-
import type {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
2
|
+
import type { AccessRules } from "../identity/access-policy.ts";
|
|
3
|
+
import { identityLinks } from "../identity/identity-links.ts";
|
|
4
|
+
import {
|
|
5
|
+
type BackfillSummary,
|
|
6
|
+
identityMigrations,
|
|
7
|
+
} from "../identity/identity-schema.ts";
|
|
8
|
+
import { PgIdentityService } from "../identity/identity-service.ts";
|
|
9
|
+
import { identityView } from "../identity/identity-view.ts";
|
|
10
|
+
import { PersonDirectory } from "../identity/person-profiles.ts";
|
|
11
|
+
import { declaredIdentities } from "../identity/plugin-identities.ts";
|
|
12
|
+
import { PgPrincipalStore } from "../identity/principal-store.ts";
|
|
13
|
+
import type { ProfileRules } from "../identity/profiles.ts";
|
|
14
|
+
import { profilesView } from "../identity/profiles-view.ts";
|
|
15
|
+
import type { RoundtablePlugin } from "../plugin-api/plugin.ts";
|
|
16
|
+
import { IDENTITY, IDENTITY_LINKS, PROFILES } from "../plugin-api/services.ts";
|
|
14
17
|
|
|
15
18
|
/** The name of the identity plugin, as the migration ledger names it. */
|
|
16
19
|
export const IDENTITY_PLUGIN = "identity";
|
|
@@ -10,15 +10,13 @@ import {
|
|
|
10
10
|
DelegationError,
|
|
11
11
|
ScheduleError,
|
|
12
12
|
} from "../domain/errors.ts";
|
|
13
|
+
import type { ModelRef, ThinkingLevel } from "../domain/models.ts";
|
|
14
|
+
import type { SessionContext } from "../domain/sessions.ts";
|
|
13
15
|
import { messages } from "../i18n/index.ts";
|
|
14
16
|
import { legacyPrincipalsOf } from "../identity/identity-view.ts";
|
|
15
|
-
import type { OwnerIdentity } from "../identity.ts";
|
|
16
|
-
import type {
|
|
17
|
+
import type { OwnerIdentity } from "../identity/owner-identity.ts";
|
|
18
|
+
import type { Tier } from "../identity/speakers.ts";
|
|
17
19
|
import { ConversationBackgroundTurns } from "../modules/background/background-turns.ts";
|
|
18
|
-
import {
|
|
19
|
-
type PerPrincipalLimits,
|
|
20
|
-
personalTarget,
|
|
21
|
-
} from "../modules/background/personal-target.ts";
|
|
22
20
|
import { delegateExtension } from "../modules/delegation/delegate.ts";
|
|
23
21
|
import {
|
|
24
22
|
DefaultDelegator,
|
|
@@ -30,9 +28,7 @@ import { precheckScriptHoldRule } from "../modules/schedules/precheck-tools.ts";
|
|
|
30
28
|
import { Scheduler } from "../modules/schedules/scheduler.ts";
|
|
31
29
|
import { schedulesExtension } from "../modules/schedules/schedules.ts";
|
|
32
30
|
import type { ErrorReporter } from "../ops/error-reporter.ts";
|
|
33
|
-
import type { RoundtablePlugin } from "../plugin.ts";
|
|
34
|
-
import { runChannelFor } from "../presence/delivery-router.ts";
|
|
35
|
-
import { splitReply } from "../presentation/reply-splitter.ts";
|
|
31
|
+
import type { RoundtablePlugin } from "../plugin-api/plugin.ts";
|
|
36
32
|
import {
|
|
37
33
|
AGENTS,
|
|
38
34
|
BACKGROUND_TURNS,
|
|
@@ -41,11 +37,15 @@ import {
|
|
|
41
37
|
PRECHECKS,
|
|
42
38
|
SCHEDULES,
|
|
43
39
|
THREADS,
|
|
44
|
-
} from "../services.ts";
|
|
45
|
-
import
|
|
40
|
+
} from "../plugin-api/services.ts";
|
|
41
|
+
import { runChannelFor } from "../presence/delivery-router.ts";
|
|
42
|
+
import { splitReply } from "../presentation/reply-splitter.ts";
|
|
46
43
|
import { DELEGATE_TOOL } from "../shared/delegate-tool.ts";
|
|
44
|
+
import {
|
|
45
|
+
type PerPrincipalLimits,
|
|
46
|
+
personalTarget,
|
|
47
|
+
} from "../shared/personal-target.ts";
|
|
47
48
|
import { SCHEDULE_TOOLS } from "../shared/schedule-tools.ts";
|
|
48
|
-
import type { Tier } from "../speakers.ts";
|
|
49
49
|
import { DISCORD } from "./discord.ts";
|
|
50
50
|
import { fixed } from "./session-tool.ts";
|
|
51
51
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { SQL } from "bun";
|
|
2
|
-
import type { Logger } from "../log.ts";
|
|
2
|
+
import type { Logger } from "../kernel/log.ts";
|
|
3
3
|
import { PgPromptDocuments } from "../modules/prompts/prompt-documents.ts";
|
|
4
|
-
import type { RoundtablePlugin } from "../plugin.ts";
|
|
5
|
-
import { PROMPTS } from "../services.ts";
|
|
4
|
+
import type { RoundtablePlugin } from "../plugin-api/plugin.ts";
|
|
5
|
+
import { PROMPTS } from "../plugin-api/services.ts";
|
|
6
6
|
|
|
7
7
|
export interface PromptsOptions {
|
|
8
8
|
/** The guild whose overrides the documents keep, or the local team's id. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AgentSeed } from "../agents/agent-rules.ts";
|
|
2
|
-
import type { RoundtablePlugin } from "../plugin.ts";
|
|
2
|
+
import type { RoundtablePlugin } from "../plugin-api/plugin.ts";
|
|
3
3
|
|
|
4
4
|
/** The configured first team, created on the first start; an agent already stored is never overwritten. */
|
|
5
5
|
export function seedsPlugin(agents: readonly AgentSeed[]): RoundtablePlugin {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SQL } from "bun";
|
|
2
|
+
import type { Tier } from "../identity/speakers.ts";
|
|
2
3
|
import { discoverPackageSkills } from "../modules/skills/package-skills.ts";
|
|
3
4
|
import { StoredSkillRegistry } from "../modules/skills/skill-registry.ts";
|
|
4
5
|
import { SkillStore } from "../modules/skills/skill-store.ts";
|
|
@@ -8,9 +9,8 @@ import {
|
|
|
8
9
|
skillListExtension,
|
|
9
10
|
skillToolsExtension,
|
|
10
11
|
} from "../modules/skills/skill-tools.ts";
|
|
11
|
-
import type { RoundtablePlugin } from "../plugin.ts";
|
|
12
|
-
import { AGENTS, SKILLS } from "../services.ts";
|
|
13
|
-
import type { Tier } from "../speakers.ts";
|
|
12
|
+
import type { RoundtablePlugin } from "../plugin-api/plugin.ts";
|
|
13
|
+
import { AGENTS, SKILLS } from "../plugin-api/services.ts";
|
|
14
14
|
import { agentOnly } from "./session-tool.ts";
|
|
15
15
|
|
|
16
16
|
export interface SkillsOptions {
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SessionContext, SessionTool } from "../domain/sessions.ts";
|
|
2
|
+
import type { OwnerIdentity } from "../identity/owner-identity.ts";
|
|
3
|
+
import type { Tier } from "../identity/speakers.ts";
|
|
2
4
|
import { ownerMemoryExtension } from "../modules/memory/owner-memory.ts";
|
|
3
5
|
import { PgMemoryStore } from "../modules/memory/owner-memory-store.ts";
|
|
4
6
|
import { memoryPrecheckRegistry } from "../modules/schedules/prechecks.ts";
|
|
5
7
|
import { PgScheduleStore } from "../modules/schedules/schedule-store.ts";
|
|
6
|
-
import type { RoundtablePlugin } from "../plugin.ts";
|
|
8
|
+
import type { RoundtablePlugin } from "../plugin-api/plugin.ts";
|
|
9
|
+
import {
|
|
10
|
+
MEMORY,
|
|
11
|
+
type MemoryStore,
|
|
12
|
+
PRECHECKS,
|
|
13
|
+
SCHEDULES,
|
|
14
|
+
} from "../plugin-api/services.ts";
|
|
7
15
|
import { memoryReader } from "../runtime/session-conversation.ts";
|
|
8
|
-
import { MEMORY, type MemoryStore, PRECHECKS, SCHEDULES } from "../services.ts";
|
|
9
|
-
import type { SessionContext, SessionTool } from "../sessions.ts";
|
|
10
|
-
import type { Tier } from "../speakers.ts";
|
|
11
16
|
import { fixed } from "./session-tool.ts";
|
|
12
17
|
|
|
13
18
|
export interface MemoryOptions {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { join } from "node:path";
|
|
2
|
-
import type { RoundtablePlugin } from "../plugin.ts";
|
|
3
|
-
import { THREADS } from "../services.ts";
|
|
2
|
+
import type { RoundtablePlugin } from "../plugin-api/plugin.ts";
|
|
3
|
+
import { THREADS } from "../plugin-api/services.ts";
|
|
4
4
|
import { DispatchThreads } from "../threads/dispatch-threads.ts";
|
|
5
5
|
|
|
6
6
|
export interface ThreadsOptions {
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
formatModelRef,
|
|
5
5
|
type ModelRef,
|
|
6
6
|
type ThinkingLevel,
|
|
7
|
-
} from "../models.ts";
|
|
7
|
+
} from "../domain/models.ts";
|
|
8
8
|
import { workerSessions } from "../modules/delegation/worker-session.ts";
|
|
9
|
-
import type { RoundtablePlugin } from "../plugin.ts";
|
|
10
|
-
import { WORKER_SESSIONS } from "../services.ts";
|
|
9
|
+
import type { RoundtablePlugin } from "../plugin-api/plugin.ts";
|
|
10
|
+
import { WORKER_SESSIONS } from "../plugin-api/services.ts";
|
|
11
11
|
|
|
12
12
|
export interface WorkerSessionsPluginOptions {
|
|
13
13
|
/** Shared with the rest of the host, so logins refresh in one place. */
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
rulesOfSpeakerMap,
|
|
9
9
|
} from "../identity/access-policy.ts";
|
|
10
10
|
import { parseIdentity } from "../identity/actor-facts.ts";
|
|
11
|
-
import { PRONOUNS } from "../identity.ts";
|
|
12
|
-
import type {
|
|
13
|
-
import type {
|
|
11
|
+
import { PRONOUNS } from "../identity/owner-identity.ts";
|
|
12
|
+
import type { TierMembers } from "../identity/speakers.ts";
|
|
13
|
+
import type { Logger } from "../kernel/log.ts";
|
|
14
14
|
import type { Pronouns, ResolvedConfig, RoundtableConfig } from "./config.ts";
|
|
15
15
|
import {
|
|
16
16
|
either,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ChannelContextOptions } from "../contract/channel-context.ts";
|
|
2
2
|
import { ConfigError } from "../domain/errors.ts";
|
|
3
|
-
import { type PeerBotsConfig, peerBotsShape } from "
|
|
3
|
+
import { type PeerBotsConfig, peerBotsShape } from "./peer-bots.ts";
|
|
4
4
|
import {
|
|
5
5
|
bool,
|
|
6
6
|
guarded,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { InterimTextMode } from "../domain/interim.ts";
|
|
2
|
+
import { type EffortPolicy, THINKING_LEVELS } from "../domain/models.ts";
|
|
2
3
|
import { isLocale, type Locale } from "../i18n/index.ts";
|
|
3
|
-
import
|
|
4
|
-
import type { RoundtablePlugin } from "../plugin.ts";
|
|
5
|
-
import type { Tier } from "../speakers.ts";
|
|
4
|
+
import type { Tier } from "../identity/speakers.ts";
|
|
5
|
+
import type { RoundtablePlugin } from "../plugin-api/plugin.ts";
|
|
6
6
|
import { accessShape } from "./access.ts";
|
|
7
7
|
import { discordShape } from "./adapters.ts";
|
|
8
8
|
import { attachmentsShape } from "./attachments.ts";
|
|
@@ -60,6 +60,12 @@ const isPlugin = (value: unknown): value is RoundtablePlugin =>
|
|
|
60
60
|
typeof (value as { name?: unknown }).name === "string" &&
|
|
61
61
|
typeof (value as { setup?: unknown }).setup === "function";
|
|
62
62
|
|
|
63
|
+
/**
|
|
64
|
+
* How long a shutdown waits for running work before aborting it: long enough for a usual turn to
|
|
65
|
+
* answer, short enough that a hung one never holds a restart for an hour.
|
|
66
|
+
*/
|
|
67
|
+
export const DRAIN_LIMIT_MS = 3 * 60_000;
|
|
68
|
+
|
|
63
69
|
export const configSchema = shape({
|
|
64
70
|
name: optional(text),
|
|
65
71
|
owner: optional(
|
|
@@ -4,22 +4,21 @@ import { CATALOG, type Hex } from "../../characters/index.ts";
|
|
|
4
4
|
import type { AgentSeed } from "../agents/agent-rules.ts";
|
|
5
5
|
import { ConfigError } from "../domain/errors.ts";
|
|
6
6
|
import type { InterimTextMode } from "../domain/interim.ts";
|
|
7
|
-
import { DRAIN_LIMIT_MS } from "../drain.ts";
|
|
8
|
-
import type { Locale } from "../i18n/index.ts";
|
|
9
|
-
import type { AccessRules } from "../identity/access-policy.ts";
|
|
10
|
-
import type { ProfileRules } from "../identity/profiles.ts";
|
|
11
|
-
import type { OwnerIdentity } from "../identity.ts";
|
|
12
7
|
import {
|
|
13
8
|
type EffortPolicy,
|
|
14
9
|
type ModelRef,
|
|
15
10
|
parseModelRef,
|
|
16
11
|
type ThinkingLevel,
|
|
17
|
-
} from "../models.ts";
|
|
18
|
-
import type {
|
|
19
|
-
import type {
|
|
12
|
+
} from "../domain/models.ts";
|
|
13
|
+
import type { Locale } from "../i18n/index.ts";
|
|
14
|
+
import type { AccessRules } from "../identity/access-policy.ts";
|
|
15
|
+
import type { OwnerIdentity } from "../identity/owner-identity.ts";
|
|
16
|
+
import type { ProfileRules } from "../identity/profiles.ts";
|
|
17
|
+
import type { Tier, TierMembers } from "../identity/speakers.ts";
|
|
18
|
+
import type { AgentTools, RoundtablePlugin } from "../plugin-api/plugin.ts";
|
|
20
19
|
import { PRIMARY_CHARS } from "../runtime/interim-text.ts";
|
|
21
20
|
import type { ShellEnvConfig } from "../shared/child-env.ts";
|
|
22
|
-
import type {
|
|
21
|
+
import type { PerPrincipalLimits } from "../shared/personal-target.ts";
|
|
23
22
|
import { type AccessConfig, accessOf } from "./access.ts";
|
|
24
23
|
import {
|
|
25
24
|
type DiscordConfig,
|
|
@@ -29,7 +28,7 @@ import {
|
|
|
29
28
|
} from "./adapters.ts";
|
|
30
29
|
import { checkAgentServerOff, checkAgentTeamKeys } from "./agent-team.ts";
|
|
31
30
|
import type { AttachmentsConfig } from "./attachments.ts";
|
|
32
|
-
import { configSchema } from "./config-schema.ts";
|
|
31
|
+
import { configSchema, DRAIN_LIMIT_MS } from "./config-schema.ts";
|
|
33
32
|
import type { ConversationsConfig } from "./conversations.ts";
|
|
34
33
|
import {
|
|
35
34
|
type HelpersConfig,
|
package/src/core/config/ops.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConfigError } from "../domain/errors.ts";
|
|
2
|
-
import type { ChannelKey } from "../sessions.ts";
|
|
2
|
+
import type { ChannelKey } from "../domain/sessions.ts";
|
|
3
3
|
|
|
4
4
|
/** Where the errors go: one agent, or one conversation. */
|
|
5
5
|
export type ResolvedOps = { agent: string } | { conversation: ChannelKey };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { ConfigError } from "../domain/errors.ts";
|
|
2
|
+
import {
|
|
3
|
+
bool,
|
|
4
|
+
either,
|
|
5
|
+
type Field,
|
|
6
|
+
integer,
|
|
7
|
+
list,
|
|
8
|
+
optional,
|
|
9
|
+
shape,
|
|
10
|
+
text,
|
|
11
|
+
} from "./schema.ts";
|
|
12
|
+
|
|
13
|
+
/** One peer bot the host answers, and where. */
|
|
14
|
+
export interface PeerBotEntry {
|
|
15
|
+
/** The bot's user id on the surface, a Discord snowflake. */
|
|
16
|
+
id: string;
|
|
17
|
+
/** Answer it only in these servers; left out, in every server of the host. */
|
|
18
|
+
guilds?: readonly string[];
|
|
19
|
+
/** Answer it only in these channels; left out, in every channel. */
|
|
20
|
+
channels?: readonly string[];
|
|
21
|
+
/**
|
|
22
|
+
* Leave to this bot a person's message that addresses both: when a person mentions or replies to
|
|
23
|
+
* the host and in the same message mentions this bot or replies to it, the host starts no turn
|
|
24
|
+
* (observers still hear the message), so only this bot answers and it can hand over by mentioning
|
|
25
|
+
* the host. Where `guilds` and `channels` do not list the bot, the host does not yield to it.
|
|
26
|
+
* Set it on one side only: two hosts that yield to each other both stay silent.
|
|
27
|
+
*/
|
|
28
|
+
yields?: boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The other bots whose messages the host answers like a guest's. Explicit ids only: there is no
|
|
33
|
+
* wildcard and no "all bots", and a host that leaves this out answers no bot.
|
|
34
|
+
*/
|
|
35
|
+
export interface PeerBotsConfig {
|
|
36
|
+
/** The peer bots, each by its user id or as an entry that limits it to servers or channels. */
|
|
37
|
+
allow: readonly (string | PeerBotEntry)[];
|
|
38
|
+
/**
|
|
39
|
+
* The most messages from peer bots in a row, in one channel, that start a turn before the next
|
|
40
|
+
* one is ignored; a person's message in the channel starts the count over. Default 3.
|
|
41
|
+
*/
|
|
42
|
+
maxRounds?: number;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** The rounds in a row a channel answers peer bots when the host does not say. */
|
|
46
|
+
export const DEFAULT_PEER_ROUNDS = 3;
|
|
47
|
+
|
|
48
|
+
const SNOWFLAKE = /^[0-9]{17,20}$/;
|
|
49
|
+
|
|
50
|
+
/** A Discord id: 17 to 20 digits. */
|
|
51
|
+
const snowflake: Field<string> = {
|
|
52
|
+
describe: "a Discord id (17 to 20 digits)",
|
|
53
|
+
check: (value, path) => {
|
|
54
|
+
const id = text.check(value, path);
|
|
55
|
+
if (!SNOWFLAKE.test(id))
|
|
56
|
+
throw new ConfigError(
|
|
57
|
+
`config ${path}: expected a Discord id (17 to 20 digits), got ${JSON.stringify(id)}. Copy the id with Developer Mode on; a name or a wildcard is not accepted. Fix the value in roundtable.config.ts.`,
|
|
58
|
+
);
|
|
59
|
+
return id;
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const entryShape = shape({
|
|
64
|
+
id: snowflake,
|
|
65
|
+
guilds: optional(list(snowflake)),
|
|
66
|
+
channels: optional(list(snowflake)),
|
|
67
|
+
yields: optional(bool),
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
/** `discord.peerBots`, or the `peerBots` of the host's options. */
|
|
71
|
+
export const peerBotsShape = shape({
|
|
72
|
+
allow: list(either(snowflake, entryShape)),
|
|
73
|
+
maxRounds: optional(integer(1, 100)),
|
|
74
|
+
});
|
|
@@ -2,7 +2,7 @@ import type {
|
|
|
2
2
|
StoredAttachment,
|
|
3
3
|
TurnAttachments,
|
|
4
4
|
} from "../domain/attachment.ts";
|
|
5
|
-
import type { ChannelKey } from "../sessions.ts";
|
|
5
|
+
import type { ChannelKey } from "../domain/sessions.ts";
|
|
6
6
|
|
|
7
7
|
/** A file a plugin hands the core to keep for a conversation. */
|
|
8
8
|
export interface AttachmentUpload {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { ChannelKey } from "../domain/sessions.ts";
|
|
1
2
|
import type { Locale } from "../i18n/index.ts";
|
|
2
3
|
import type { ActorFacts } from "../identity/actor-facts.ts";
|
|
3
|
-
import type {
|
|
4
|
-
import type { Speaker, Tier } from "../speakers.ts";
|
|
4
|
+
import type { Speaker, Tier } from "../identity/speakers.ts";
|
|
5
5
|
|
|
6
6
|
/** A file attached to a chat message, as the surface reports it; nothing is downloaded yet. */
|
|
7
7
|
export interface AttachmentRef {
|
|
@@ -120,9 +120,7 @@ export interface InboundMessage {
|
|
|
120
120
|
};
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
|
|
124
|
-
export const STEERED_MARK = "↪️";
|
|
125
|
-
export const QUEUED_MARK = "⏳";
|
|
123
|
+
export { QUEUED_MARK, STEERED_MARK } from "../domain/conversation.ts";
|
|
126
124
|
|
|
127
125
|
/** A message waiting in a channel's queue for its own turn (`ConversationPort.queued`). */
|
|
128
126
|
export interface QueuedMessage {
|
|
@@ -5,14 +5,14 @@ import type {
|
|
|
5
5
|
TranscriptEntry,
|
|
6
6
|
TurnResult,
|
|
7
7
|
} from "../domain/conversation.ts";
|
|
8
|
+
import type { ThinkingSetting } from "../domain/models.ts";
|
|
8
9
|
import type { TurnRequest } from "../domain/ports.ts";
|
|
10
|
+
import type { AgentTurnScope } from "../domain/sessions.ts";
|
|
11
|
+
import type { Speaker } from "../identity/speakers.ts";
|
|
9
12
|
import type { PromptScope, Prompts } from "../interactions/prompts.ts";
|
|
10
|
-
import type { Logger } from "../log.ts";
|
|
11
|
-
import type {
|
|
12
|
-
import type {
|
|
13
|
-
import type { AgentTurnScope } from "../sessions.ts";
|
|
14
|
-
import type { Speaker } from "../speakers.ts";
|
|
15
|
-
import type { ToolTiers } from "../tool-tiers.ts";
|
|
13
|
+
import type { Logger } from "../kernel/log.ts";
|
|
14
|
+
import type { HostEnv, LinkedSessions } from "../plugin-api/plugin.ts";
|
|
15
|
+
import type { ToolTiers } from "../runtime/tool-tiers.ts";
|
|
16
16
|
import type { Judge } from "./providers.ts";
|
|
17
17
|
|
|
18
18
|
/** A conversation's context use after its latest turn. */
|