pi-roundtable 0.33.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 +19 -0
- package/README.md +1 -1
- package/README.zh-TW.md +1 -1
- package/docs/plugins.md +2 -2
- 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/child-env.ts +3 -5
- 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,15 +1,15 @@
|
|
|
1
1
|
import { parse } from "@babel/parser";
|
|
2
2
|
import type { Node, Program } from "@babel/types";
|
|
3
3
|
import { ScheduleError } from "../../domain/errors.ts";
|
|
4
|
+
import { messages } from "../../i18n/index.ts";
|
|
5
|
+
import type { Tier } from "../../identity/speakers.ts";
|
|
4
6
|
import {
|
|
5
7
|
type HoldCheck,
|
|
6
8
|
type HoldContext,
|
|
7
9
|
type HoldRule,
|
|
8
10
|
higherTier,
|
|
9
|
-
} from "../../holds.ts";
|
|
10
|
-
import {
|
|
11
|
-
import type { Tier } from "../../speakers.ts";
|
|
12
|
-
import type { ToolTiers } from "../../tool-tiers.ts";
|
|
11
|
+
} from "../../plugin-api/holds.ts";
|
|
12
|
+
import type { ToolTiers } from "../../runtime/tool-tiers.ts";
|
|
13
13
|
import type { PrecheckRegistry } from "./prechecks.ts";
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ChannelKey } from "../../domain/conversation.ts";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import type { Tier } from "../../identity/speakers.ts";
|
|
3
|
+
import { PluginError } from "../../kernel/errors.ts";
|
|
4
4
|
import type { Schedule } from "./schedule-store.ts";
|
|
5
5
|
|
|
6
6
|
/** How long a precheck may run before it counts as failed, unless it sets its own `timeoutMs`. */
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { ScheduleError } from "../../domain/errors.ts";
|
|
2
2
|
import { messages } from "../../i18n/index.ts";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
timeZone,
|
|
5
|
+
zonedDate,
|
|
6
|
+
zonedInstant,
|
|
7
|
+
zonedStamp,
|
|
8
|
+
} from "../../kernel/time.ts";
|
|
4
9
|
|
|
5
10
|
export type Weekday = "sun" | "mon" | "tue" | "wed" | "thu" | "fri" | "sat";
|
|
6
11
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { Logger } from "../../log.ts";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import type { Tier } from "../../identity/speakers.ts";
|
|
2
|
+
import type { Logger } from "../../kernel/log.ts";
|
|
3
|
+
import { timeZone, zonedStamp } from "../../kernel/time.ts";
|
|
4
|
+
import type { HoldCheck } from "../../plugin-api/holds.ts";
|
|
5
5
|
import { type PrecheckTool, precheckScriptTools } from "./precheck-tools.ts";
|
|
6
6
|
import {
|
|
7
7
|
type Precheck,
|
|
@@ -2,8 +2,8 @@ import type { SQL } from "bun";
|
|
|
2
2
|
import type { Migration } from "../../db/migrations.ts";
|
|
3
3
|
import type { ChannelKey } from "../../domain/conversation.ts";
|
|
4
4
|
import { ScheduleError } from "../../domain/errors.ts";
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
5
|
+
import type { Tier } from "../../identity/speakers.ts";
|
|
6
|
+
import type { ScheduleStore } from "../../plugin-api/services.ts";
|
|
7
7
|
import type { PrecheckTool } from "./precheck-tools.ts";
|
|
8
8
|
import type { Recurrence } from "./recurrence.ts";
|
|
9
9
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { BackgroundTarget } from "../../contract/channels.ts";
|
|
2
2
|
import type { ChannelKey } from "../../domain/conversation.ts";
|
|
3
3
|
import { ScheduleError } from "../../domain/errors.ts";
|
|
4
|
-
import type { HoldCheck } from "../../holds.ts";
|
|
5
4
|
import { messages } from "../../i18n/index.ts";
|
|
6
5
|
import { SYSTEM_PRINCIPAL } from "../../identity/principal-store.ts";
|
|
7
|
-
import type
|
|
6
|
+
import { type Tier, tierAtLeast } from "../../identity/speakers.ts";
|
|
7
|
+
import { timeZone, zonedStamp } from "../../kernel/time.ts";
|
|
8
|
+
import type { HoldCheck } from "../../plugin-api/holds.ts";
|
|
9
|
+
import type { ScheduleStore } from "../../plugin-api/services.ts";
|
|
8
10
|
import type { ScheduleToolName } from "../../shared/schedule-tools.ts";
|
|
9
|
-
import { type Tier, tierAtLeast } from "../../speakers.ts";
|
|
10
|
-
import { timeZone, zonedStamp } from "../../time.ts";
|
|
11
11
|
import { precheckCatalog } from "./precheck-catalog.ts";
|
|
12
12
|
import { type PrecheckTool, precheckScriptTools } from "./precheck-tools.ts";
|
|
13
13
|
import { PRECHECK_SCRIPT_CHARS, type PrecheckRegistry } from "./prechecks.ts";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { messages } from "../../i18n/index.ts";
|
|
2
|
-
import { timeZone, zonedStamp } from "../../time.ts";
|
|
2
|
+
import { timeZone, zonedStamp } from "../../kernel/time.ts";
|
|
3
3
|
import type { PrecheckFinding } from "./prechecks.ts";
|
|
4
4
|
import { describeRecurrence } from "./recurrence.ts";
|
|
5
5
|
import type { Schedule } from "./schedule-store.ts";
|
|
@@ -2,9 +2,9 @@ import type {
|
|
|
2
2
|
BackgroundRunsAs,
|
|
3
3
|
ScheduledOutcome,
|
|
4
4
|
} from "../../contract/channels.ts";
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type { ScheduleStore } from "../../services.ts";
|
|
5
|
+
import type { Logger } from "../../kernel/log.ts";
|
|
6
|
+
import type { HoldCheck } from "../../plugin-api/holds.ts";
|
|
7
|
+
import type { ScheduleStore } from "../../plugin-api/services.ts";
|
|
8
8
|
import {
|
|
9
9
|
type PrecheckFinding,
|
|
10
10
|
type PrecheckRegistry,
|
|
@@ -3,20 +3,20 @@ import { Type } from "typebox";
|
|
|
3
3
|
import type { BackgroundTarget } from "../../contract/channels.ts";
|
|
4
4
|
import type { ChannelKey } from "../../domain/conversation.ts";
|
|
5
5
|
import { ScheduleError } from "../../domain/errors.ts";
|
|
6
|
-
import type { HoldCheck } from "../../holds.ts";
|
|
7
6
|
import { activeLocale } from "../../i18n/index.ts";
|
|
7
|
+
import type { Speaker } from "../../identity/speakers.ts";
|
|
8
|
+
import { timeZone } from "../../kernel/time.ts";
|
|
9
|
+
import type { HoldCheck } from "../../plugin-api/holds.ts";
|
|
10
|
+
import type { ScheduleStore } from "../../plugin-api/services.ts";
|
|
8
11
|
import {
|
|
9
12
|
type ToolInput,
|
|
10
13
|
textToolsExtension,
|
|
11
14
|
} from "../../runtime/text-tools.ts";
|
|
12
|
-
import
|
|
15
|
+
import { PERSONAL_TARGET } from "../../shared/personal-target.ts";
|
|
13
16
|
import {
|
|
14
17
|
type ScheduleToolSpec,
|
|
15
18
|
scheduleToolSpecs,
|
|
16
19
|
} from "../../shared/schedule-tools.ts";
|
|
17
|
-
import type { Speaker } from "../../speakers.ts";
|
|
18
|
-
import { timeZone } from "../../time.ts";
|
|
19
|
-
import { PERSONAL_TARGET } from "../background/personal-target.ts";
|
|
20
20
|
import type { PrecheckRegistry } from "./prechecks.ts";
|
|
21
21
|
import { callScheduleTool } from "./schedule-tools.ts";
|
|
22
22
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { existsSync, readdirSync, readFileSync, statSync } from "node:fs";
|
|
2
2
|
import { isAbsolute, join, relative as relativePath, resolve } from "node:path";
|
|
3
|
-
import { PluginError } from "../../errors.ts";
|
|
3
|
+
import { PluginError } from "../../kernel/errors.ts";
|
|
4
4
|
import { packageDir } from "../../shared/package-dir.ts";
|
|
5
5
|
import {
|
|
6
6
|
BUILTIN_SKILLS,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { mkdirSync, readdirSync, rmSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { AgentError } from "../../domain/errors.ts";
|
|
4
|
-
import { PluginError } from "../../errors.ts";
|
|
5
|
-
import type { SkillRegistry } from "../../services.ts";
|
|
4
|
+
import { PluginError } from "../../kernel/errors.ts";
|
|
5
|
+
import type { SkillRegistry } from "../../plugin-api/services.ts";
|
|
6
6
|
import { WarnedMissing } from "./missing-warning.ts";
|
|
7
7
|
import {
|
|
8
8
|
readSkillDocument,
|
|
@@ -2,7 +2,7 @@ import { createHash } from "node:crypto";
|
|
|
2
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
3
|
import { parseFrontmatter } from "@earendil-works/pi-coding-agent";
|
|
4
4
|
import { AgentError } from "../../domain/errors.ts";
|
|
5
|
-
import type { Logger } from "../../log.ts";
|
|
5
|
+
import type { Logger } from "../../kernel/log.ts";
|
|
6
6
|
import type { SkillStore } from "./skill-store.ts";
|
|
7
7
|
|
|
8
8
|
/** Carried by every agent and worker, shipped in the release (behavior 20). */
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { ExtensionFactory } from "@earendil-works/pi-coding-agent";
|
|
2
2
|
import { Type } from "typebox";
|
|
3
3
|
import { AgentError } from "../../domain/errors.ts";
|
|
4
|
+
import type { SkillRegistry } from "../../plugin-api/services.ts";
|
|
4
5
|
import {
|
|
5
6
|
optionalString,
|
|
6
7
|
requiredString,
|
|
7
8
|
stringList,
|
|
8
9
|
textToolsExtension,
|
|
9
10
|
} from "../../runtime/text-tools.ts";
|
|
10
|
-
import type { SkillRegistry } from "../../services.ts";
|
|
11
11
|
import {
|
|
12
12
|
MAX_SKILL_BODY_CHARS,
|
|
13
13
|
type StoredSkillRegistry,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
2
|
import type { ScheduledOutcome } from "../contract/channels.ts";
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
3
|
+
import type { ChannelKey } from "../domain/sessions.ts";
|
|
4
|
+
import type { LogEntry, Logger } from "../kernel/log.ts";
|
|
5
5
|
import { AlertThrottle } from "./alert-throttle.ts";
|
|
6
6
|
|
|
7
7
|
/** Errors that are expected and never reported, matched against the message and the error's. */
|
|
@@ -2,22 +2,28 @@ import type { Static, TObject } from "typebox";
|
|
|
2
2
|
import type {
|
|
3
3
|
ToolAttachment,
|
|
4
4
|
ToolAttachmentInfo,
|
|
5
|
-
} from "
|
|
6
|
-
import type { ClientPort } from "
|
|
7
|
-
import type { ReplyFile } from "
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
import
|
|
5
|
+
} from "../attachments/tool-attachment.ts";
|
|
6
|
+
import type { ClientPort } from "../domain/client.ts";
|
|
7
|
+
import type { ReplyFile } from "../domain/conversation.ts";
|
|
8
|
+
import type {
|
|
9
|
+
AgentTurnScope,
|
|
10
|
+
ChannelKey,
|
|
11
|
+
SessionTool,
|
|
12
|
+
} from "../domain/sessions.ts";
|
|
13
|
+
import { messages } from "../i18n/index.ts";
|
|
14
|
+
import { type Speaker, TIERS, type Tier } from "../identity/speakers.ts";
|
|
15
|
+
import type { ApprovedBy } from "../interactions/prompts.ts";
|
|
16
|
+
import { PluginError } from "../kernel/errors.ts";
|
|
14
17
|
import {
|
|
15
18
|
type ToolOutput,
|
|
16
19
|
toolError,
|
|
17
20
|
toolOutput,
|
|
18
|
-
} from "
|
|
19
|
-
import { type
|
|
20
|
-
import {
|
|
21
|
+
} from "../shared/tool-result.ts";
|
|
22
|
+
import { type HoldDescription, type HoldRule, isPromise } from "./holds.ts";
|
|
23
|
+
import { type RoundtablePlugin, refuseRemovedFields } from "./plugin.ts";
|
|
24
|
+
import { ToolRefusal, toolTurn } from "./tool-turn.ts";
|
|
25
|
+
|
|
26
|
+
export { ToolRefusal };
|
|
21
27
|
|
|
22
28
|
/** Tool names are lowercase words joined by underscores, like every tool the core ships. */
|
|
23
29
|
const TOOL_NAME = /^[a-z][a-z0-9]*(_[a-z0-9]+)*$/;
|
|
@@ -91,14 +97,6 @@ export interface ToolTurn {
|
|
|
91
97
|
attachments?(): Promise<readonly ToolAttachmentInfo[]>;
|
|
92
98
|
}
|
|
93
99
|
|
|
94
|
-
/**
|
|
95
|
-
* Thrown by a tool's `run` for a call the model should correct: the message becomes the tool's
|
|
96
|
-
* error result, which the model reads. Any other error fails the call.
|
|
97
|
-
*/
|
|
98
|
-
export class ToolRefusal extends Error {
|
|
99
|
-
override name = "ToolRefusal";
|
|
100
|
-
}
|
|
101
|
-
|
|
102
100
|
export interface ToolSpec<Schema extends TObject> {
|
|
103
101
|
/** Lowercase words joined by underscores; unique across every plugin. */
|
|
104
102
|
name: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { type Tier, tierAtLeast } from "../identity/speakers.ts";
|
|
2
|
+
import type { ApprovalDetails } from "../interactions/prompts.ts";
|
|
3
|
+
import { PluginError } from "../kernel/errors.ts";
|
|
1
4
|
import type { ToolTurn } from "./define.ts";
|
|
2
|
-
import { PluginError } from "./errors.ts";
|
|
3
|
-
import type { ApprovalDetails } from "./interactions/prompts.ts";
|
|
4
|
-
import { type Tier, tierAtLeast } from "./speakers.ts";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* How long the confirmation gate waits for a hold that looks things up before it describes the
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SQL } from "bun";
|
|
2
|
-
import type { Hex } from "
|
|
3
|
-
import type { AgentSeed } from "
|
|
4
|
-
import type { AttachmentPort } from "
|
|
2
|
+
import type { Hex } from "../../characters/index.ts";
|
|
3
|
+
import type { AgentSeed } from "../agents/agent-store.ts";
|
|
4
|
+
import type { AttachmentPort } from "../contract/attachments.ts";
|
|
5
5
|
import type {
|
|
6
6
|
BackgroundTarget,
|
|
7
7
|
ChannelClaim,
|
|
@@ -9,35 +9,35 @@ import type {
|
|
|
9
9
|
MessageObserver,
|
|
10
10
|
ObserveFilter,
|
|
11
11
|
QueuePort,
|
|
12
|
-
} from "
|
|
13
|
-
import type { ChatCommand } from "
|
|
14
|
-
import type { Providers, ResolvedProviders } from "
|
|
15
|
-
import type { ServiceKey, Services } from "
|
|
16
|
-
import type { ChatSurface, SurfacePort } from "
|
|
17
|
-
import type { Migration } from "
|
|
18
|
-
import type {
|
|
19
|
-
import type { TurnProgress } from "./domain/progress.ts";
|
|
20
|
-
import { PluginError } from "./errors.ts";
|
|
21
|
-
import type { ActionEvent, MemberJoinedEvent } from "./event-types.ts";
|
|
22
|
-
import type { HoldCheck, HoldRule } from "./holds.ts";
|
|
23
|
-
import type { HttpRoute, ListenerAddress } from "./http/listeners.ts";
|
|
24
|
-
import type { Locale } from "./i18n/index.ts";
|
|
25
|
-
import type { Logger } from "./log.ts";
|
|
26
|
-
import type {
|
|
27
|
-
DirectChannelProvider,
|
|
28
|
-
DirectChannels,
|
|
29
|
-
} from "./presence/direct-channels.ts";
|
|
30
|
-
import type { ConversationTurns } from "./routing/conversation-turns.ts";
|
|
12
|
+
} from "../contract/channels.ts";
|
|
13
|
+
import type { ChatCommand } from "../contract/chat-command.ts";
|
|
14
|
+
import type { Providers, ResolvedProviders } from "../contract/providers.ts";
|
|
15
|
+
import type { ServiceKey, Services } from "../contract/services.ts";
|
|
16
|
+
import type { ChatSurface, SurfacePort } from "../contract/surface.ts";
|
|
17
|
+
import type { Migration } from "../db/migrations.ts";
|
|
18
|
+
import type { TurnProgress } from "../domain/progress.ts";
|
|
31
19
|
import type {
|
|
32
20
|
AgentTurnScope,
|
|
33
21
|
ChannelKey,
|
|
34
22
|
SessionPlan,
|
|
35
23
|
SessionTool,
|
|
36
24
|
ToolSelection,
|
|
37
|
-
} from "
|
|
38
|
-
import type {
|
|
39
|
-
import type {
|
|
40
|
-
import type {
|
|
25
|
+
} from "../domain/sessions.ts";
|
|
26
|
+
import type { HttpRoute, ListenerAddress } from "../http/listeners.ts";
|
|
27
|
+
import type { Locale } from "../i18n/index.ts";
|
|
28
|
+
import type { Speaker, Tier } from "../identity/speakers.ts";
|
|
29
|
+
import { PluginError } from "../kernel/errors.ts";
|
|
30
|
+
import type { Logger } from "../kernel/log.ts";
|
|
31
|
+
import type {
|
|
32
|
+
DirectChannelProvider,
|
|
33
|
+
DirectChannels,
|
|
34
|
+
} from "../presence/direct-channels.ts";
|
|
35
|
+
import type { ConversationTurns } from "../routing/conversation-turns.ts";
|
|
36
|
+
import type { ToolTiers } from "../runtime/tool-tiers.ts";
|
|
37
|
+
import type { ShellEnv } from "../shared/child-env.ts";
|
|
38
|
+
import type { ToolContribution } from "./define.ts";
|
|
39
|
+
import type { ActionEvent, MemberJoinedEvent } from "./event-types.ts";
|
|
40
|
+
import type { HoldCheck, HoldRule } from "./holds.ts";
|
|
41
41
|
|
|
42
42
|
export type { ActionEvent, MemberJoinedEvent };
|
|
43
43
|
|
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
import type { ExtensionFactory } from "@earendil-works/pi-coding-agent";
|
|
2
|
-
import type { CharacterInput, CharacterSpec } from "
|
|
3
|
-
import type { Agent, AgentGroup } from "
|
|
4
|
-
import type { AvatarMode } from "
|
|
5
|
-
import type { HelperTeam } from "
|
|
6
|
-
import type { RoutingTable } from "
|
|
7
|
-
import type { TeamStatus } from "
|
|
8
|
-
import type { ChannelContexts } from "
|
|
2
|
+
import type { CharacterInput, CharacterSpec } from "../../characters/index.ts";
|
|
3
|
+
import type { Agent, AgentGroup } from "../agents/agent-rules.ts";
|
|
4
|
+
import type { AvatarMode } from "../agents/agent-tools.ts";
|
|
5
|
+
import type { HelperTeam } from "../agents/helper-ops.ts";
|
|
6
|
+
import type { RoutingTable } from "../agents/routes.ts";
|
|
7
|
+
import type { TeamStatus } from "../agents/team-status.ts";
|
|
8
|
+
import type { ChannelContexts } from "../contract/channel-context.ts";
|
|
9
9
|
import type {
|
|
10
10
|
BackgroundRunsAs,
|
|
11
11
|
ScheduledOutcome,
|
|
12
|
-
} from "
|
|
13
|
-
import type { AgentRuntime } from "
|
|
14
|
-
import { type ServiceKey, serviceKey } from "
|
|
15
|
-
import type { ConversationRegistry } from "
|
|
16
|
-
import type { PendingConfirmation } from "
|
|
17
|
-
import type {
|
|
18
|
-
import type {
|
|
19
|
-
import type {
|
|
20
|
-
import type {
|
|
21
|
-
import type {
|
|
22
|
-
import type {
|
|
12
|
+
} from "../contract/channels.ts";
|
|
13
|
+
import type { AgentRuntime } from "../contract/runtime.ts";
|
|
14
|
+
import { type ServiceKey, serviceKey } from "../contract/services.ts";
|
|
15
|
+
import type { ConversationRegistry } from "../conversations/conversation-registry.ts";
|
|
16
|
+
import type { PendingConfirmation } from "../domain/conversation.ts";
|
|
17
|
+
import type { ThinkingLevel, ThinkingSetting } from "../domain/models.ts";
|
|
18
|
+
import type { AgentTurnScope, ChannelKey } from "../domain/sessions.ts";
|
|
19
|
+
import type { HttpRoute } from "../http/listeners.ts";
|
|
20
|
+
import type { IdentityLinks } from "../identity/identity-links.ts";
|
|
21
|
+
import type { IdentityService } from "../identity/identity-service.ts";
|
|
22
|
+
import type { PersonProfiles } from "../identity/profiles.ts";
|
|
23
|
+
import type { Speaker } from "../identity/speakers.ts";
|
|
24
|
+
import type { ConversationModes } from "../modes/conversation-modes.ts";
|
|
23
25
|
import type {
|
|
24
26
|
DelegationJob,
|
|
25
27
|
DelegationOutcome,
|
|
26
|
-
} from "
|
|
28
|
+
} from "../modules/delegation/delegator.ts";
|
|
27
29
|
import type {
|
|
28
30
|
Memory,
|
|
29
31
|
MemoryKind,
|
|
30
32
|
PromptMemory,
|
|
31
|
-
} from "
|
|
33
|
+
} from "../modules/memory/owner-memory-store.ts";
|
|
32
34
|
import type {
|
|
33
35
|
PromptDocuments,
|
|
34
36
|
PromptVersion,
|
|
35
|
-
} from "
|
|
37
|
+
} from "../modules/prompts/prompt-documents.ts";
|
|
36
38
|
import type {
|
|
37
39
|
PrecheckFinding,
|
|
38
40
|
PrecheckRegistry,
|
|
39
|
-
} from "
|
|
41
|
+
} from "../modules/schedules/prechecks.ts";
|
|
40
42
|
import type {
|
|
41
43
|
NewSchedule,
|
|
42
44
|
Schedule,
|
|
43
45
|
ScheduleChange,
|
|
44
|
-
} from "
|
|
45
|
-
import type { SkillRegistry } from "
|
|
46
|
-
import type {
|
|
47
|
-
import type { Speaker } from "./speakers.ts";
|
|
48
|
-
import type { DispatchThreads } from "./threads/dispatch-threads.ts";
|
|
46
|
+
} from "../modules/schedules/schedule-store.ts";
|
|
47
|
+
import type { SkillRegistry } from "../modules/skills/skill-contract.ts";
|
|
48
|
+
import type { DispatchThreads } from "../threads/dispatch-threads.ts";
|
|
49
49
|
|
|
50
50
|
// The services the built-in plugins provide, and the ports they keep to. Each port is an
|
|
51
51
|
// interface, so an object with the same methods satisfies it without being one of the built-in
|
|
@@ -497,4 +497,4 @@ export interface SpeakerMemory {
|
|
|
497
497
|
remove(text: string): Promise<string[]>;
|
|
498
498
|
}
|
|
499
499
|
|
|
500
|
-
export type { SkillRegistry } from "
|
|
500
|
+
export type { SkillRegistry } from "../modules/skills/skill-contract.ts";
|
|
@@ -2,12 +2,19 @@ import {
|
|
|
2
2
|
AttachmentLookupError,
|
|
3
3
|
listAttachments,
|
|
4
4
|
openAttachment,
|
|
5
|
-
} from "
|
|
5
|
+
} from "../attachments/tool-attachment.ts";
|
|
6
|
+
import type { ClientPort } from "../domain/client.ts";
|
|
7
|
+
import type { SessionContext } from "../domain/sessions.ts";
|
|
8
|
+
import { attachReplyFile } from "../shared/reply-files.ts";
|
|
6
9
|
import type { ToolTurn } from "./define.ts";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Thrown by a tool's `run` for a call the model should correct: the message becomes the tool's
|
|
13
|
+
* error result, which the model reads. Any other error fails the call.
|
|
14
|
+
*/
|
|
15
|
+
export class ToolRefusal extends Error {
|
|
16
|
+
override name = "ToolRefusal";
|
|
17
|
+
}
|
|
11
18
|
|
|
12
19
|
/**
|
|
13
20
|
* `port` as a tool sees it in a turn: every call carries the turn's `signal` beside the caller's,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SurfacePort } from "../contract/surface.ts";
|
|
2
2
|
import { parseChannelKey } from "../contract/surface.ts";
|
|
3
3
|
import type { ChannelKey } from "../domain/conversation.ts";
|
|
4
|
-
import type { Logger } from "../log.ts";
|
|
4
|
+
import type { Logger } from "../kernel/log.ts";
|
|
5
5
|
import { splitReply } from "../presentation/reply-splitter.ts";
|
|
6
6
|
import type {
|
|
7
7
|
DirectChannelProvider,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SurfacePort } from "../contract/surface.ts";
|
|
2
2
|
import type { ChannelKey } from "../domain/conversation.ts";
|
|
3
|
-
import type { Logger } from "../log.ts";
|
|
3
|
+
import type { Logger } from "../kernel/log.ts";
|
|
4
4
|
import { deliveryRouter } from "./delivery-router.ts";
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
2
|
import { dirname, join } from "node:path";
|
|
3
3
|
import type { ChatCommand } from "../contract/chat-command.ts";
|
|
4
|
-
import { PluginError } from "../errors.ts";
|
|
4
|
+
import { PluginError } from "../kernel/errors.ts";
|
|
5
5
|
import { packageDir } from "../shared/package-dir.ts";
|
|
6
6
|
|
|
7
7
|
const CHAT_COMMAND_NAME = /^[a-z][a-z0-9_-]*$/;
|
|
@@ -3,10 +3,16 @@ import type { AgentSeed } from "../agents/agent-store.ts";
|
|
|
3
3
|
import type { BackgroundTarget, ChannelClaim } from "../contract/channels.ts";
|
|
4
4
|
import type { ChatCommand } from "../contract/chat-command.ts";
|
|
5
5
|
import type { ChatSurface } from "../contract/surface.ts";
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
import {
|
|
7
|
+
compileSessionPlan,
|
|
8
|
+
type SessionTool,
|
|
9
|
+
type ToolSelection,
|
|
10
|
+
} from "../domain/sessions.ts";
|
|
9
11
|
import type { HttpRoute } from "../http/listeners.ts";
|
|
12
|
+
import { TIERS } from "../identity/speakers.ts";
|
|
13
|
+
import { NotLinkedError, PluginError } from "../kernel/errors.ts";
|
|
14
|
+
import type { ToolContribution } from "../plugin-api/define.ts";
|
|
15
|
+
import { type HoldRule, holdChain } from "../plugin-api/holds.ts";
|
|
10
16
|
import {
|
|
11
17
|
CONTRIBUTION_KEYS,
|
|
12
18
|
type Contribution,
|
|
@@ -21,19 +27,13 @@ import {
|
|
|
21
27
|
refuseRemovedParts,
|
|
22
28
|
refuseRemovedSurfaceMethods,
|
|
23
29
|
type Service,
|
|
24
|
-
} from "../plugin.ts";
|
|
30
|
+
} from "../plugin-api/plugin.ts";
|
|
25
31
|
import {
|
|
26
32
|
type DirectChannelProvider,
|
|
27
33
|
directChannelsPort,
|
|
28
34
|
} from "../presence/direct-channels.ts";
|
|
29
35
|
import { refuseShellTools } from "../runtime/chat-only.ts";
|
|
30
|
-
import {
|
|
31
|
-
compileSessionPlan,
|
|
32
|
-
type SessionTool,
|
|
33
|
-
type ToolSelection,
|
|
34
|
-
} from "../sessions.ts";
|
|
35
|
-
import { TIERS } from "../speakers.ts";
|
|
36
|
-
import type { ToolTierTable } from "../tool-tiers.ts";
|
|
36
|
+
import type { ToolTierTable } from "../runtime/tool-tiers.ts";
|
|
37
37
|
import { ChatCommandSources, claimChatCommand } from "./chat-commands.ts";
|
|
38
38
|
import { ServiceRegistry } from "./services.ts";
|
|
39
39
|
import { surfaceService } from "./surface-service.ts";
|
|
@@ -3,9 +3,9 @@ import type {
|
|
|
3
3
|
Providers,
|
|
4
4
|
ResolvedProviders,
|
|
5
5
|
} from "../contract/providers.ts";
|
|
6
|
-
import { PluginError, ProviderError } from "../errors.ts";
|
|
7
6
|
import { type JudgeModel, ModelJudge } from "../judging/model-judge.ts";
|
|
8
|
-
import
|
|
7
|
+
import { PluginError, ProviderError } from "../kernel/errors.ts";
|
|
8
|
+
import type { RoundtablePlugin } from "../plugin-api/plugin.ts";
|
|
9
9
|
import { nearest } from "./contributions.ts";
|
|
10
10
|
|
|
11
11
|
const SLOTS = [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ServiceKey, Services } from "../contract/services.ts";
|
|
2
|
-
import { NotLinkedError, PluginError } from "../errors.ts";
|
|
3
|
-
import type { RoundtablePlugin } from "../plugin.ts";
|
|
2
|
+
import { NotLinkedError, PluginError } from "../kernel/errors.ts";
|
|
3
|
+
import type { RoundtablePlugin } from "../plugin-api/plugin.ts";
|
|
4
4
|
|
|
5
5
|
/** The host's words for reading a service no plugin declares; `testPlugin` says how to give one instead. */
|
|
6
6
|
const HOST_ADVICE =
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ChatSurface } from "../contract/surface.ts";
|
|
2
|
-
import type { PluginContext, Service } from "../plugin.ts";
|
|
2
|
+
import type { PluginContext, Service } from "../plugin-api/plugin.ts";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The surface as a service: it starts with the router's `handle` as its delivery, which drops
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { InboundMessage } from "../contract/channels.ts";
|
|
2
2
|
import { parseChannelKey } from "../contract/surface.ts";
|
|
3
3
|
import type { ActorFacts } from "../identity/actor-facts.ts";
|
|
4
|
-
import type { Logger } from "../log.ts";
|
|
4
|
+
import type { Logger } from "../kernel/log.ts";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Who wrote the message, as its surface reports them; a surface that reports no `actor` has it
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import type { ChannelKey } from "../domain/sessions.ts";
|
|
2
|
+
import { HostStoppingError } from "../kernel/errors.ts";
|
|
3
3
|
|
|
4
4
|
/** Runs tasks one at a time per channel, in arrival order; different channels run independently. */
|
|
5
5
|
export class ChannelQueue {
|
|
@@ -14,12 +14,12 @@ import {
|
|
|
14
14
|
STEERED_MARK,
|
|
15
15
|
} from "../contract/channels.ts";
|
|
16
16
|
import type { SurfacePort } from "../contract/surface.ts";
|
|
17
|
-
import {
|
|
17
|
+
import type { ChannelKey } from "../domain/sessions.ts";
|
|
18
18
|
import { messages } from "../i18n/index.ts";
|
|
19
19
|
import type { Contact, ContactAssessor } from "../identity/contact.ts";
|
|
20
20
|
import type { IdentityService } from "../identity/identity-service.ts";
|
|
21
|
-
import
|
|
22
|
-
import type {
|
|
21
|
+
import { HostStoppingError, PluginError } from "../kernel/errors.ts";
|
|
22
|
+
import type { Logger } from "../kernel/log.ts";
|
|
23
23
|
import { actorOf } from "./actor-of.ts";
|
|
24
24
|
import { speakerOf } from "./background-speaker.ts";
|
|
25
25
|
import type { ChannelQueue } from "./channel-queue.ts";
|