pi-roundtable-web 0.25.0 → 0.26.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 +15 -0
- package/README.md +145 -8
- package/dist/account-zk4efb87.css +102 -0
- package/dist/chunk-account-hw49gd0d.js +1 -0
- package/dist/chunk-action-menu-rm5cyqkj.js +1 -0
- package/dist/{chunk-agent-0pm9p3nn.js → chunk-agent-b017vswv.js} +1 -1
- package/dist/chunk-arranged-rooms-q5v3dm1r.js +1 -0
- package/dist/chunk-character-creator-5dxcvd16.js +1 -0
- package/dist/chunk-codeeditor-pyt09fwg.js +2 -0
- package/dist/chunk-confirm-521yqmta.js +1 -0
- package/dist/{chunk-connectors-anhghy3k.js → chunk-connectors-hrm06nx8.js} +1 -1
- package/dist/chunk-conversations-e26rrf01.js +1 -0
- package/dist/{chunk-drag-q4fx9b22.js → chunk-drag-v41gx2mc.js} +1 -1
- package/dist/{chunk-entry-he1embgp.js → chunk-entry-jxxb3ath.js} +1 -1
- package/dist/{chunk-folder-list-5cp8stna.js → chunk-folder-list-b97xk12b.js} +1 -1
- package/dist/chunk-folds-b8q7eags.js +1 -0
- package/dist/chunk-gate-8k61stsc.js +1 -0
- package/dist/chunk-group-scene-dx6wt19m.js +1 -0
- package/dist/chunk-group-table-e4jr8r3a.js +1 -0
- package/dist/chunk-host-state-g7e7c0k5.js +1 -0
- package/dist/chunk-host-ui-x7k6n07v.js +939 -0
- package/dist/{chunk-index-bvfqjh77.js → chunk-index-014rjv9k.js} +2 -2
- package/dist/{chunk-index-d5abvq7v.js → chunk-index-2d0kg096.js} +2 -2
- package/dist/chunk-index-2qd81wbx.js +2 -0
- package/dist/{chunk-index-9b1kt7qw.css → chunk-index-2stynxw6.css} +1 -1
- package/dist/{chunk-index-gpkzhq1g.js → chunk-index-459drsft.js} +2 -2
- package/dist/chunk-index-4mfj596y.js +2 -0
- package/dist/{chunk-index-18gxy79n.js → chunk-index-66nskrdj.js} +2 -2
- package/dist/chunk-index-awx6nnta.js +2 -0
- package/dist/chunk-index-bbsytycb.js +2 -0
- package/dist/chunk-index-c07p8k0x.js +4 -0
- package/dist/chunk-index-cq1e9xdz.js +2 -0
- package/dist/chunk-index-d1prgfbp.js +2 -0
- package/dist/chunk-index-dhpt8qr9.js +2 -0
- package/dist/chunk-index-e5sd30xy.js +2 -0
- package/dist/chunk-index-g351921r.js +1 -0
- package/dist/chunk-index-hby0ap91.js +2 -0
- package/dist/chunk-index-hssjbr1k.js +2 -0
- package/dist/chunk-index-k2qq1gdj.js +2 -0
- package/dist/chunk-index-ke9ynm0n.js +2 -0
- package/dist/{chunk-index-s681nny9.js → chunk-index-km40bhsz.js} +2 -2
- package/dist/chunk-index-kpscvg85.js +2 -0
- package/dist/chunk-index-m0d100mg.js +2 -0
- package/dist/chunk-index-mb72snk9.js +2 -0
- package/dist/chunk-index-mjqqver5.js +4 -0
- package/dist/{chunk-index-zfd00hwb.js → chunk-index-nqfkwkfp.js} +2 -2
- package/dist/chunk-index-nwqk447w.js +2 -0
- package/dist/{chunk-index-wmbmmrd4.js → chunk-index-pcfhpm8v.js} +4 -4
- package/dist/chunk-index-q8h8xzbm.js +2 -0
- package/dist/chunk-index-r5vszgfs.js +2 -0
- package/dist/{chunk-index-27qca4mr.js → chunk-index-rhtvcbsq.js} +2 -2
- package/dist/chunk-index-rjv7vrwd.js +13 -0
- package/dist/chunk-index-v23m38p6.js +50 -0
- package/dist/chunk-index-va0g7d88.js +1 -0
- package/dist/{chunk-index-krtk6nn2.js → chunk-index-wnjp6wv0.js} +2 -2
- package/dist/chunk-index-xgkd15n3.js +2 -0
- package/dist/{chunk-index-9jqcskb4.js → chunk-index-y8rnq8zf.js} +5 -5
- package/dist/chunk-index-z3k18atc.js +2 -0
- package/dist/chunk-lang-css-6bepqpnx.js +1 -0
- package/dist/{chunk-lang-dockerfile-d5mzxs60.js → chunk-lang-dockerfile-hrav55t7.js} +1 -1
- package/dist/{chunk-lang-go-830fmhba.js → chunk-lang-go-x9ahv6e5.js} +3 -3
- package/dist/chunk-lang-html-8jc72zt4.js +1 -0
- package/dist/chunk-lang-javascript-2p2qtbnf.js +1 -0
- package/dist/{chunk-lang-json-5eaarz7j.js → chunk-lang-json-hsemyd0r.js} +1 -1
- package/dist/chunk-lang-markdown-zkwb4c9n.js +6 -0
- package/dist/{chunk-lang-python-fjw84w10.js → chunk-lang-python-tewx7006.js} +2 -2
- package/dist/{chunk-lang-rust-5rbp2zdk.js → chunk-lang-rust-0ydx84s1.js} +1 -1
- package/dist/{chunk-lang-shell-vzagpym3.js → chunk-lang-shell-gq1tmdz4.js} +1 -1
- package/dist/{chunk-lang-sql-0c2w9c2y.js → chunk-lang-sql-xt1qyycg.js} +2 -2
- package/dist/{chunk-lang-toml-yr9fv6eb.js → chunk-lang-toml-0hamc5fc.js} +1 -1
- package/dist/chunk-lang-typescript-82xf7z2e.js +1 -0
- package/dist/{chunk-lang-xml-eze08p42.js → chunk-lang-xml-wf6h5pt2.js} +1 -1
- package/dist/{chunk-lang-yaml-c4b6ft3y.js → chunk-lang-yaml-7vk521h1.js} +1 -1
- package/dist/chunk-layout-actions-zh7bezk7.js +1 -0
- package/dist/{chunk-menu-items-jrwxycr1.js → chunk-menu-items-1n9qargb.js} +2 -2
- package/dist/chunk-notes-t15bh04m.js +1 -0
- package/dist/chunk-notice-bell-w3y0h0sr.js +1 -0
- package/dist/chunk-notices-fa3g7qze.js +1 -0
- package/dist/chunk-onboarding-34v3nr17.js +1 -0
- package/dist/chunk-overview-km5vq375.js +1 -0
- package/dist/chunk-palette-a8txdgd0.js +1 -0
- package/dist/chunk-placement-items-wgaxsbvs.js +1 -0
- package/dist/chunk-profile-ypxdbsk1.js +1 -0
- package/dist/chunk-prompt-history-wm9dsy6s.js +1 -0
- package/dist/chunk-prompts-7mhhq7zs.js +1 -0
- package/dist/chunk-room-confirms-t11a1gsw.js +1 -0
- package/dist/chunk-room-menu-2tm2xtfx.js +1 -0
- package/dist/chunk-rooms-menu-button-wxnsxjwc.js +1 -0
- package/dist/chunk-schedules-2ft6xxyw.js +1 -0
- package/dist/{chunk-seat-menu-jv4s7hmj.js → chunk-seat-menu-d3npdtx1.js} +1 -1
- package/dist/chunk-sheet-hosts-vngvp7wv.js +1 -0
- package/dist/chunk-skill-editor-65n2hsq4.js +8 -0
- package/dist/chunk-skills-shkdwes8.js +1 -0
- package/dist/chunk-switcher-list-g6hhmr1t.js +1 -0
- package/dist/chunk-table-1b6bsq2y.js +1 -0
- package/dist/chunk-table-seats-vy1qhdks.js +1 -0
- package/dist/{chunk-table2d-4sje1fr0.js → chunk-table2d-n26b7gd0.js} +1 -1
- package/dist/{chunk-table3d-h64skazp.js → chunk-table3d-8aysyf56.js} +12 -12
- package/dist/chunk-transcript-355faceq.js +1 -0
- package/dist/chunk-where-j5qdt8a4.js +1 -0
- package/dist/chunk-workspace-vrbs6zx1.js +1 -0
- package/dist/chunk-zh-tw-zeg600bk.js +1 -0
- package/dist/index.html +1 -1
- package/dist/sw.js +1 -1
- package/package.json +5 -4
- package/src/api-types.ts +301 -4
- package/src/app/app.ts +196 -32
- package/src/app/desk.ts +47 -22
- package/src/app/files.ts +73 -7
- package/src/app/presence.ts +2 -2
- package/src/app/protocol.ts +63 -1
- package/src/app/room-log.ts +141 -14
- package/src/app/routes.ts +124 -26
- package/src/app/socket.ts +309 -77
- package/src/app/sockets.ts +108 -20
- package/src/app/surface.ts +72 -36
- package/src/app/uploads.ts +33 -7
- package/src/auth/authenticator.ts +71 -8
- package/src/auth/next.ts +52 -0
- package/src/auth/oidc-pages.ts +60 -0
- package/src/auth/oidc.ts +611 -0
- package/src/auth/sessions.ts +193 -0
- package/src/authz.ts +172 -0
- package/src/console-api.ts +122 -25
- package/src/console-server.ts +70 -6
- package/src/gate.ts +90 -0
- package/src/host/access.ts +161 -0
- package/src/host/cards.ts +99 -0
- package/src/host/context.ts +141 -0
- package/src/host/forms.ts +237 -0
- package/src/host/frames.ts +342 -0
- package/src/host/host-app.ts +176 -0
- package/src/host/host-context.ts +49 -0
- package/src/host/host-routes.ts +363 -0
- package/src/host/pages.ts +266 -0
- package/src/host/reads.ts +155 -0
- package/src/host/retention.ts +41 -0
- package/src/host/room-views.ts +137 -0
- package/src/host/rooms-service.ts +414 -0
- package/src/host/stored-json.ts +13 -0
- package/src/host/views.ts +103 -0
- package/src/i18n/zh-tw.ts +132 -0
- package/src/notices/api.ts +43 -0
- package/src/notices/mount.ts +292 -0
- package/src/notices/service.ts +294 -0
- package/src/notices/store.ts +298 -0
- package/src/notices/urls.ts +38 -0
- package/src/onboarding/api.ts +32 -0
- package/src/onboarding/service.ts +149 -0
- package/src/onboarding/steps.ts +75 -0
- package/src/onboarding/waivers.ts +40 -0
- package/src/options.ts +498 -34
- package/src/profile/api.ts +175 -0
- package/src/profile/links.ts +162 -0
- package/src/push/api.ts +189 -52
- package/src/push/dispatch.ts +156 -0
- package/src/push/drain.ts +139 -0
- package/src/push/outbox.ts +218 -0
- package/src/push/prefs.ts +118 -0
- package/src/push/sender.ts +7 -2
- package/src/push/triggers.ts +56 -5
- package/src/push/vapid.ts +19 -0
- package/src/push/web-push-transport.ts +106 -0
- package/src/push-sender/index.ts +14 -0
- package/src/push-sender/run.ts +118 -0
- package/src/push-sender/session.ts +54 -0
- package/src/visitors.ts +94 -6
- package/src/web-app.ts +674 -0
- package/src/web-plugin.ts +268 -26
- package/dist/chunk-action-menu-qe839g4b.js +0 -1
- package/dist/chunk-arranged-rooms-enpfswmg.js +0 -1
- package/dist/chunk-character-creator-6yf29xwx.js +0 -1
- package/dist/chunk-codeeditor-gdbdg7rp.js +0 -2
- package/dist/chunk-confirm-xrw7d732.js +0 -1
- package/dist/chunk-conversations-ry228aes.js +0 -1
- package/dist/chunk-folds-hff104tk.js +0 -1
- package/dist/chunk-group-scene-h228jdat.js +0 -1
- package/dist/chunk-index-0p5h2kdz.js +0 -2
- package/dist/chunk-index-0pt08yd9.js +0 -1
- package/dist/chunk-index-12bw9yj8.js +0 -2
- package/dist/chunk-index-2ad17eh4.js +0 -2
- package/dist/chunk-index-31wh5twj.js +0 -52
- package/dist/chunk-index-4dy94pbz.js +0 -2
- package/dist/chunk-index-4ecjtdy8.js +0 -13
- package/dist/chunk-index-4v1b7ks9.js +0 -2
- package/dist/chunk-index-5d8yjj4m.js +0 -2
- package/dist/chunk-index-89ajmxh7.js +0 -2
- package/dist/chunk-index-b9ny4623.js +0 -2
- package/dist/chunk-index-e1dr6g10.js +0 -2
- package/dist/chunk-index-hk3xyy20.js +0 -2
- package/dist/chunk-index-jm23vn03.js +0 -4
- package/dist/chunk-index-k7gh0jvz.js +0 -2
- package/dist/chunk-index-ky42ev0b.js +0 -2
- package/dist/chunk-index-pa2yyqh0.js +0 -2
- package/dist/chunk-index-pcvt668q.js +0 -2
- package/dist/chunk-index-pqw27eye.js +0 -1
- package/dist/chunk-index-ymbjrsp6.js +0 -2
- package/dist/chunk-lang-css-t85r8rz0.js +0 -1
- package/dist/chunk-lang-html-n6jparge.js +0 -1
- package/dist/chunk-lang-javascript-xj00cp97.js +0 -1
- package/dist/chunk-lang-markdown-zxx8eke8.js +0 -6
- package/dist/chunk-lang-typescript-8f6yywt3.js +0 -1
- package/dist/chunk-layout-actions-bv0chj41.js +0 -1
- package/dist/chunk-notes-9b7pgqfe.js +0 -1
- package/dist/chunk-overview-8yw71esz.js +0 -1
- package/dist/chunk-palette-frms7axe.js +0 -1
- package/dist/chunk-placement-items-fvfy9m0y.js +0 -1
- package/dist/chunk-prompt-history-yrqehads.js +0 -1
- package/dist/chunk-prompts-g6609tqx.js +0 -1
- package/dist/chunk-room-confirms-0a2y0925.js +0 -1
- package/dist/chunk-room-menu-g11q97br.js +0 -1
- package/dist/chunk-rooms-menu-button-h9qge48n.js +0 -1
- package/dist/chunk-schedules-ezmacrbj.js +0 -1
- package/dist/chunk-sheet-hosts-b0azyfhb.js +0 -1
- package/dist/chunk-skill-editor-h6k6whwg.js +0 -8
- package/dist/chunk-skills-gqcfhq56.js +0 -1
- package/dist/chunk-switcher-list-mcpamqnj.js +0 -1
- package/dist/chunk-table-s8cde1xz.js +0 -1
- package/dist/chunk-table-seats-wqkjn8bc.js +0 -1
- package/dist/chunk-transcript-c59c6mpm.js +0 -1
- package/dist/chunk-workspace-0cyspkk4.js +0 -1
- package/dist/chunk-zh-tw-nc93jm10.js +0 -1
package/src/api-types.ts
CHANGED
|
@@ -16,9 +16,22 @@ export const PANES = [
|
|
|
16
16
|
"schedules",
|
|
17
17
|
"table",
|
|
18
18
|
"workspace",
|
|
19
|
+
"profile",
|
|
19
20
|
] as const;
|
|
20
21
|
export type PaneName = (typeof PANES)[number];
|
|
21
22
|
|
|
23
|
+
/** The panes only an owner is served: they show the whole host, which a member's view never does. */
|
|
24
|
+
export const OWNER_ONLY_PANES = [
|
|
25
|
+
"overview",
|
|
26
|
+
"skills",
|
|
27
|
+
"connectors",
|
|
28
|
+
"table",
|
|
29
|
+
"workspace",
|
|
30
|
+
] as const satisfies readonly PaneName[];
|
|
31
|
+
|
|
32
|
+
/** A person's tier in the app, as `IDENTITY` gives it. */
|
|
33
|
+
export type AppTier = "owner" | "admin" | "member";
|
|
34
|
+
|
|
22
35
|
/** What the page needs before it can draw anything. */
|
|
23
36
|
export interface ConfigView {
|
|
24
37
|
title: string;
|
|
@@ -41,7 +54,50 @@ export interface ConfigView {
|
|
|
41
54
|
surface: string;
|
|
42
55
|
/** The WebSocket subprotocol to offer. */
|
|
43
56
|
protocol: string;
|
|
57
|
+
/** False when the host leaves the yolo and long-running switches out (`modes: false`). */
|
|
58
|
+
modes?: false;
|
|
44
59
|
};
|
|
60
|
+
/** The visitor's tier. Sent only where the host admits more than its owners (`admission: "access"`). */
|
|
61
|
+
tier?: AppTier;
|
|
62
|
+
/** The steps still undone before the app opens; present only while the gate is closed. */
|
|
63
|
+
gate?: GateStepView[];
|
|
64
|
+
/** The host's pages that are not rooms, as far as this visitor may see them. */
|
|
65
|
+
pages?: PageLinkView[];
|
|
66
|
+
/** The kinds of host room this visitor may list. */
|
|
67
|
+
kinds?: KindLinkView[];
|
|
68
|
+
/** Web Push for this visitor's tier: who may subscribe, and (for an external sender) where. */
|
|
69
|
+
push?: { tiers: AppTier[]; key?: string; subscribe?: string };
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** A step of onboarding the visitor still owes. */
|
|
73
|
+
export interface GateStepView {
|
|
74
|
+
id: string;
|
|
75
|
+
label: string;
|
|
76
|
+
help?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Set on the steps the app makes itself, so the page words them in its own language: `link`
|
|
79
|
+
* for `link:<provider>` (with the account's label in `label`), `push` for the notifications step.
|
|
80
|
+
*/
|
|
81
|
+
builtin?: "link" | "push";
|
|
82
|
+
/** A required step gates the app; a nudge is shown and never gates. */
|
|
83
|
+
required: boolean;
|
|
84
|
+
/** The page where the person completes it. */
|
|
85
|
+
open: { page: string };
|
|
86
|
+
/** The person may waive it; the label and the confirmation are what they are shown. */
|
|
87
|
+
waiver?: { label: string; confirm: string };
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/** A host page that is not a room, in the places the shell lists it. */
|
|
91
|
+
export interface PageLinkView {
|
|
92
|
+
id: string;
|
|
93
|
+
label: string;
|
|
94
|
+
place: "main" | "settings" | "hidden";
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/** A kind of host room, listed by its label. */
|
|
98
|
+
export interface KindLinkView {
|
|
99
|
+
kind: string;
|
|
100
|
+
label: string;
|
|
45
101
|
}
|
|
46
102
|
|
|
47
103
|
export type ChannelName =
|
|
@@ -300,6 +356,96 @@ export interface RoomMessage {
|
|
|
300
356
|
/** ISO time. */
|
|
301
357
|
at: string;
|
|
302
358
|
live?: string;
|
|
359
|
+
/**
|
|
360
|
+
* Host rooms: what kind of author wrote it (`external` text is untrusted and shown as plain
|
|
361
|
+
* text) and the label the host gives that kind, such as "Customer". Absent on the app's own.
|
|
362
|
+
*/
|
|
363
|
+
authorKind?: HostAuthorKind;
|
|
364
|
+
authorLabel?: string;
|
|
365
|
+
/** Host rooms: the author's picture, never an outside URL. */
|
|
366
|
+
picture?: PictureRef;
|
|
367
|
+
/** The text was changed after it was stored. */
|
|
368
|
+
edited?: true;
|
|
369
|
+
/** Files of the message that were deleted by retention. */
|
|
370
|
+
expiredFiles?: number;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/** The kinds of author a host room's messages come from. */
|
|
374
|
+
export type HostAuthorKind = "external" | "member" | "assistant" | "notice";
|
|
375
|
+
|
|
376
|
+
/** A picture the page may draw: a stored file, a person's picture, or initials; never an outside URL. */
|
|
377
|
+
export type PictureRef =
|
|
378
|
+
| { file: string }
|
|
379
|
+
| { principal: string }
|
|
380
|
+
| { initials: string; color: string };
|
|
381
|
+
|
|
382
|
+
/** A button a host card or header offers, and the form it opens first. */
|
|
383
|
+
export interface HostActionView {
|
|
384
|
+
id: string;
|
|
385
|
+
label: string;
|
|
386
|
+
style?: "primary" | "secondary" | "danger";
|
|
387
|
+
confirm?: string;
|
|
388
|
+
form?: FormSpecView;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
export interface FormSpecView {
|
|
392
|
+
title: string;
|
|
393
|
+
submit: string;
|
|
394
|
+
fields: FormFieldView[];
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
export type FormFieldView =
|
|
398
|
+
| {
|
|
399
|
+
name: string;
|
|
400
|
+
label: string;
|
|
401
|
+
type: "text" | "textarea" | "url";
|
|
402
|
+
required?: boolean;
|
|
403
|
+
max?: number;
|
|
404
|
+
initial?: string;
|
|
405
|
+
hint?: string;
|
|
406
|
+
}
|
|
407
|
+
| {
|
|
408
|
+
name: string;
|
|
409
|
+
label: string;
|
|
410
|
+
type: "select" | "multiselect";
|
|
411
|
+
required?: boolean;
|
|
412
|
+
options: { value: string; label: string }[];
|
|
413
|
+
/** The value or values chosen when the form opens; a `select` takes one. */
|
|
414
|
+
initial?: string | readonly string[];
|
|
415
|
+
/** The page offers a filter box over the options, for a long list. */
|
|
416
|
+
search?: boolean;
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
/** A card a host puts in its room; its buttons call the host's `act`. */
|
|
420
|
+
export interface HostCardView {
|
|
421
|
+
id: string;
|
|
422
|
+
room: string;
|
|
423
|
+
title: string;
|
|
424
|
+
body: string;
|
|
425
|
+
tone?: "note" | "ok" | "warn" | "risk";
|
|
426
|
+
state?: "open" | "working" | "done" | "superseded" | "expired";
|
|
427
|
+
links?: { label: string; url: string }[];
|
|
428
|
+
/** Only the buttons this viewer may press. */
|
|
429
|
+
buttons?: HostActionView[];
|
|
430
|
+
/** ISO times. */
|
|
431
|
+
at: string;
|
|
432
|
+
updatedAt: string;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
/** A person-addressed notice, as the bell shows it. */
|
|
436
|
+
export interface NoticeView {
|
|
437
|
+
tag: string;
|
|
438
|
+
title: string;
|
|
439
|
+
body?: string;
|
|
440
|
+
open?:
|
|
441
|
+
| { room: string; message?: number }
|
|
442
|
+
| { page: string; query?: Record<string, string> };
|
|
443
|
+
urgency: "normal" | "high";
|
|
444
|
+
ackable: boolean;
|
|
445
|
+
/** ISO time. */
|
|
446
|
+
raisedAt: string;
|
|
447
|
+
/** This person has handled it. */
|
|
448
|
+
acked?: true;
|
|
303
449
|
}
|
|
304
450
|
|
|
305
451
|
/** One entry of the room list. */
|
|
@@ -339,6 +485,18 @@ export interface RoomView {
|
|
|
339
485
|
stoppable: boolean;
|
|
340
486
|
/** The newest stored message, if any. */
|
|
341
487
|
last?: RoomMessage;
|
|
488
|
+
/** Messages past this person's read cursor; absent when none. */
|
|
489
|
+
unread?: number;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
/** Where one person has read a room up to, with the name the page shows for them. */
|
|
493
|
+
export interface ReadMarkView {
|
|
494
|
+
principal: string;
|
|
495
|
+
name: string;
|
|
496
|
+
/** The id of the newest message they have read. */
|
|
497
|
+
upTo: number;
|
|
498
|
+
/** ISO time. */
|
|
499
|
+
at: string;
|
|
342
500
|
}
|
|
343
501
|
|
|
344
502
|
/** An owner-made folder of rooms, with its rooms in the owner's order. */
|
|
@@ -375,14 +533,22 @@ export interface MessagesView {
|
|
|
375
533
|
* first; the page places each among the messages by `frame.at`.
|
|
376
534
|
*/
|
|
377
535
|
cards: ClosedCard[];
|
|
536
|
+
/** The other readers' cursors: how far each has read the room (the viewer's own is `cursor`). */
|
|
537
|
+
reads?: ReadMarkView[];
|
|
538
|
+
/** The viewer's own read cursor before they opened the room; absent when they never read it. */
|
|
539
|
+
cursor?: number;
|
|
378
540
|
}
|
|
379
541
|
|
|
380
542
|
/** Who the page is signed in as. */
|
|
381
543
|
export interface SessionView {
|
|
382
544
|
principal: PrincipalName;
|
|
383
545
|
surface: string;
|
|
384
|
-
/** How the console signs the person in; the page offers Log out under `password`. */
|
|
385
|
-
auth: "none" | "password" | "verifier";
|
|
546
|
+
/** How the console signs the person in; the page offers Log out under `password` and `oidc`. */
|
|
547
|
+
auth: "none" | "password" | "verifier" | "oidc";
|
|
548
|
+
/** The visitor's tier. Sent only where the host admits more than its owners (`admission: "access"`). */
|
|
549
|
+
tier?: AppTier;
|
|
550
|
+
/** The steps still undone before the app opens; present only while the gate is closed. */
|
|
551
|
+
gate?: GateStepView[];
|
|
386
552
|
/** When the credential lapses, if it does. */
|
|
387
553
|
expiresAt?: string;
|
|
388
554
|
/** Web Push is available: the app serves the rooms and a key for it. */
|
|
@@ -419,6 +585,85 @@ export interface PushDevicesView {
|
|
|
419
585
|
devices: PushDeviceView[];
|
|
420
586
|
}
|
|
421
587
|
|
|
588
|
+
/** A test push was queued; the device's receipt for `tag` completes the push step. */
|
|
589
|
+
export interface PushTestView {
|
|
590
|
+
tag: string;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
/** The person's own push preferences. */
|
|
594
|
+
export interface PushPrefsView {
|
|
595
|
+
/** No push for a normal notice from `start` to `end` on the clock of `timeZone`; absent = none set. */
|
|
596
|
+
quiet?: { start: string; end: string; timeZone: string };
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
/** The person's notices that are not resolved, newest first, and the count the app icon shows. */
|
|
600
|
+
export interface NoticesView {
|
|
601
|
+
notices: NoticeView[];
|
|
602
|
+
badge: number;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
/** One account the person may link, as the profile page shows it. */
|
|
606
|
+
export interface LinkView {
|
|
607
|
+
provider: string;
|
|
608
|
+
label: string;
|
|
609
|
+
/** What linking it is for this deployment: `required` gates the app, `nudge` asks; absent = optional. */
|
|
610
|
+
step?: "required" | "nudge";
|
|
611
|
+
/** Providers to link first, and those of them not linked yet (`issue` is refused until none is left). */
|
|
612
|
+
requires: string[];
|
|
613
|
+
blockedBy: string[];
|
|
614
|
+
linked?: {
|
|
615
|
+
displayName?: string;
|
|
616
|
+
/** ISO time. */
|
|
617
|
+
linkedAt: string;
|
|
618
|
+
/** The configuration or the CLI made the link, so it cannot be removed here. */
|
|
619
|
+
locked?: true;
|
|
620
|
+
};
|
|
621
|
+
pending?: {
|
|
622
|
+
request: string;
|
|
623
|
+
/** ISO time. */
|
|
624
|
+
expiresAt: string;
|
|
625
|
+
redeemedBy?: { displayName: string; picture?: PictureRef };
|
|
626
|
+
};
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
export interface LinksView {
|
|
630
|
+
links: LinkView[];
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
/** The code a person puts into the other service to prove an account. */
|
|
634
|
+
export interface LinkIssuedView {
|
|
635
|
+
code: string;
|
|
636
|
+
request: string;
|
|
637
|
+
/** ISO time. */
|
|
638
|
+
expiresAt: string;
|
|
639
|
+
instructions: string;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
/** How the person is shown, and which of their accounts they may pick to show. */
|
|
643
|
+
export interface ProfileView {
|
|
644
|
+
name: string;
|
|
645
|
+
/** The account the name comes from; absent when it is the person's own name. */
|
|
646
|
+
source?: string;
|
|
647
|
+
/** A picture is served at `api/people/<principal>/picture`. */
|
|
648
|
+
picture: boolean;
|
|
649
|
+
principal: string;
|
|
650
|
+
tier?: AppTier;
|
|
651
|
+
/** The accounts the person linked that can name them; the page shows these as the choice. */
|
|
652
|
+
sources: { provider: string; label: string }[];
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
/** A step of onboarding as the page of steps shows it. */
|
|
656
|
+
export interface OnboardingStepView extends GateStepView {
|
|
657
|
+
done: boolean;
|
|
658
|
+
waived: boolean;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
export interface OnboardingView {
|
|
662
|
+
steps: OnboardingStepView[];
|
|
663
|
+
/** Push on the person's devices: how many are subscribed and when one last reported back. */
|
|
664
|
+
push: { devices: number; lastReceiptAt?: string; waived: boolean };
|
|
665
|
+
}
|
|
666
|
+
|
|
422
667
|
/** A schedule, labelled by the room it belongs to or else its channel. */
|
|
423
668
|
export interface ScheduleView {
|
|
424
669
|
id: number;
|
|
@@ -799,7 +1044,12 @@ export type RefusalCode =
|
|
|
799
1044
|
| "unknown_upload"
|
|
800
1045
|
| "empty"
|
|
801
1046
|
| "too_long"
|
|
802
|
-
| "not_accepted"
|
|
1047
|
+
| "not_accepted"
|
|
1048
|
+
/** A required onboarding step stands undone, so the frame is not taken yet. */
|
|
1049
|
+
| "gated";
|
|
1050
|
+
|
|
1051
|
+
/** The values of a form a host action opened. */
|
|
1052
|
+
export type FormInput = Readonly<Record<string, string | readonly string[]>>;
|
|
803
1053
|
|
|
804
1054
|
/** What the page sends: one JSON object per WebSocket text message. */
|
|
805
1055
|
export type ClientFrame =
|
|
@@ -816,8 +1066,27 @@ export type ClientFrame =
|
|
|
816
1066
|
text: string;
|
|
817
1067
|
/** Files uploaded with `POST api/uploads`, by the `id` each returned. */
|
|
818
1068
|
uploads?: string[];
|
|
1069
|
+
/** Host rooms: a `note` only records, a `turn` is also delivered to the host's claim. Default `turn`; an agent room takes only `turn`. */
|
|
1070
|
+
mode?: "note" | "turn";
|
|
819
1071
|
}
|
|
820
1072
|
| { type: "stop"; room: string }
|
|
1073
|
+
/** Host rooms: follow a room's frames. At most 200 at once; the viewer must be able to read it. */
|
|
1074
|
+
| { type: "subscribe"; room: string }
|
|
1075
|
+
| { type: "unsubscribe"; room: string }
|
|
1076
|
+
/** A host room's or page's action: a card's button, a header action, a form. */
|
|
1077
|
+
| {
|
|
1078
|
+
type: "act";
|
|
1079
|
+
id: string;
|
|
1080
|
+
room?: string;
|
|
1081
|
+
page?: string;
|
|
1082
|
+
action: string;
|
|
1083
|
+
card?: string;
|
|
1084
|
+
input?: FormInput;
|
|
1085
|
+
}
|
|
1086
|
+
/** The person handled a notice. */
|
|
1087
|
+
| { type: "ack"; tag: string }
|
|
1088
|
+
/** The person has read a room up to this message (a cursor never moves back). */
|
|
1089
|
+
| { type: "read"; room: string; upTo: number }
|
|
821
1090
|
| { type: "approval"; prompt: string; approved: boolean }
|
|
822
1091
|
| { type: "answer"; prompt: string; answer: PromptAnswer }
|
|
823
1092
|
| {
|
|
@@ -839,6 +1108,8 @@ export type ServerFrame =
|
|
|
839
1108
|
name: string;
|
|
840
1109
|
/** The most files one message carries and the most bytes of one. */
|
|
841
1110
|
uploads: { perMessage: number; maxBytes: number };
|
|
1111
|
+
/** The required steps the person still owes, when there are any: the socket then carries only the gate and their notices. */
|
|
1112
|
+
gate?: GateStepView[];
|
|
842
1113
|
}
|
|
843
1114
|
/** The message `id` was taken into `room`; `message` is how it was stored. */
|
|
844
1115
|
| { type: "accepted"; id: string; room: string; message: RoomMessage }
|
|
@@ -882,7 +1153,33 @@ export type ServerFrame =
|
|
|
882
1153
|
/** Yolo mode approved a held call by itself. */
|
|
883
1154
|
| { type: "auto_approved"; room: string; tool: string; action: string }
|
|
884
1155
|
/** The team or the room list may differ: refetch. */
|
|
885
|
-
| { type: "changed" }
|
|
1156
|
+
| { type: "changed" }
|
|
1157
|
+
/** A host room's message, edit or removal, and its cards; sent to the sockets subscribed to the room. */
|
|
1158
|
+
| { type: "host_message"; room: string; message: RoomMessage }
|
|
1159
|
+
| { type: "host_edited"; room: string; message: RoomMessage }
|
|
1160
|
+
| { type: "host_removed"; room: string; id: number }
|
|
1161
|
+
| { type: "host_card"; room: string; card: HostCardView }
|
|
1162
|
+
/** A host room's header or access may differ: refetch it. */
|
|
1163
|
+
| { type: "room_changed"; room: string }
|
|
1164
|
+
/** The list of a kind of host room may differ: refetch it. */
|
|
1165
|
+
| { type: "list_changed"; kind: string }
|
|
1166
|
+
| { type: "page_changed"; page: string }
|
|
1167
|
+
| { type: "notice"; notice: NoticeView }
|
|
1168
|
+
| { type: "notice_resolved"; tag: string }
|
|
1169
|
+
/** The count the app icon shows: notices not handled. */
|
|
1170
|
+
| { type: "badge"; count: number }
|
|
1171
|
+
/** The steps still undone; empty when the gate opened. */
|
|
1172
|
+
| { type: "gate"; steps: GateStepView[] }
|
|
1173
|
+
/** Someone read a room up to a message; `name` and `at` let the page show them without asking. */
|
|
1174
|
+
| {
|
|
1175
|
+
type: "read";
|
|
1176
|
+
room: string;
|
|
1177
|
+
principal: string;
|
|
1178
|
+
name: string;
|
|
1179
|
+
upTo: number;
|
|
1180
|
+
/** ISO time. */
|
|
1181
|
+
at: string;
|
|
1182
|
+
};
|
|
886
1183
|
|
|
887
1184
|
/** A turn's live view, as the core reports it. */
|
|
888
1185
|
export type AppProgress =
|