pi-roundtable 0.20.0 → 0.22.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 +14 -0
- package/docs/plugins.md +65 -7
- package/package.json +1 -1
- package/src/core/builtin/skills.ts +11 -0
- package/src/core/builtin/worker-sessions.ts +44 -0
- package/src/core/config/config.ts +4 -6
- package/src/core/config/skills-config.ts +23 -0
- package/src/core/define-roundtable.ts +8 -0
- package/src/core/discord/card-audience.ts +47 -0
- package/src/core/discord/owner-cards.ts +1 -0
- package/src/core/holds.ts +15 -2
- package/src/core/interactions/prompts.ts +10 -0
- package/src/core/modules/delegation/web-research-worker.ts +10 -38
- package/src/core/modules/delegation/worker-session.ts +111 -0
- package/src/core/modules/skills/package-skills-fixture.ts +33 -0
- package/src/core/modules/skills/package-skills.ts +121 -0
- package/src/core/modules/skills/skill-listing.ts +11 -0
- package/src/core/modules/skills/skill-registry.ts +47 -3
- package/src/core/modules/skills/skill-rules.ts +13 -1
- package/src/core/runtime/extensions/card-ask.ts +3 -0
- package/src/core/runtime/extensions/confirmation-gate.ts +2 -0
- package/src/core/runtime/extensions/gate-refusals.ts +2 -0
- package/src/core/runtime/extensions/hold-lookups.ts +16 -4
- package/src/core/services.ts +44 -1
- package/src/core/testing/surface-contract-support.ts +7 -1
- package/src/core/testing/surface-contract.ts +25 -1
- package/src/index.ts +4 -0
|
@@ -83,6 +83,12 @@ export interface SurfaceContractSubject {
|
|
|
83
83
|
* named-approver checks are skipped.
|
|
84
84
|
*/
|
|
85
85
|
approver?: SurfaceContractAnswerer & { principalId: string };
|
|
86
|
+
/**
|
|
87
|
+
* Set by a surface that honours `ApprovalOptions.speakerOnly` in a shared conversation, where
|
|
88
|
+
* `owner` is on the network and could otherwise answer: the owner's answer to such an approval
|
|
89
|
+
* settles nothing, the person's does. Without it, or without `owner`, the check is skipped.
|
|
90
|
+
*/
|
|
91
|
+
speakerOnly?: boolean;
|
|
86
92
|
/**
|
|
87
93
|
* Set by a surface that serves only conversations private to one person, such as the web chat:
|
|
88
94
|
* it has no shared conversation in which an approval is the named approvers', so it skips that
|
|
@@ -369,6 +375,23 @@ const CHECKS: readonly Check[] = [
|
|
|
369
375
|
run: (running) =>
|
|
370
376
|
answeredOnlyByThem(running, running.subject.owner, "private"),
|
|
371
377
|
},
|
|
378
|
+
{
|
|
379
|
+
name: "an approval that is the speaker's alone is not answered by an owner in a shared conversation",
|
|
380
|
+
applies: (subject) =>
|
|
381
|
+
subject.surface.prompts !== undefined &&
|
|
382
|
+
subject.answer !== undefined &&
|
|
383
|
+
subject.owner !== undefined &&
|
|
384
|
+
subject.speakerOnly === true &&
|
|
385
|
+
subject.privateOnly !== true,
|
|
386
|
+
run: (running) =>
|
|
387
|
+
answeredOnlyByThem(
|
|
388
|
+
running,
|
|
389
|
+
running.subject.owner,
|
|
390
|
+
"shared",
|
|
391
|
+
undefined,
|
|
392
|
+
true,
|
|
393
|
+
),
|
|
394
|
+
},
|
|
372
395
|
{
|
|
373
396
|
name: "a named approver answers an approval instead of the person; the person and another person cannot",
|
|
374
397
|
applies: (subject) =>
|
|
@@ -448,7 +471,8 @@ export async function checkSurfaceContract(
|
|
|
448
471
|
* one its plugin withdraws (`ApprovalOptions.supersede`) as cancelled, ignores
|
|
449
472
|
* another person's answer to the person's approval, and, in a private conversation, an owner's
|
|
450
473
|
* too, and lets an approval above the person's tier there come back at once, shown to no one.
|
|
451
|
-
* Where
|
|
474
|
+
* Where `speakerOnly` is declared, an approval that is the speaker's alone is not settled by an
|
|
475
|
+
* owner's answer in a shared conversation. Where it can name approvers, an approval that does is answered by them, reported as the
|
|
452
476
|
* approver, and not by the person or another person, and a private conversation's is answered by
|
|
453
477
|
* its person alone, whoever the call names besides them. A subject that gives
|
|
454
478
|
* `answerQuestionnaire` must declare `asks`, and then questionnaires keep the same rules. Each
|
package/src/index.ts
CHANGED
|
@@ -39,6 +39,7 @@ export type {
|
|
|
39
39
|
RoundtableConfig,
|
|
40
40
|
TierConfig,
|
|
41
41
|
} from "./core/config/config.ts";
|
|
42
|
+
export type { SkillsConfig } from "./core/config/skills-config.ts";
|
|
42
43
|
export type {
|
|
43
44
|
AttachmentPort,
|
|
44
45
|
AttachmentRefusalCode,
|
|
@@ -309,6 +310,8 @@ export type {
|
|
|
309
310
|
ScheduleStore,
|
|
310
311
|
SkillRegistry,
|
|
311
312
|
SpeakerMemory,
|
|
313
|
+
WorkerSessionRequest,
|
|
314
|
+
WorkerSessions,
|
|
312
315
|
} from "./core/services.ts";
|
|
313
316
|
export {
|
|
314
317
|
AGENTS,
|
|
@@ -322,6 +325,7 @@ export {
|
|
|
322
325
|
RUNTIME,
|
|
323
326
|
SCHEDULES,
|
|
324
327
|
SKILLS,
|
|
328
|
+
WORKER_SESSIONS,
|
|
325
329
|
} from "./core/services.ts";
|
|
326
330
|
export type {
|
|
327
331
|
AgentTurnScope,
|