@jmfederico/pi-web 1.202607.2 → 1.202607.3
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/dist/client/assets/{CodeViewer-B4M13447.js → CodeViewer-CDVbMiN9.js} +1 -1
- package/dist/client/assets/{TerminalPanel-Bmvj-Ecn.js → TerminalPanel-CTS1CgqF.js} +2 -2
- package/dist/client/assets/{UnifiedDiffViewer-C0hygwRo.js → UnifiedDiffViewer-Cqke12ZX.js} +1 -1
- package/dist/client/assets/index-LME0LfPb.js +4068 -0
- package/dist/client/index.html +1 -1
- package/dist/config.js +39 -0
- package/dist/config.js.map +1 -1
- package/dist/pi-web-plugins/info/infoInternals.js +208 -0
- package/dist/pi-web-plugins/info/pi-web-plugin.js +12 -15
- package/dist/pi-web-plugins/relays/markdownDocument.js +81 -0
- package/dist/pi-web-plugins/relays/package.json +9 -0
- package/dist/pi-web-plugins/relays/pi-web-plugin.js +44 -0
- package/dist/pi-web-plugins/relays/relayDiscovery.js +96 -0
- package/dist/pi-web-plugins/relays/relaysPanelElement.js +393 -0
- package/dist/pi-web-plugins/relays/vendor/README.md +24 -0
- package/dist/pi-web-plugins/relays/vendor/marked.esm.js +76 -0
- package/dist/plugin-api.d.ts +7 -1
- package/dist/server/configRoutes.js +11 -0
- package/dist/server/configRoutes.js.map +1 -1
- package/dist/server/sessiond/sessionServiceDependencies.js +32 -0
- package/dist/server/sessiond/sessionServiceDependencies.js.map +1 -0
- package/dist/server/sessiond.js +122 -114
- package/dist/server/sessiond.js.map +1 -1
- package/dist/server/sessions/askUserTool.js +105 -0
- package/dist/server/sessions/askUserTool.js.map +1 -0
- package/dist/server/sessions/extensionDialogWaiters.js +76 -0
- package/dist/server/sessions/extensionDialogWaiters.js.map +1 -0
- package/dist/server/sessions/globalProviderPolicy.js +79 -10
- package/dist/server/sessions/globalProviderPolicy.js.map +1 -1
- package/dist/server/sessions/modelCatalogRefresher.js +8 -0
- package/dist/server/sessions/modelCatalogRefresher.js.map +1 -1
- package/dist/server/sessions/parentSessionLocator.js +75 -0
- package/dist/server/sessions/parentSessionLocator.js.map +1 -0
- package/dist/server/sessions/pendingAskStore.js +278 -0
- package/dist/server/sessions/pendingAskStore.js.map +1 -0
- package/dist/server/sessions/pendingExtensionDialogStore.js +196 -0
- package/dist/server/sessions/pendingExtensionDialogStore.js.map +1 -0
- package/dist/server/sessions/piSessionService.js +504 -44
- package/dist/server/sessions/piSessionService.js.map +1 -1
- package/dist/server/sessions/sessionFileHeader.js +45 -0
- package/dist/server/sessions/sessionFileHeader.js.map +1 -0
- package/dist/server/sessions/sessionRoutes.js +99 -2
- package/dist/server/sessions/sessionRoutes.js.map +1 -1
- package/dist/server/sessions/spawnTargetResolver.js +3 -16
- package/dist/server/sessions/spawnTargetResolver.js.map +1 -1
- package/dist/server/workspaces/gitWorktreeDiscovery.js +9 -0
- package/dist/server/workspaces/gitWorktreeDiscovery.js.map +1 -1
- package/dist/server/workspaces/projectWorkspaceCwds.js +22 -0
- package/dist/server/workspaces/projectWorkspaceCwds.js.map +1 -0
- package/dist/server/workspaces/workspaceService.js +15 -2
- package/dist/server/workspaces/workspaceService.js.map +1 -1
- package/dist/shared/activity.js +9 -1
- package/dist/shared/activity.js.map +1 -1
- package/dist/shared/apiTypes.d.ts +294 -1
- package/dist/shared/apiTypes.js +24 -0
- package/dist/shared/apiTypes.js.map +1 -1
- package/dist/shared/capabilities.js +3 -0
- package/dist/shared/capabilities.js.map +1 -1
- package/dist/shared/federatedRoutes.js +4 -0
- package/dist/shared/federatedRoutes.js.map +1 -1
- package/docs/config.md +56 -7
- package/docs/plugins.md +77 -11
- package/package.json +2 -1
- package/dist/client/assets/index-TvPsRyS1.js +0 -3545
- package/dist/server/sessiond/sessionDaemonStartup.js +0 -49
- package/dist/server/sessiond/sessionDaemonStartup.js.map +0 -1
- package/dist/server/sessions/sessionArchiveMigration.js +0 -590
- package/dist/server/sessions/sessionArchiveMigration.js.map +0 -1
|
@@ -9,6 +9,7 @@ export declare const PI_WEB_CAPABILITIES: {
|
|
|
9
9
|
readonly sessionsPersistedState: "sessions.persistedState";
|
|
10
10
|
readonly sessionsNotifications: "sessions.notifications";
|
|
11
11
|
readonly sessionsUnread: "sessions.unread";
|
|
12
|
+
readonly sessionsAskUser: "sessions.askUser";
|
|
12
13
|
readonly promptAttachments: "prompt.attachments";
|
|
13
14
|
readonly workspaceFileSuggestions: "workspace.fileSuggestions";
|
|
14
15
|
readonly piPackagesManage: "piPackages.manage";
|
|
@@ -86,6 +87,18 @@ export interface PiWebConfigValues {
|
|
|
86
87
|
* while the capability stabilizes. Requires spawnSessions to be enabled.
|
|
87
88
|
*/
|
|
88
89
|
subsessions?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* When true, LLMs can post a question set to the browser via the ask_user
|
|
92
|
+
* tool. On by default; set to `false` to remove the tool from the runtime.
|
|
93
|
+
*/
|
|
94
|
+
askUser?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* How long an extension dialog may wait for an answer before the daemon
|
|
97
|
+
* auto-cancels it, in milliseconds. Applies only when the extension set no
|
|
98
|
+
* `timeout` of its own (the sooner of the two wins); `0` waits forever.
|
|
99
|
+
* Tuning knob only — extension dialogs are always enabled.
|
|
100
|
+
*/
|
|
101
|
+
extensionDialogsTimeoutMs?: number;
|
|
89
102
|
/** Desired Pi-compatible agent profile and companion CLI (Pi by default). */
|
|
90
103
|
agent?: PiWebAgentConfig;
|
|
91
104
|
}
|
|
@@ -137,6 +150,7 @@ export interface PiWebConfigEnvOverrides {
|
|
|
137
150
|
allowedHosts: boolean;
|
|
138
151
|
spawnSessions: boolean;
|
|
139
152
|
subsessions: boolean;
|
|
153
|
+
askUser: boolean;
|
|
140
154
|
agentCommand: boolean;
|
|
141
155
|
agentDir: boolean;
|
|
142
156
|
/** The configured directory environment source, even when Pi compatibility is inactive for the desired command. */
|
|
@@ -295,6 +309,21 @@ export interface SessionInfo extends SessionRef {
|
|
|
295
309
|
messageCount: number;
|
|
296
310
|
firstMessage: string;
|
|
297
311
|
parentSessionPath?: string;
|
|
312
|
+
/**
|
|
313
|
+
* Working directory of the parent session, read from the parent session file
|
|
314
|
+
* header. Only populated when the parent is outside this listing's cwd, so a
|
|
315
|
+
* child whose parent lives in another worktree can point at it instead of
|
|
316
|
+
* only reporting that the parent is unavailable here.
|
|
317
|
+
*/
|
|
318
|
+
parentSessionCwd?: string;
|
|
319
|
+
/** Session id of an out-of-cwd parent, so the browser can select it after switching workspace. */
|
|
320
|
+
parentSessionId?: string;
|
|
321
|
+
/**
|
|
322
|
+
* Number of sessions in other workspaces of the same project that record this
|
|
323
|
+
* session as their parent. Only set when non-zero, so a parent can show that
|
|
324
|
+
* it has children which are not nested beneath it in this workspace.
|
|
325
|
+
*/
|
|
326
|
+
childSessionsElsewhere?: number;
|
|
298
327
|
archived?: boolean;
|
|
299
328
|
archivedAt?: string;
|
|
300
329
|
}
|
|
@@ -365,11 +394,249 @@ export interface SessionActivity {
|
|
|
365
394
|
label: string;
|
|
366
395
|
detail?: string;
|
|
367
396
|
at: string;
|
|
397
|
+
/**
|
|
398
|
+
* Set only on the startup window's own reports. A startup phase is genuinely
|
|
399
|
+
* in progress, so it is published as `active` and rendered like any other
|
|
400
|
+
* activity, but *starting* a session is not *working* in it: there is nothing
|
|
401
|
+
* to stop, nothing that blocks reloading from disk, and no workspace-level
|
|
402
|
+
* work to report. `isSessionActive()` reads this to keep the two apart.
|
|
403
|
+
*/
|
|
404
|
+
startup?: boolean;
|
|
368
405
|
}
|
|
369
406
|
export interface QueuedSessionMessage {
|
|
370
407
|
kind: "steer" | "followUp";
|
|
371
408
|
text: string;
|
|
372
409
|
}
|
|
410
|
+
/**
|
|
411
|
+
* `customType` of the follow-up custom message that carries a closed ask back to
|
|
412
|
+
* the model and into the transcript. Its `details` are an {@link AskUserOutcome}.
|
|
413
|
+
*/
|
|
414
|
+
export declare const ASK_USER_ANSWERS_CUSTOM_TYPE = "pi-web.ask.answers";
|
|
415
|
+
/** Largest question set one `ask_user` call may post. */
|
|
416
|
+
export declare const ASK_USER_QUESTION_LIMIT = 20;
|
|
417
|
+
/** Largest option list one question may offer. */
|
|
418
|
+
export declare const ASK_USER_OPTION_LIMIT = 12;
|
|
419
|
+
/** Length bound for ids: the ask id, question ids, and option values. */
|
|
420
|
+
export declare const ASK_USER_ID_MAX_LENGTH = 128;
|
|
421
|
+
/** Length bound for model-authored prose: questions, details, and option labels. */
|
|
422
|
+
export declare const ASK_USER_TEXT_MAX_LENGTH = 1000;
|
|
423
|
+
/** Length bound for the free text a user types as a custom answer. */
|
|
424
|
+
export declare const ASK_USER_OTHER_TEXT_MAX_LENGTH = 4000;
|
|
425
|
+
/** One selectable option of an {@link AskUserQuestion}. */
|
|
426
|
+
export interface AskUserQuestionOption {
|
|
427
|
+
/** Stable machine value reported back to the model. */
|
|
428
|
+
value: string;
|
|
429
|
+
/** Short human label rendered in the browser. */
|
|
430
|
+
label: string;
|
|
431
|
+
/** Optional clarifying line rendered under the label. */
|
|
432
|
+
detail?: string;
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* One question of an `ask_user` set. Questions are never required: the user may
|
|
436
|
+
* submit while leaving any of them untouched, and unanswered questions are
|
|
437
|
+
* reported to the model as such.
|
|
438
|
+
*/
|
|
439
|
+
export interface AskUserQuestion {
|
|
440
|
+
/** Unique within the ask; used as the answer key. */
|
|
441
|
+
id: string;
|
|
442
|
+
/** The question itself, as one plain-text line. */
|
|
443
|
+
question: string;
|
|
444
|
+
/** Optional supporting context rendered under the question. */
|
|
445
|
+
detail?: string;
|
|
446
|
+
/** Offered options; may be empty when only free text makes sense. */
|
|
447
|
+
options: AskUserQuestionOption[];
|
|
448
|
+
/**
|
|
449
|
+
* Compatibility marker for older clients. Canonical questions set this to
|
|
450
|
+
* true because every question offers a custom free-text answer.
|
|
451
|
+
*/
|
|
452
|
+
allowOther?: boolean;
|
|
453
|
+
/** When true, several options may be selected at once. */
|
|
454
|
+
multiple?: boolean;
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* The open, unanswered question set of a session. Daemon-owned and reported in
|
|
458
|
+
* {@link SessionStatus}, so a reconnecting or reloading browser rehydrates it
|
|
459
|
+
* without depending on having seen the `ask.opened` event.
|
|
460
|
+
*/
|
|
461
|
+
export interface PendingAskUser {
|
|
462
|
+
askId: string;
|
|
463
|
+
askedAt: string;
|
|
464
|
+
questions: AskUserQuestion[];
|
|
465
|
+
}
|
|
466
|
+
/** Why an ask stopped being the session's open ask. */
|
|
467
|
+
export type AskUserCloseReason = "submitted" | "superseded" | "cancelled";
|
|
468
|
+
/**
|
|
469
|
+
* What the user replied to one question. Absent from a submission means the
|
|
470
|
+
* question was left untouched; an empty `values` with no `otherText` means the
|
|
471
|
+
* same thing.
|
|
472
|
+
*/
|
|
473
|
+
export interface AskUserAnswer {
|
|
474
|
+
/** Matches an {@link AskUserQuestion.id} of the open ask. */
|
|
475
|
+
id: string;
|
|
476
|
+
/** Selected {@link AskUserQuestionOption.value} entries; several only when the question allows it. */
|
|
477
|
+
values: string[];
|
|
478
|
+
/** Free text typed as the question's custom answer. */
|
|
479
|
+
otherText?: string;
|
|
480
|
+
}
|
|
481
|
+
/** One submit of the open ask: answers for some or all of its questions. */
|
|
482
|
+
export interface AskUserSubmission {
|
|
483
|
+
answers: AskUserAnswer[];
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* One question of a closed ask paired with what came back for it. Carries the
|
|
487
|
+
* question itself so the record renders without the original ask still existing.
|
|
488
|
+
*/
|
|
489
|
+
export interface AskUserQuestionRecord {
|
|
490
|
+
question: AskUserQuestion;
|
|
491
|
+
/** True when at least one option was selected or custom text was given. */
|
|
492
|
+
answered: boolean;
|
|
493
|
+
values: string[];
|
|
494
|
+
otherText?: string;
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* The complete result of an ask, computed when it closes. Shared by the
|
|
498
|
+
* model-facing follow-up message and the browser's read-only record, so both
|
|
499
|
+
* report the same answered and unanswered questions.
|
|
500
|
+
*/
|
|
501
|
+
export interface AskUserOutcome {
|
|
502
|
+
askId: string;
|
|
503
|
+
reason: AskUserCloseReason;
|
|
504
|
+
askedAt: string;
|
|
505
|
+
closedAt: string;
|
|
506
|
+
questions: AskUserQuestionRecord[];
|
|
507
|
+
answeredCount: number;
|
|
508
|
+
/** Ids of the questions left unanswered, in the order they were asked. */
|
|
509
|
+
unansweredIds: string[];
|
|
510
|
+
/** One line, for example `Answered 3 of 5; unanswered: q2, q5`. */
|
|
511
|
+
summary: string;
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* Result of the browser closing an ask by submitting or cancelling it.
|
|
515
|
+
*
|
|
516
|
+
* `"stale"` is an ordinary race rather than an error: the named ask was already
|
|
517
|
+
* submitted, superseded by a newer one, or gone with its session runtime. The
|
|
518
|
+
* browser drops its card and trusts `sessionStatus`, which is returned in both
|
|
519
|
+
* cases so closing an ask needs no follow-up status request.
|
|
520
|
+
*/
|
|
521
|
+
export interface AskUserCloseResponse {
|
|
522
|
+
result: "closed" | "stale";
|
|
523
|
+
/** Present only when this call is the one that closed the ask. */
|
|
524
|
+
outcome?: AskUserOutcome;
|
|
525
|
+
sessionStatus: SessionStatus;
|
|
526
|
+
}
|
|
527
|
+
/** Length bound for extension-dialog ids. */
|
|
528
|
+
export declare const EXTENSION_DIALOG_ID_MAX_LENGTH = 128;
|
|
529
|
+
/** Length bound for extension-authored dialog prose: titles, messages, options, placeholders. */
|
|
530
|
+
export declare const EXTENSION_DIALOG_TEXT_MAX_LENGTH = 1000;
|
|
531
|
+
/** Largest option list one `select` dialog may offer. */
|
|
532
|
+
export declare const EXTENSION_DIALOG_OPTION_LIMIT = 24;
|
|
533
|
+
/** Length bound for the text a user types into an `input` dialog. */
|
|
534
|
+
export declare const EXTENSION_DIALOG_INPUT_MAX_LENGTH = 4000;
|
|
535
|
+
/** Which extension UI dialog primitive a pending dialog belongs to. */
|
|
536
|
+
export type ExtensionDialogKind = "confirm" | "select" | "input";
|
|
537
|
+
/**
|
|
538
|
+
* The value a user gave in an extension dialog: a boolean for `confirm`, the
|
|
539
|
+
* chosen option for `select`, the typed text for `input`. Absent when the
|
|
540
|
+
* dialog closed without an answer.
|
|
541
|
+
*/
|
|
542
|
+
export type ExtensionDialogAnswer = boolean | string;
|
|
543
|
+
/**
|
|
544
|
+
* Why a dialog stopped being open. `"answered"` carries an
|
|
545
|
+
* {@link ExtensionDialogAnswer}; every other reason is a close without one.
|
|
546
|
+
*/
|
|
547
|
+
export type ExtensionDialogCloseReason = "answered" | "cancelled" | "timeout" | "aborted" | "session-ended";
|
|
548
|
+
/**
|
|
549
|
+
* One open extension dialog of a session, opened by `ctx.ui.confirm()`,
|
|
550
|
+
* `ctx.ui.select()`, or `ctx.ui.input()`. Daemon-owned and reported in
|
|
551
|
+
* {@link SessionStatus.pendingDialogs}, so a reconnecting or reloading browser
|
|
552
|
+
* rehydrates it without depending on having seen the `dialog.opened` event.
|
|
553
|
+
*
|
|
554
|
+
* Unlike asks, several dialogs may be open per session at once: each dialog is
|
|
555
|
+
* an independent blocking wait inside extension code, so opening never
|
|
556
|
+
* supersedes an existing one.
|
|
557
|
+
*/
|
|
558
|
+
export interface PendingExtensionDialog {
|
|
559
|
+
dialogId: string;
|
|
560
|
+
kind: ExtensionDialogKind;
|
|
561
|
+
title: string;
|
|
562
|
+
/** Supporting line of a `confirm` dialog. */
|
|
563
|
+
message?: string;
|
|
564
|
+
/** Offered choices of a `select` dialog. */
|
|
565
|
+
options?: string[];
|
|
566
|
+
/** Placeholder text of an `input` dialog. */
|
|
567
|
+
placeholder?: string;
|
|
568
|
+
askedAt: string;
|
|
569
|
+
/**
|
|
570
|
+
* When the dialog auto-cancels, as ISO: the sooner of the extension's own
|
|
571
|
+
* `timeout` and the daemon's `extensionDialogsTimeoutMs` default. Absent
|
|
572
|
+
* when the dialog waits forever.
|
|
573
|
+
*/
|
|
574
|
+
timeoutAt?: string;
|
|
575
|
+
/** Opened while a run was in flight, so `agent_end` settles it as `"aborted"`. */
|
|
576
|
+
runScoped: boolean;
|
|
577
|
+
}
|
|
578
|
+
/**
|
|
579
|
+
* The complete result of a closed extension dialog. Unlike an ask outcome it
|
|
580
|
+
* stays small — the dialog itself is not embedded, because a settled card is a
|
|
581
|
+
* browser-local record that stays until the user dismisses it; reloads
|
|
582
|
+
* rehydrate open dialogs from {@link SessionStatus.pendingDialogs} alone.
|
|
583
|
+
*/
|
|
584
|
+
export interface ExtensionDialogOutcome {
|
|
585
|
+
dialogId: string;
|
|
586
|
+
reason: ExtensionDialogCloseReason;
|
|
587
|
+
/** Present only when `reason` is `"answered"`. */
|
|
588
|
+
answer?: ExtensionDialogAnswer;
|
|
589
|
+
askedAt: string;
|
|
590
|
+
closedAt: string;
|
|
591
|
+
}
|
|
592
|
+
/**
|
|
593
|
+
* Browser request to answer an open extension dialog with the user's value.
|
|
594
|
+
* `cwd` rides along as the standard session-lookup field, as on every other
|
|
595
|
+
* session route; whether the value fits the dialog's kind is the store's call,
|
|
596
|
+
* so an ill-fitting answer is a 400 that leaves the dialog open.
|
|
597
|
+
*/
|
|
598
|
+
export interface ExtensionDialogAnswerRequest {
|
|
599
|
+
cwd?: string;
|
|
600
|
+
dialogId: string;
|
|
601
|
+
value: ExtensionDialogAnswer;
|
|
602
|
+
}
|
|
603
|
+
/** Browser request to dismiss an open extension dialog without an answer. */
|
|
604
|
+
export interface ExtensionDialogCancelRequest {
|
|
605
|
+
cwd?: string;
|
|
606
|
+
dialogId: string;
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* Result of the browser answering or cancelling an extension dialog. Mirrors
|
|
610
|
+
* {@link AskUserCloseResponse}: `"stale"` is an ordinary lost race — another
|
|
611
|
+
* browser, a timeout, or a teardown closed the dialog first — not an error.
|
|
612
|
+
* The browser drops its card and trusts `sessionStatus`, which is returned in
|
|
613
|
+
* both cases so closing a dialog needs no follow-up status request.
|
|
614
|
+
*/
|
|
615
|
+
export interface ExtensionDialogCloseResponse {
|
|
616
|
+
result: "closed" | "stale";
|
|
617
|
+
/** Present only when this call is the one that closed the dialog. */
|
|
618
|
+
outcome?: ExtensionDialogOutcome;
|
|
619
|
+
sessionStatus: SessionStatus;
|
|
620
|
+
}
|
|
621
|
+
/**
|
|
622
|
+
* Progress of the session startup window, where the daemon is still
|
|
623
|
+
* constructing the agent session and no `PiAgentSession` exists yet, so
|
|
624
|
+
* `activity.update` cannot be published for it.
|
|
625
|
+
*
|
|
626
|
+
* `startupToken` is the opaque label a create request supplied, echoed back so a
|
|
627
|
+
* browser row still waiting for a session id recognises its own construction.
|
|
628
|
+
* The daemon never interprets it and it never becomes the session id:
|
|
629
|
+
* `activity.sessionId` always carries the real id, which is how an *open* of a
|
|
630
|
+
* session the browser already knows is routed instead.
|
|
631
|
+
*
|
|
632
|
+
* `activity.phase === "idle"` means the startup window ended with nothing left
|
|
633
|
+
* to report, so a browser that substituted its own text should restore it.
|
|
634
|
+
*/
|
|
635
|
+
export interface SessionStartupProgressEvent {
|
|
636
|
+
type: "session.startup";
|
|
637
|
+
startupToken?: string;
|
|
638
|
+
activity: SessionActivity;
|
|
639
|
+
}
|
|
373
640
|
/**
|
|
374
641
|
* A pi-native image attachment carried with a prompt. The wire format mirrors
|
|
375
642
|
* pi's own `ImageContent` shape (`{ type: "image", data, mimeType }`) so these
|
|
@@ -534,6 +801,17 @@ export interface SessionStatus {
|
|
|
534
801
|
* there are none. See {@link SessionWarning}.
|
|
535
802
|
*/
|
|
536
803
|
warnings?: SessionWarning[];
|
|
804
|
+
/**
|
|
805
|
+
* The session's open `ask_user` question set, when one is waiting for the
|
|
806
|
+
* user. Daemon-owned, so it survives browser reload and web/API restarts.
|
|
807
|
+
*/
|
|
808
|
+
pendingAsk?: PendingAskUser;
|
|
809
|
+
/**
|
|
810
|
+
* The session's open extension dialogs, oldest first, when any are waiting
|
|
811
|
+
* for the user. Daemon-owned, so they survive browser reload and web/API
|
|
812
|
+
* restarts. Several may be open at once; the UI presents them as a queue.
|
|
813
|
+
*/
|
|
814
|
+
pendingDialogs?: PendingExtensionDialog[];
|
|
537
815
|
}
|
|
538
816
|
export interface WorkspaceActivity {
|
|
539
817
|
cwd: string;
|
|
@@ -924,6 +1202,21 @@ type SessionUiEventBody = {
|
|
|
924
1202
|
} | SessionNotificationInboxEvent | {
|
|
925
1203
|
type: "session.error";
|
|
926
1204
|
message: string;
|
|
1205
|
+
} | {
|
|
1206
|
+
type: "ask.opened";
|
|
1207
|
+
ask: PendingAskUser;
|
|
1208
|
+
} | {
|
|
1209
|
+
type: "ask.closed";
|
|
1210
|
+
askId: string;
|
|
1211
|
+
reason: AskUserCloseReason;
|
|
1212
|
+
} | {
|
|
1213
|
+
type: "dialog.opened";
|
|
1214
|
+
dialog: PendingExtensionDialog;
|
|
1215
|
+
} | {
|
|
1216
|
+
type: "dialog.closed";
|
|
1217
|
+
dialogId: string;
|
|
1218
|
+
reason: ExtensionDialogCloseReason;
|
|
1219
|
+
answer?: ExtensionDialogAnswer;
|
|
927
1220
|
} | {
|
|
928
1221
|
type: "session.name";
|
|
929
1222
|
sessionId: string;
|
|
@@ -937,5 +1230,5 @@ type SessionUiEventBody = {
|
|
|
937
1230
|
};
|
|
938
1231
|
export type GlobalSessionEvent = Extract<SessionUiEventBody, {
|
|
939
1232
|
type: "status.update" | "activity.update" | "session.name" | "session.created";
|
|
940
|
-
}> | SessionNotificationSummaryEvent | SessionUnreadEvent;
|
|
1233
|
+
}> | SessionNotificationSummaryEvent | SessionUnreadEvent | SessionStartupProgressEvent;
|
|
941
1234
|
export type RealtimeEvent = GlobalSessionEvent | TerminalUiEvent | WorkspaceActivityUiEvent;
|
package/dist/shared/apiTypes.js
CHANGED
|
@@ -7,6 +7,7 @@ export const PI_WEB_CAPABILITIES = {
|
|
|
7
7
|
sessionsPersistedState: "sessions.persistedState",
|
|
8
8
|
sessionsNotifications: "sessions.notifications",
|
|
9
9
|
sessionsUnread: "sessions.unread",
|
|
10
|
+
sessionsAskUser: "sessions.askUser",
|
|
10
11
|
promptAttachments: "prompt.attachments",
|
|
11
12
|
workspaceFileSuggestions: "workspace.fileSuggestions",
|
|
12
13
|
piPackagesManage: "piPackages.manage",
|
|
@@ -20,5 +21,28 @@ export const SESSION_UNREAD_CATALOG_ID_MAX_LENGTH = 512;
|
|
|
20
21
|
export const SESSION_UNREAD_COMPLETED_AT_MAX_LENGTH = 64;
|
|
21
22
|
export const SESSION_NOTIFICATION_LIMIT = 100;
|
|
22
23
|
export const SESSION_NOTIFICATION_MESSAGE_BYTES = 8 * 1024;
|
|
24
|
+
/**
|
|
25
|
+
* `customType` of the follow-up custom message that carries a closed ask back to
|
|
26
|
+
* the model and into the transcript. Its `details` are an {@link AskUserOutcome}.
|
|
27
|
+
*/
|
|
28
|
+
export const ASK_USER_ANSWERS_CUSTOM_TYPE = "pi-web.ask.answers";
|
|
29
|
+
/** Largest question set one `ask_user` call may post. */
|
|
30
|
+
export const ASK_USER_QUESTION_LIMIT = 20;
|
|
31
|
+
/** Largest option list one question may offer. */
|
|
32
|
+
export const ASK_USER_OPTION_LIMIT = 12;
|
|
33
|
+
/** Length bound for ids: the ask id, question ids, and option values. */
|
|
34
|
+
export const ASK_USER_ID_MAX_LENGTH = 128;
|
|
35
|
+
/** Length bound for model-authored prose: questions, details, and option labels. */
|
|
36
|
+
export const ASK_USER_TEXT_MAX_LENGTH = 1_000;
|
|
37
|
+
/** Length bound for the free text a user types as a custom answer. */
|
|
38
|
+
export const ASK_USER_OTHER_TEXT_MAX_LENGTH = 4_000;
|
|
39
|
+
/** Length bound for extension-dialog ids. */
|
|
40
|
+
export const EXTENSION_DIALOG_ID_MAX_LENGTH = 128;
|
|
41
|
+
/** Length bound for extension-authored dialog prose: titles, messages, options, placeholders. */
|
|
42
|
+
export const EXTENSION_DIALOG_TEXT_MAX_LENGTH = 1_000;
|
|
43
|
+
/** Largest option list one `select` dialog may offer. */
|
|
44
|
+
export const EXTENSION_DIALOG_OPTION_LIMIT = 24;
|
|
45
|
+
/** Length bound for the text a user types into an `input` dialog. */
|
|
46
|
+
export const EXTENSION_DIALOG_INPUT_MAX_LENGTH = 4_000;
|
|
23
47
|
export const SESSION_TREE_CUSTOM_INSTRUCTIONS_MAX_LENGTH = 10_000;
|
|
24
48
|
//# sourceMappingURL=apiTypes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiTypes.js","sourceRoot":"","sources":["../../src/shared/apiTypes.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,sBAAsB,EAAE,yBAAyB;IACjD,qBAAqB,EAAE,wBAAwB;IAC/C,eAAe,EAAE,kBAAkB;IACnC,cAAc,EAAE,iBAAiB;IACjC,kBAAkB,EAAE,qBAAqB;IACzC,sBAAsB,EAAE,yBAAyB;IACjD,qBAAqB,EAAE,wBAAwB;IAC/C,cAAc,EAAE,iBAAiB;IACjC,iBAAiB,EAAE,oBAAoB;IACvC,wBAAwB,EAAE,2BAA2B;IACrD,gBAAgB,EAAE,mBAAmB;IACrC,uBAAuB,EAAE,0BAA0B;IACnD,kBAAkB,EAAE,uBAAuB;CACnC,CAAC;
|
|
1
|
+
{"version":3,"file":"apiTypes.js","sourceRoot":"","sources":["../../src/shared/apiTypes.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,sBAAsB,EAAE,yBAAyB;IACjD,qBAAqB,EAAE,wBAAwB;IAC/C,eAAe,EAAE,kBAAkB;IACnC,cAAc,EAAE,iBAAiB;IACjC,kBAAkB,EAAE,qBAAqB;IACzC,sBAAsB,EAAE,yBAAyB;IACjD,qBAAqB,EAAE,wBAAwB;IAC/C,cAAc,EAAE,iBAAiB;IACjC,eAAe,EAAE,kBAAkB;IACnC,iBAAiB,EAAE,oBAAoB;IACvC,wBAAwB,EAAE,2BAA2B;IACrD,gBAAgB,EAAE,mBAAmB;IACrC,uBAAuB,EAAE,0BAA0B;IACnD,kBAAkB,EAAE,uB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I_WEB_CAPABILITIES.sessionsNotifications,
|
|
13
13
|
PI_WEB_CAPABILITIES.sessionsUnread,
|
|
14
|
+
PI_WEB_CAPABILITIES.sessionsAskUser,
|
|
14
15
|
PI_WEB_CAPABILITIES.promptAttachments,
|
|
15
16
|
PI_WEB_CAPABILITIES.workspaceFileSuggestions,
|
|
16
17
|
PI_WEB_CAPABILITIES.piPackagesManage,
|
|
@@ -26,6 +27,7 @@ export const SESSIOND_RUNTIME_CAPABILITIES = [
|
|
|
26
27
|
PI_WEB_CAPABILITIES.sessionsPersistedState,
|
|
27
28
|
PI_WEB_CAPABILITIES.sessionsNotifications,
|
|
28
29
|
PI_WEB_CAPABILITIES.sessionsUnread,
|
|
30
|
+
PI_WEB_CAPABILITIES.sessionsAskUser,
|
|
29
31
|
PI_WEB_CAPABILITIES.promptAttachments,
|
|
30
32
|
];
|
|
31
33
|
const EFFECTIVE_CAPABILITY_REQUIREMENTS = {
|
|
@@ -37,6 +39,7 @@ const EFFECTIVE_CAPABILITY_REQUIREMENTS = {
|
|
|
37
39
|
[PI_WEB_CAPABILITIES.sessionsPersistedState]: ["web", "sessiond"],
|
|
38
40
|
[PI_WEB_CAPABILITIES.sessionsNotifications]: ["web", "sessiond"],
|
|
39
41
|
[PI_WEB_CAPABILITIES.sessionsUnread]: ["web", "sessiond"],
|
|
42
|
+
[PI_WEB_CAPABILITIES.sessionsAskUser]: ["web", "sessiond"],
|
|
40
43
|
[PI_WEB_CAPABILITIES.promptAttachments]: ["web", "sessiond"],
|
|
41
44
|
[PI_WEB_CAPABILITIES.workspaceFileSuggestions]: ["web"],
|
|
42
45
|
[PI_WEB_CAPABILITIES.piPackagesManage]: ["web"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../src/shared/capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAgF,MAAM,eAAe,CAAC;AAElI,OAAO,EAAE,mBAAmB,EAAE,CAA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{ method: "POST", path: "/sessions/:sessionId/prompt" },
|
|
61
61
|
{ method: "POST", path: "/sessions/:sessionId/queue/clear" },
|
|
62
|
+
{ method: "POST", path: "/sessions/:sessionId/ask/submit" },
|
|
63
|
+
{ method: "POST", path: "/sessions/:sessionId/ask/cancel" },
|
|
64
|
+
{ method: "POST", path: "/sessions/:sessionId/dialogs/answer" },
|
|
65
|
+
{ method: "POST", path: "/sessions/:sessionId/dialogs/cancel" },
|
|
62
66
|
{ method: "POST", path: "/sessions/:sessionId/warnings/dismiss" },
|
|
63
67
|
{ method: "POST", path: "/sessions/:sessionId/attachments" },
|
|
64
68
|
{ method: "POST", path: "/sessions/:sessionId/shell" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"federatedRoutes.js","sourceRoot":"","sources":["../../src/shared/federatedRoutes.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,GAAG,MAAM,CAAC;AAC/D,MAAM,CAAC,MAAM,wCAAwC,GAAG,CAAC,GAAG,MAAM,CAAC;AAQnE,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE;IACzC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE;IAClC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE;IAClC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE;IACnC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE;IACvC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,sBAAsB,EAAE,SAAS,EAAE,oCAAoC,EAAE;IACjG,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB,EAAE,SAAS,EAAE,oCAAoC,EAAE;IAChG,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,qBA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AAE,KAAK,EAAE,IAAI,EAAE,iBAAiB,EAAE;IAC1C,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE;IACzC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,2BAA2B,EAAE;IACrD,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE;IACxC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE;IACvC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,qBAAqB,EAAE;IAC9C,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,6BAA6B,EAAE;IACvD,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,4BAA4B,EAAE;CACF,CAAC;AAEvD,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,SAAS;IACT,kBAAkB;IAClB,6BAA6B;IAC7B,2EAA2E;CACvC,CAAC"}
|
package/docs/config.md
CHANGED
|
@@ -33,17 +33,17 @@ defaults → global config file → environment overrides
|
|
|
33
33
|
|
|
34
34
|
Supported project-local settings are then applied for that project's workspaces. For upload defaults, `<project>/.pi-web/config.json` overrides the global value.
|
|
35
35
|
|
|
36
|
-
Environment overrides include `PI_WEB_HOST`, `PI_WEB_PORT` / `PORT`, `PI_WEB_ALLOWED_HOSTS`, `PI_WEB_MAX_UPLOAD_BYTES`, `PI_WEB_AGENT_COMMAND`, `PI_WEB_AGENT_DIR`, `PI_WEB_AGENT_SESSION_DIR`, `PI_CODING_AGENT_DIR` / `PI_CODING_AGENT_SESSION_DIR` for Pi compatibility, `PI_WEB_SPAWN_SESSIONS`, and `
|
|
36
|
+
Environment overrides include `PI_WEB_HOST`, `PI_WEB_PORT` / `PORT`, `PI_WEB_ALLOWED_HOSTS`, `PI_WEB_MAX_UPLOAD_BYTES`, `PI_WEB_AGENT_COMMAND`, `PI_WEB_AGENT_DIR`, `PI_WEB_AGENT_SESSION_DIR`, `PI_CODING_AGENT_DIR` / `PI_CODING_AGENT_SESSION_DIR` for Pi compatibility, `PI_WEB_SPAWN_SESSIONS`, `PI_WEB_SUBSESSIONS`, and `PI_WEB_ASK_USER`.
|
|
37
37
|
|
|
38
38
|
Process restarts depend on the key:
|
|
39
39
|
|
|
40
40
|
- `host` / `port`: restart the gateway web/API service or process.
|
|
41
41
|
- `maxUploadBytes`: restart both the web/API process and the session daemon on that machine.
|
|
42
|
-
- `agent.command` / `agent.dir` / `spawnSessions` / `subsessions`: restart the session daemon on that machine.
|
|
42
|
+
- `agent.command` / `agent.dir` / `spawnSessions` / `subsessions` / `askUser` / `extensionDialogsTimeoutMs`: restart the session daemon on that machine.
|
|
43
43
|
- `pathAccess`: applies on the next request; existing file views may need a browser refresh.
|
|
44
44
|
- `uploads.defaultFolder`: applies to newly opened Files upload dialogs and new direct drag/drop batches after config/workspace refresh.
|
|
45
45
|
- `plugins`: reload the browser tab after changing PI WEB plugin enablement.
|
|
46
|
-
- Pi package install/remove/update: not a PI WEB config key; after a mutation, type `/reload` in each idle PI WEB session on the target machine to refresh ordinary Pi resources such as extensions, skills, prompt templates, themes, and context/system prompt files. Reload the browser page separately for PI WEB browser plugin changes. If a global Pi extension adds
|
|
46
|
+
- Pi package install/remove/update: not a PI WEB config key; after a mutation, type `/reload` in each idle PI WEB session on the target machine to refresh ordinary Pi resources such as extensions, skills, prompt templates, themes, and context/system prompt files. Reload the browser page separately for PI WEB browser plugin changes. If a global Pi extension adds or removes a provider, or changes a provider's connection settings, manually restart `pi-web-sessiond.service`; `/reload` cannot change the startup provider baseline. A known provider refreshing only its own model list is applied without a restart. See [Pi extension provider baseline](#pi-extension-provider-baseline).
|
|
47
47
|
- `shortcuts`: saved settings apply in the browser after config refresh/save.
|
|
48
48
|
|
|
49
49
|
## Global config example
|
|
@@ -65,6 +65,8 @@ Process restarts depend on the key:
|
|
|
65
65
|
},
|
|
66
66
|
"spawnSessions": true,
|
|
67
67
|
"subsessions": false,
|
|
68
|
+
"askUser": true,
|
|
69
|
+
"extensionDialogsTimeoutMs": 300000,
|
|
68
70
|
"plugins": {
|
|
69
71
|
"workspace-tasks": { "enabled": true },
|
|
70
72
|
"updates": { "enabled": true },
|
|
@@ -101,7 +103,7 @@ Plugins may own separate project files, such as `.pi-web/tasks.json` for the bui
|
|
|
101
103
|
|
|
102
104
|
## Configuration matrix
|
|
103
105
|
|
|
104
|
-
Rows with JSON key `—` are runtime-only environment variables, not config-file keys. `Global` means machine-global. In Settings, selected-machine-safe global keys (`pathAccess`, `uploads`, `maxUploadBytes`, `agent`, `spawnSessions`, `subsessions`, and `plugins`) are edited for the selected machine; gateway host/port/allowed-hosts, keyboard shortcuts, and machine registry/tokens stay local.
|
|
106
|
+
Rows with JSON key `—` are runtime-only environment variables, not config-file keys. `Global` means machine-global. In Settings, selected-machine-safe global keys (`pathAccess`, `uploads`, `maxUploadBytes`, `agent`, `spawnSessions`, `subsessions`, `askUser`, and `plugins`) are edited for the selected machine; gateway host/port/allowed-hosts, keyboard shortcuts, and machine registry/tokens stay local.
|
|
105
107
|
|
|
106
108
|
| Config | JSON key | Env var | Scope | Project-local behavior | Applies / restart |
|
|
107
109
|
| --- | --- | --- | --- | --- | --- |
|
|
@@ -116,6 +118,8 @@ Rows with JSON key `—` are runtime-only environment variables, not config-file
|
|
|
116
118
|
| Agent profile state directory | `agent.dir` | `PI_WEB_AGENT_DIR` (`PI_CODING_AGENT_DIR` for Pi compatibility) | Global/session daemon | Not supported locally | Restart session daemon on that machine; affects auth, models, settings, sessions, Pi packages, and Pi-package-backed PI WEB plugins |
|
|
117
119
|
| Agent can spawn sessions | `spawnSessions` | `PI_WEB_SPAWN_SESSIONS` | Global/session daemon | Not supported locally | Restart session daemon on that machine |
|
|
118
120
|
| Tracked subsessions (beta) | `subsessions` | `PI_WEB_SUBSESSIONS` | Global/session daemon | Not supported locally; also requires `spawnSessions` | Restart session daemon on that machine |
|
|
121
|
+
| Agent can post question forms | `askUser` | `PI_WEB_ASK_USER` | Global/session daemon | Not supported locally | Restart session daemon on that machine |
|
|
122
|
+
| Extension dialog auto-cancel timeout | `extensionDialogsTimeoutMs` | — | Global/session daemon | Not supported locally | Restart session daemon on that machine |
|
|
119
123
|
| Plugin enablement/settings | `plugins.<id>.enabled`, `plugins.<id>.settings` | — | Global | Not core local config; plugins may read their own project files | Reload browser tab |
|
|
120
124
|
| Keyboard shortcuts | `shortcuts.<actionId>` | — | Global | Not supported locally | Applies after settings save/config refresh |
|
|
121
125
|
| Project config version | `version` | — | Project | Project-local only; must be `1` when present | Next project-config read |
|
|
@@ -139,6 +143,8 @@ Rows with JSON key `—` are runtime-only environment variables, not config-file
|
|
|
139
143
|
|
|
140
144
|
`PI_WEB_DATA_DIR` sets the root for PI WEB-managed runtime state and defaults to `~/.pi-web`. Unless a more specific path override is configured, PI WEB stores its project and machine registries, locally discovered plugins, default session-daemon socket, and session archives beneath this root.
|
|
141
145
|
|
|
146
|
+
Each data directory is independent: after pointing PI WEB at a new root, it starts there with empty registries and no session archives. To carry session archives over, stop PI WEB, then copy `archived-sessions.json` and the `archived-sessions/` directory from the old data directory into the new one before starting it again.
|
|
147
|
+
|
|
142
148
|
This setting does not change the PI WEB config file selected by `PI_WEB_CONFIG` or Pi-owned state such as the active session files selected by `PI_CODING_AGENT_SESSION_DIR`.
|
|
143
149
|
|
|
144
150
|
### External path access
|
|
@@ -213,15 +219,34 @@ This policy applies to **Pi runtime extensions**, not PI WEB browser plugins. Pi
|
|
|
213
219
|
|
|
214
220
|
PI WEB shares one model runtime across all sessions. When the session daemon starts, before any project resources load, it initializes global Pi extensions from the active agent profile (`agent.dir`), including extensions supplied by globally configured Pi packages. Provider registrations made by synchronous or awaited asynchronous extension factories during this bootstrap join the shared baseline. PI WEB captures both config-form registrations (`pi.registerProvider("id", config)`) and native-provider registrations (`pi.registerProvider(provider)`), alongside Pi built-ins, environment credentials, and providers from the active agent directory's `models.json`.
|
|
215
221
|
|
|
216
|
-
After startup capture,
|
|
222
|
+
After startup capture, a provider's connection settings are fixed for the daemon lifetime. Later attempts to add a provider, replace an existing provider's configuration, register a native provider, or unregister a provider are no-ops, regardless of source or provider ID. This includes project extensions attempting to add or replace a provider, lifecycle callbacks such as `session_start`, and `/reload`. Non-provider Pi extension features continue to load and reload normally.
|
|
223
|
+
|
|
224
|
+
#### Model list refresh for a known provider
|
|
225
|
+
|
|
226
|
+
One narrow update is applied after startup: a provider captured in the baseline may refresh **its own model list**. Extensions that fetch an updated catalog typically re-send their complete provider configuration, so PI WEB compares the incoming registration against the recorded baseline and applies it only when both hold:
|
|
227
|
+
|
|
228
|
+
- the provider ID is already in the startup baseline, and
|
|
229
|
+
- every field except the model list is unchanged — `name`, `baseUrl`, `apiKey`, `api`, `streamSimple`, `headers`, `authHeader`, `oauth`, and `refreshModels`.
|
|
230
|
+
|
|
231
|
+
Anything else stays a no-op, including a provider that was not in the baseline and a known provider whose credentials, base URL, or API surface differ from startup. Function-valued fields cannot be compared by value, so a registration that supplies a new `streamSimple`, `refreshModels`, or `oauth` implementation is treated as a change and ignored.
|
|
232
|
+
|
|
233
|
+
An applied refresh becomes the new comparison point, so a provider can refresh repeatedly. Re-sending an unchanged model list is a replay rather than an update and is ignored. Refreshed models are visible to sessions immediately; no restart and no network request is involved, because the extension has already produced the catalog.
|
|
217
234
|
|
|
218
|
-
|
|
235
|
+
Model lists are shared daemon-wide state. If extensions in two workspaces register different model lists for the same provider ID, the last registration wins. A model entry may also carry its own `baseUrl` and `headers`, which take precedence over the provider-level values for that model, so an accepted refresh can change where requests for those models are sent. Both are accepted trade-offs: a catalog is treated as a property of the provider rather than of the project, and Pi extensions are trusted daemon code.
|
|
236
|
+
|
|
237
|
+
#### Provider decisions in the daemon log
|
|
238
|
+
|
|
239
|
+
Ignored mutations are written to the session-daemon log once per operation and provider ID, so a replaying extension cannot flood the log. Applied model list refreshes are logged every time, with the resulting model count, because each one changes shared runtime state. Neither entry contains provider configuration or credentials, and PI WEB does not show a session warning or notification.
|
|
240
|
+
|
|
241
|
+
This prevents accidental provider, configuration, or credential contamination between projects; it is not a security boundary because Pi extensions remain trusted daemon code.
|
|
219
242
|
|
|
220
243
|
Configure providers before the daemon starts: use the active agent directory's `models.json`, or install the Pi extension globally in that agent profile. Project Pi extensions and project-level `models.json` files cannot add providers to PI WEB's shared baseline. After updating PI WEB—or after installing, removing, or updating a global Pi extension that registers providers—manually restart `pi-web-sessiond.service` (`systemctl --user restart pi-web-sessiond`). Restarting only the web/API service and running `/reload` do not rebuild the baseline.
|
|
221
244
|
|
|
222
245
|
### Background model catalog refresh
|
|
223
246
|
|
|
224
|
-
PI WEB shares one model runtime across all sessions, and provider model catalogs are refreshed over the network only on the session daemon's own background schedule.
|
|
247
|
+
PI WEB shares one model runtime across all sessions, and provider model catalogs are refreshed over the network only on the session daemon's own background schedule. Requests never start a catalog fetch of their own, so a slow or unreachable provider cannot stall opening the model selector, starting a session, or the auth dialogs on its own account.
|
|
248
|
+
|
|
249
|
+
A refresh that is *already* in flight can still briefly delay starting or opening a session, because the shared runtime is read while that refresh is running. PI WEB says so while you wait: the session's activity line names the startup step it is on and adds `provider model lists are refreshing` when a background refresh is running at the same time. That note reports what is happening concurrently, not a proven cause.
|
|
225
250
|
|
|
226
251
|
The session daemon runs the refresh:
|
|
227
252
|
|
|
@@ -250,6 +275,30 @@ A completion notice wakes an idle parent or queues behind in-flight work. Each n
|
|
|
250
275
|
|
|
251
276
|
In **Settings → Session daemon**, these keys are saved on the selected machine. Restart the session daemon on that machine after changing them.
|
|
252
277
|
|
|
278
|
+
#### `askUser` and `ask_user`
|
|
279
|
+
|
|
280
|
+
`askUser` controls whether agents receive the core `ask_user` tool. It defaults to `true`; set it to `false`, or set `PI_WEB_ASK_USER=false`, to remove the tool. The environment override accepts `0|1|true|false` and takes precedence over the config file.
|
|
281
|
+
|
|
282
|
+
Use **Settings → Session daemon → Allow agents to ask questions** to change `askUser` on the selected machine. An environment override makes the toggle read-only.
|
|
283
|
+
|
|
284
|
+
The tool accepts one set of 1–20 questions. Each question has a unique `id`, its `question` text, optional supporting `detail`, up to 12 options with stable values and user-facing labels, and an optional `multiple` flag. The browser always adds a **Custom** free-text answer, including when the model supplies no options. No question is required: the user may leave any of them unanswered.
|
|
285
|
+
|
|
286
|
+
Calling `ask_user` posts the whole set as one browser form and ends the current agent run instead of waiting for the user. The open form is owned by the session daemon, so it survives a browser disconnect, browser reload, or web/API restart while that daemon keeps running. When the user submits, the answers arrive as a follow-up that wakes the session; each question is reported with its selected option values or free text, or explicitly as unanswered.
|
|
287
|
+
|
|
288
|
+
PI WEB confirms a partial submission before sending it and names the unanswered questions. Only one ask can be open per session: a later `ask_user` call supersedes the earlier one, reports that fact and its unanswered questions to the model, and turns the earlier card into a read-only transcript record. Submitted and cancelled asks likewise remain readable in the transcript.
|
|
289
|
+
|
|
290
|
+
Sending an ordinary chat message while a form is open voids the form: the card closes as cancelled and the model is told its questions went unanswered as part of the turn the message itself starts.
|
|
291
|
+
|
|
292
|
+
Restart the session daemon after changing `askUser` or after upgrading PI WEB to a version that introduces this tool. For the systemd user service, run `systemctl --user restart pi-web-sessiond`.
|
|
293
|
+
|
|
294
|
+
### Extension dialogs
|
|
295
|
+
|
|
296
|
+
Pi extensions can ask the user questions from `ctx.ui.confirm()`, `ctx.ui.select()`, and `ctx.ui.input()` — including from `session_start` hooks and in-flight `tool_call` hooks. PI WEB renders these dialogs inline in the session transcript and answers them through a dedicated session-daemon channel, never the prompt queue, so a dialog parked inside a `tool_call` hook cannot deadlock the run. Dialog support is always on; there is no enable flag. See [Pi extension dialogs in PI WEB](https://pi-web.dev/plugins#pi-extension-dialogs) for behavior details and author guidance.
|
|
297
|
+
|
|
298
|
+
`extensionDialogsTimeoutMs` is the unattended-dialog safety valve: how long the session daemon waits for an answer before settling the dialog with its kind's cancel value (`false` for confirm, `undefined` for select and input). It defaults to `300000` (5 minutes); set it to `0` to wait forever. An extension's own `timeout` option still applies, and the effective deadline is the sooner of the two.
|
|
299
|
+
|
|
300
|
+
The key is edited directly in the global config file. Restart the session daemon after changing it — for the systemd user service, run `systemctl --user restart pi-web-sessiond`.
|
|
301
|
+
|
|
253
302
|
### Plugin config
|
|
254
303
|
|
|
255
304
|
The `plugins` key is only for PI WEB browser plugin enablement/settings on the machine whose config you are editing. It does not install, remove, or update Pi packages; use **Settings → Pi packages** or Pi's package manager for package operations. In a federated setup, **Settings → PI WEB plugins** and **Settings → Pi packages** both target the currently selected machine, and each panel labels where changes will be saved or run.
|