pi-roundtable 0.25.0 → 0.26.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.
Files changed (62) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/docs/plugins.md +156 -6
  3. package/package.json +1 -1
  4. package/src/cli/checks/agent-tools.ts +23 -0
  5. package/src/cli/doctor.ts +6 -0
  6. package/src/cli/principal.ts +9 -2
  7. package/src/core/agents/agent-prompt.ts +6 -1
  8. package/src/core/agents/agent-team.ts +2 -0
  9. package/src/core/agents/team-editing.ts +4 -0
  10. package/src/core/agents/team-options.ts +3 -1
  11. package/src/core/agents/team-selection.ts +6 -2
  12. package/src/core/builtin/agent-server.ts +1 -0
  13. package/src/core/builtin/channel-context.ts +21 -0
  14. package/src/core/builtin/discord.ts +4 -1
  15. package/src/core/config/config-schema.ts +22 -6
  16. package/src/core/config/config.ts +38 -2
  17. package/src/core/config/conversations.ts +40 -0
  18. package/src/core/config/profiles.ts +53 -0
  19. package/src/core/contract/channel-context.ts +106 -0
  20. package/src/core/contract/surface.ts +16 -0
  21. package/src/core/conversations/conversation-registry.ts +6 -0
  22. package/src/core/conversations/conversation-retention.ts +123 -0
  23. package/src/core/conversations/conversation-store.ts +6 -0
  24. package/src/core/conversations/conversations-plugin.ts +25 -3
  25. package/src/core/define-roundtable.ts +13 -2
  26. package/src/core/discord/channel-context.ts +47 -78
  27. package/src/core/discord/discord-surface.ts +16 -0
  28. package/src/core/events.ts +1 -0
  29. package/src/core/holds.ts +9 -0
  30. package/src/core/host-registration.ts +4 -0
  31. package/src/core/host.ts +3 -1
  32. package/src/core/identity/actor-facts.ts +7 -0
  33. package/src/core/identity/identity-plugin.ts +27 -5
  34. package/src/core/identity/identity-port.ts +62 -0
  35. package/src/core/identity/identity-schema.ts +2 -0
  36. package/src/core/identity/identity-service.ts +45 -52
  37. package/src/core/identity/identity-view.ts +1 -0
  38. package/src/core/identity/person-profiles.ts +275 -0
  39. package/src/core/identity/principal-tables.ts +10 -0
  40. package/src/core/identity/profile-choices.ts +45 -0
  41. package/src/core/identity/profile-memory.ts +65 -0
  42. package/src/core/identity/profile-picture.ts +117 -0
  43. package/src/core/identity/profiles-view.ts +20 -0
  44. package/src/core/identity/profiles.ts +82 -0
  45. package/src/core/modules/host-shell/shell-policy.ts +18 -3
  46. package/src/core/plugin.ts +40 -0
  47. package/src/core/registry/contributions.ts +8 -1
  48. package/src/core/runtime/chat-only.ts +32 -0
  49. package/src/core/runtime/conversation-sessions.ts +2 -1
  50. package/src/core/runtime/extensions/confirmation-gate.ts +5 -9
  51. package/src/core/runtime/extensions/gate-refusals.ts +32 -0
  52. package/src/core/runtime/extensions/hold-lookups.ts +10 -2
  53. package/src/core/runtime/extensions/late-answer.ts +5 -2
  54. package/src/core/runtime/runtime-plugin.ts +1 -0
  55. package/src/core/runtime/runtime-types.ts +3 -1
  56. package/src/core/runtime/session-factory.ts +19 -30
  57. package/src/core/runtime/session-helpers.ts +27 -0
  58. package/src/core/services.ts +9 -0
  59. package/src/index.ts +18 -0
  60. package/src/kit/index.ts +1 -0
  61. package/src/kit/oidc.ts +16 -0
  62. package/src/testing.ts +1 -0
package/src/index.ts CHANGED
@@ -47,7 +47,9 @@ export type {
47
47
  RoundtableConfig,
48
48
  TierConfig,
49
49
  } from "./core/config/config.ts";
50
+ export type { ConversationsConfig } from "./core/config/conversations.ts";
50
51
  export type { LimitsConfig } from "./core/config/limits.ts";
52
+ export type { ProfilesConfig } from "./core/config/profiles.ts";
51
53
  export type { SkillsConfig } from "./core/config/skills-config.ts";
52
54
  export type {
53
55
  AttachmentPort,
@@ -58,6 +60,12 @@ export type {
58
60
  TurnAttachmentOptions,
59
61
  } from "./core/contract/attachments.ts";
60
62
  export { AttachmentRefusal } from "./core/contract/attachments.ts";
63
+ export type {
64
+ ChannelContextSource,
65
+ ChannelContextSourceAttachment,
66
+ ChannelContexts,
67
+ ChannelContextVerdict,
68
+ } from "./core/contract/channel-context.ts";
61
69
  export type {
62
70
  Admission,
63
71
  AttachmentContent,
@@ -213,6 +221,12 @@ export type {
213
221
  RoleSource,
214
222
  } from "./core/identity/principal-store.ts";
215
223
  export { SYSTEM_PRINCIPAL } from "./core/identity/principal-store.ts";
224
+ export type {
225
+ PersonDisplay,
226
+ PersonProfiles,
227
+ ProfileRules,
228
+ ProfileSource,
229
+ } from "./core/identity/profiles.ts";
216
230
  export type {
217
231
  Approval,
218
232
  ApprovalDetails,
@@ -306,6 +320,8 @@ export type {
306
320
  } from "./core/modules/skills/skill-rules.ts";
307
321
  export { SkillConflictError } from "./core/modules/skills/skill-rules.ts";
308
322
  export type {
323
+ ActionEvent,
324
+ AgentTools,
309
325
  Contribution,
310
326
  EventHandlers,
311
327
  EventSink,
@@ -360,6 +376,7 @@ export type {
360
376
  export {
361
377
  AGENTS,
362
378
  BACKGROUND_TURNS,
379
+ CHANNEL_CONTEXT,
363
380
  CONVERSATIONS,
364
381
  DELEGATION,
365
382
  IDENTITY,
@@ -367,6 +384,7 @@ export {
367
384
  MEMORY,
368
385
  MODES,
369
386
  PRECHECKS,
387
+ PROFILES,
370
388
  PROMPTS,
371
389
  RUNTIME,
372
390
  SCHEDULES,
package/src/kit/index.ts CHANGED
@@ -116,6 +116,7 @@ export {
116
116
  SCHEDULE_TOOLS,
117
117
  scheduleToolSpecs,
118
118
  } from "./mirror.ts";
119
+ export { oidcIdentity, oidcProvider } from "./oidc.ts";
119
120
  export type {
120
121
  OpsAlertKind,
121
122
  OpsAlertsOptions,
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The identity provider of an OpenID issuer, as `access.owners[].identities`, `selfLink.providers`
3
+ * and `ActorFacts.provider` write it: `oidc:<base64url(issuer)>`. The issuer is encoded so its own
4
+ * colons stay apart from the subject's.
5
+ */
6
+ export function oidcProvider(issuer: string): string {
7
+ return `oidc:${Buffer.from(issuer).toString("base64url")}`;
8
+ }
9
+
10
+ /**
11
+ * The identity of one OpenID subject, `oidcProvider(issuer)` and the subject: the form
12
+ * `roundtable principal link` and `access.owners[].identities` take, and the 0.8 web speaker id.
13
+ */
14
+ export function oidcIdentity(issuer: string, subject: string): string {
15
+ return `${oidcProvider(issuer)}:${subject}`;
16
+ }
package/src/testing.ts CHANGED
@@ -455,6 +455,7 @@ export async function testPlugin(
455
455
  timeZone: "UTC",
456
456
  now: () => new Date(),
457
457
  characterSkins: CATALOG.skins,
458
+ agentTools: "full",
458
459
  ...options.env,
459
460
  };
460
461
  // What the agent server does with the slot: the provider's runtime serves `context.turns`.