pi-roundtable 0.22.5 → 0.23.1
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 +61 -1
- package/README.md +35 -9
- package/README.zh-TW.md +51 -13
- package/docs/migrating-0.8.md +2 -2
- package/docs/plugins.md +351 -28
- package/examples/discord-adapter.ts +9 -1
- package/examples/seeds.test.ts +2 -2
- package/examples/seeds.ts +1 -2
- package/package.json +6 -2
- package/src/characters/catalog.ts +1055 -0
- package/src/characters/characters.css +68 -0
- package/src/characters/colors.ts +108 -0
- package/src/characters/compose.ts +281 -0
- package/src/characters/css.ts +63 -0
- package/src/characters/index.ts +33 -0
- package/src/characters/parse.ts +196 -0
- package/src/characters/parts-face.ts +354 -0
- package/src/characters/parts-hair.ts +56 -0
- package/src/characters/parts-hats.ts +57 -0
- package/src/characters/parts-outfits.ts +81 -0
- package/src/characters/parts-props.ts +137 -0
- package/src/characters/spec.ts +224 -0
- package/src/characters/suggest.ts +101 -0
- package/src/cli/checks/characters.ts +23 -0
- package/src/cli/checks/images.ts +5 -3
- package/src/cli/doctor.ts +2 -0
- package/src/core/agents/agent-claim.ts +30 -11
- package/src/core/agents/agent-dashboard.ts +1 -1
- package/src/core/agents/agent-messages.ts +43 -15
- package/src/core/agents/agent-prompt.ts +2 -4
- package/src/core/agents/agent-rules.ts +42 -3
- package/src/core/agents/agent-schema.ts +37 -15
- package/src/core/agents/agent-store.ts +57 -13
- package/src/core/agents/agent-team-fixture.ts +90 -14
- package/src/core/agents/agent-team.ts +83 -50
- package/src/core/agents/agent-tools.ts +94 -41
- package/src/core/agents/avatar-studio.ts +40 -4
- package/src/core/agents/character-png.ts +40 -0
- package/src/core/agents/group-messages.ts +7 -4
- package/src/core/agents/group-turns.ts +27 -14
- package/src/core/agents/team-editing.ts +99 -58
- package/src/core/agents/team-keys.ts +177 -11
- package/src/core/agents/team-lifecycle.ts +151 -84
- package/src/core/agents/team-options.ts +13 -6
- package/src/core/agents/team-status.ts +31 -13
- package/src/core/agents/team-text.ts +13 -3
- package/src/core/agents/team-turn-types.ts +25 -7
- package/src/core/agents/team-turns.ts +143 -28
- package/src/core/attachments/attachment-fetcher.ts +162 -64
- package/src/core/attachments/prompt-block.ts +7 -1
- package/src/core/attachments/tool-attachment.ts +20 -1
- package/src/core/attachments/turn-attachments.ts +18 -2
- package/src/core/builtin/agent-server.ts +103 -40
- package/src/core/builtin/discord.ts +4 -17
- package/src/core/builtin/modules.ts +6 -5
- package/src/core/builtin/threads.ts +37 -0
- package/src/core/config/agent-team.ts +43 -0
- package/src/core/config/config.ts +50 -59
- package/src/core/config/limits.ts +93 -0
- package/src/core/config/ops.ts +34 -0
- package/src/core/config/schema.ts +26 -0
- package/src/core/contract/channels.ts +20 -0
- package/src/core/contract/surface.ts +77 -7
- package/src/core/define-roundtable.ts +70 -42
- package/src/core/discord/agent-commands.ts +108 -86
- package/src/core/discord/agent-panel.ts +11 -2
- package/src/core/discord/connection.ts +1 -1
- package/src/core/discord/discord-surface.ts +10 -1
- package/src/core/discord/dispatch-thread-host.ts +1 -1
- package/src/core/domain/conversation.ts +24 -0
- package/src/core/holds.ts +221 -15
- package/src/core/host-registration.ts +2 -1
- package/src/core/http/listeners.ts +63 -3
- package/src/core/i18n/agent-panel.ts +14 -21
- package/src/core/interactions/prompts.ts +12 -0
- package/src/core/modes/autonomy.ts +23 -0
- package/src/core/modes/conversation-modes.ts +213 -0
- package/src/core/modes/modes-plugin.ts +24 -0
- package/src/core/modules/delegation/delegator.ts +4 -4
- package/src/core/modules/host-shell/shell-arithmetic.ts +81 -0
- package/src/core/modules/host-shell/shell-lexer-types.ts +53 -0
- package/src/core/modules/host-shell/shell-lexer.ts +493 -0
- package/src/core/modules/host-shell/shell-paths.ts +85 -4
- package/src/core/modules/host-shell/shell-policy.ts +341 -332
- package/src/core/modules/host-shell/shell-programs.ts +298 -0
- package/src/core/modules/host-shell/shell-quoting.ts +237 -0
- package/src/core/modules/host-shell/shell-scripts.ts +114 -0
- package/src/core/modules/host-shell/shell-wrappers.ts +104 -0
- package/src/core/modules/schedules/precheck-tools.ts +17 -0
- package/src/core/modules/schedules/schedules.ts +9 -3
- package/src/core/plugin.ts +8 -1
- package/src/core/presence/direct-channels.ts +30 -0
- package/src/core/presentation/reply-body.ts +25 -0
- package/src/core/registry/contributions.ts +31 -7
- package/src/core/registry/providers.ts +1 -1
- package/src/core/routing/conversation-turns.ts +2 -15
- package/src/core/routing/surface-port.ts +5 -1
- package/src/core/runtime/extensions/approval-card.ts +1 -5
- package/src/core/runtime/extensions/approval-fields.ts +3 -7
- package/src/core/runtime/extensions/confirmation-gate-extension.ts +13 -2
- package/src/core/runtime/extensions/confirmation-gate.ts +41 -40
- package/src/core/runtime/extensions/gate-refusals.ts +23 -0
- package/src/core/runtime/extensions/held-calls.ts +16 -1
- package/src/core/runtime/extensions/hold-describer.ts +58 -8
- package/src/core/runtime/extensions/hold-lookups.ts +19 -19
- package/src/core/runtime/extensions/yolo.ts +105 -0
- package/src/core/runtime/pi-agent-runtime.ts +3 -5
- package/src/core/runtime/runtime-plugin.ts +42 -1
- package/src/core/runtime/runtime-types.ts +11 -0
- package/src/core/runtime/turn-budget.ts +32 -5
- package/src/core/runtime/turn-limits.ts +14 -3
- package/src/core/services.ts +61 -9
- package/src/core/shared/attachment-reader.ts +6 -0
- package/src/core/shared/unix-server.ts +10 -1
- package/src/core/testing/modules.ts +12 -8
- package/src/core/testing/surface-threads.ts +58 -0
- package/src/core/testing/thread-host.ts +17 -5
- package/src/core/threads/dispatch-threads.ts +299 -0
- package/src/core/threads/host-threads.ts +19 -0
- package/src/core/tool-set.snapshot.json +5 -0
- package/src/index.ts +27 -1
- package/src/kit/characters.ts +5 -0
- package/src/kit/index.ts +2 -0
- package/src/kit/shell.ts +1 -0
- package/src/kit/support.ts +1 -1
- package/src/kit/threads.ts +1 -1
- package/src/testing.ts +4 -0
- package/templates/agents.ts +1 -1
- package/src/core/discord/dispatch-threads.ts +0 -194
|
@@ -10,7 +10,15 @@ export function withDiscordAdapter(
|
|
|
10
10
|
dataDir: string,
|
|
11
11
|
): RoundtableConfig {
|
|
12
12
|
return {
|
|
13
|
-
|
|
13
|
+
access: {
|
|
14
|
+
owners: [
|
|
15
|
+
{
|
|
16
|
+
name: env("OWNER_NAME"),
|
|
17
|
+
principal: env("OWNER_ID"),
|
|
18
|
+
identities: [`discord:${env("OWNER_ID")}`],
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
},
|
|
14
22
|
adapters: [
|
|
15
23
|
discord({
|
|
16
24
|
token: env("DISCORD_TOKEN"),
|
package/examples/seeds.test.ts
CHANGED
|
@@ -2,11 +2,11 @@ import { expect, test } from "bun:test";
|
|
|
2
2
|
import { testPlugin } from "pi-roundtable/testing";
|
|
3
3
|
import { library } from "./seeds.ts";
|
|
4
4
|
|
|
5
|
-
test("the plugin seeds one agent with a name, a prompt, and
|
|
5
|
+
test("the plugin seeds one agent with a name, a prompt, and a character", async () => {
|
|
6
6
|
const harness = await testPlugin(library);
|
|
7
7
|
expect(harness.contribution.seeds?.map((seed) => seed.name)).toEqual([
|
|
8
8
|
"librarian",
|
|
9
9
|
]);
|
|
10
|
-
expect(harness.contribution.seeds?.[0]?.
|
|
10
|
+
expect(harness.contribution.seeds?.[0]?.character?.class).toBe("scholar");
|
|
11
11
|
await harness.stop();
|
|
12
12
|
});
|
package/examples/seeds.ts
CHANGED
|
@@ -10,8 +10,7 @@ export const library = definePlugin({
|
|
|
10
10
|
displayName: "Librarian",
|
|
11
11
|
prompt:
|
|
12
12
|
"You keep the team's reading list. Answer briefly and cite what you were given.",
|
|
13
|
-
|
|
14
|
-
"A calm librarian with round glasses and a stack of books",
|
|
13
|
+
character: { class: "scholar", palette: "azure" },
|
|
15
14
|
},
|
|
16
15
|
],
|
|
17
16
|
}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-roundtable",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.1",
|
|
4
4
|
"description": "A plugin-driven Pi agent server for one owner, reached through Discord or the web",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,7 +17,9 @@
|
|
|
17
17
|
".": "./src/index.ts",
|
|
18
18
|
"./testing": "./src/testing.ts",
|
|
19
19
|
"./kit": "./src/kit/index.ts",
|
|
20
|
-
"./discord": "./src/discord/index.ts"
|
|
20
|
+
"./discord": "./src/discord/index.ts",
|
|
21
|
+
"./characters": "./src/characters/index.ts",
|
|
22
|
+
"./characters.css": "./src/characters/characters.css"
|
|
21
23
|
},
|
|
22
24
|
"bin": {
|
|
23
25
|
"roundtable": "src/cli/roundtable.mjs"
|
|
@@ -26,11 +28,13 @@
|
|
|
26
28
|
"src",
|
|
27
29
|
"!src/**/*.test.ts",
|
|
28
30
|
"!src/core/testing/file-size.ts",
|
|
31
|
+
"!src/core/modules/host-shell/shell-fuzz-*.ts",
|
|
29
32
|
"!src/core/testing/discord-limits.ts",
|
|
30
33
|
"!src/core/testing/prompt-capture*.ts",
|
|
31
34
|
"!src/core/testing/discord-api-emulator*.ts",
|
|
32
35
|
"!src/core/discord/poster/poster-contract*.ts",
|
|
33
36
|
"!src/core/testing/fixtures",
|
|
37
|
+
"!src/characters/fixtures",
|
|
34
38
|
"!src/prompt-text.snapshot.json",
|
|
35
39
|
"!src/cli/testing",
|
|
36
40
|
"templates",
|