@buoy-gg/ask-buoy 7.0.77 → 7.0.79
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/lib/commonjs/blocks/ExtraBlocks.js +1 -1
- package/lib/commonjs/blocks/choiceLogic.js +1 -0
- package/lib/commonjs/blocks/choiceLogic.test.js +1 -0
- package/lib/commonjs/components/ApprovalCard.js +1 -1
- package/lib/commonjs/components/AskBuoyModal.js +2 -2
- package/lib/commonjs/components/AskBuoySettings.js +1 -1
- package/lib/commonjs/components/EmptyState.js +1 -1
- package/lib/commonjs/components/Markdown.js +1 -1
- package/lib/commonjs/components/sheetText.test.js +1 -0
- package/lib/commonjs/store/askBuoyStore.js +2 -2
- package/lib/commonjs/store/transcriptPersistence.js +1 -1
- package/lib/commonjs/store/transcriptPersistence.test.js +1 -1
- package/lib/commonjs/store/useAskBuoy.js +1 -1
- package/lib/module/blocks/ExtraBlocks.js +1 -1
- package/lib/module/blocks/choiceLogic.js +1 -0
- package/lib/module/blocks/choiceLogic.test.js +1 -0
- package/lib/module/components/ApprovalCard.js +1 -1
- package/lib/module/components/AskBuoyModal.js +2 -2
- package/lib/module/components/AskBuoySettings.js +1 -1
- package/lib/module/components/EmptyState.js +1 -1
- package/lib/module/components/Markdown.js +1 -1
- package/lib/module/components/sheetText.test.js +1 -0
- package/lib/module/store/askBuoyStore.js +1 -1
- package/lib/module/store/transcriptPersistence.js +1 -1
- package/lib/module/store/transcriptPersistence.test.js +1 -1
- package/lib/module/store/useAskBuoy.js +1 -1
- package/lib/typescript/blocks/choiceLogic.d.ts +41 -0
- package/lib/typescript/blocks/choiceLogic.test.d.ts +2 -0
- package/lib/typescript/components/sheetText.test.d.ts +2 -0
- package/lib/typescript/store/askBuoyStore.d.ts +6 -0
- package/lib/typescript/store/transcriptPersistence.d.ts +14 -0
- package/lib/typescript/sync/wire.d.ts +8 -6
- package/lib/web/index.mjs +11 -11
- package/package.json +7 -7
- package/lib/commonjs/blocks/AskBlocks.test.js +0 -1
- package/lib/commonjs/components/Composer.test.js +0 -1
- package/lib/commonjs/components/EmptyState.test.js +0 -1
- package/lib/module/blocks/AskBlocks.test.js +0 -1
- package/lib/module/components/Composer.test.js +0 -1
- package/lib/module/components/EmptyState.test.js +0 -1
- package/lib/typescript/blocks/AskBlocks.test.d.ts +0 -2
- package/lib/typescript/components/Composer.test.d.ts +0 -2
- package/lib/typescript/components/EmptyState.test.d.ts +0 -2
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pure rules behind the Select, MultiSelect, Form and Proposal blocks.
|
|
3
|
+
* Kept out of ExtraBlocks.tsx so they can be tested without rendering.
|
|
4
|
+
*/
|
|
5
|
+
import type { BlockAnswer, ChoiceOption } from "@buoy-gg/agent-core";
|
|
6
|
+
/** Options needed before a search field earns its space. */
|
|
7
|
+
export declare const SEARCH_FROM = 8;
|
|
8
|
+
/** Rows a searchable Select shows at once; typing narrows the rest. */
|
|
9
|
+
export declare const SEARCH_CAP = 8;
|
|
10
|
+
export interface SelectView {
|
|
11
|
+
showSearch: boolean;
|
|
12
|
+
/** The rows to draw. */
|
|
13
|
+
items: ChoiceOption[];
|
|
14
|
+
/** Matching rows left out by the cap — the "N more" count. */
|
|
15
|
+
hidden: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* What a Select draws for the current query.
|
|
19
|
+
*
|
|
20
|
+
* The cap only applies when there is a search field to narrow the list with:
|
|
21
|
+
* capping a list the reader cannot search would make the rest unreachable.
|
|
22
|
+
* `hidden` counts only options that MATCH the query, so "N more — keep
|
|
23
|
+
* typing" never promises rows that typing would not find.
|
|
24
|
+
*/
|
|
25
|
+
export declare function selectView(options: ChoiceOption[], query: string, searchable?: boolean): SelectView;
|
|
26
|
+
/**
|
|
27
|
+
* The multi-select answer, ids and labels both in LIST order (the order the
|
|
28
|
+
* reader sees), whatever order the boxes were ticked in. Ids that are not
|
|
29
|
+
* options are dropped so the two arrays always pair up.
|
|
30
|
+
*/
|
|
31
|
+
export declare function multiAnswer(options: ChoiceOption[], picked: string[]): {
|
|
32
|
+
optionIds: string[];
|
|
33
|
+
labels: string[];
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* The values a Form or Proposal shows. Once answered, the values that were
|
|
37
|
+
* SENT win over local state — local state resets when the block remounts, and
|
|
38
|
+
* an "Applied with these values" row must show the values that were applied.
|
|
39
|
+
*/
|
|
40
|
+
export declare function shownFormValues(answer: BlockAnswer | undefined, local: Record<string, unknown>): Record<string, unknown>;
|
|
41
|
+
//# sourceMappingURL=choiceLogic.d.ts.map
|
|
@@ -131,6 +131,12 @@ export interface ChatMessage {
|
|
|
131
131
|
* to do — with a Swift exception underneath it.
|
|
132
132
|
*/
|
|
133
133
|
stopped?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* The turn ended because one of its steps reloaded the app, which took this
|
|
136
|
+
* sheet down with it. Read after the reload to pick the task back up — see
|
|
137
|
+
* `afterReload` in transcriptPersistence.
|
|
138
|
+
*/
|
|
139
|
+
reloadedApp?: boolean;
|
|
134
140
|
/**
|
|
135
141
|
* This bubble came back from disk.
|
|
136
142
|
*
|
|
@@ -73,6 +73,20 @@ export declare function buildPayload(input: {
|
|
|
73
73
|
}): StoredTranscript;
|
|
74
74
|
/** Anything unparseable, or from an older shape, is treated as "no transcript". */
|
|
75
75
|
export declare function parsePayload(raw: string | null): StoredTranscript | null;
|
|
76
|
+
/** Sent for the user when the app reloaded in the middle of a task. */
|
|
77
|
+
export declare const RESUME_AFTER_RELOAD = "The app reloaded. Please finish what you were doing.";
|
|
78
|
+
/** Shown when the task is not picked back up on its own. */
|
|
79
|
+
export declare const RELOAD_NOTE = "The app reloaded during my last step. Say \"continue\" to finish.";
|
|
80
|
+
/**
|
|
81
|
+
* What to do with a chat whose last turn reloaded the app (`reloadedApp`).
|
|
82
|
+
*
|
|
83
|
+
* "resume" sends RESUME_AFTER_RELOAD once, so the task the user asked for
|
|
84
|
+
* finishes, including undoing what it changed. It is the one thing that is
|
|
85
|
+
* sent with no tap after a restart, and only because the reload was a step of
|
|
86
|
+
* that task. Never twice in a row (a task that reloads on every step would
|
|
87
|
+
* loop) and never for a chat opened long after: those get RELOAD_NOTE.
|
|
88
|
+
*/
|
|
89
|
+
export declare function afterReload(saved: StoredTranscript, now: number): "resume" | "note" | null;
|
|
76
90
|
export declare function readTranscript(): Promise<StoredTranscript | null>;
|
|
77
91
|
export declare function writeTranscript(payload: StoredTranscript): Promise<void>;
|
|
78
92
|
/**
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* What the sync adapter is allowed to put on the broker wire.
|
|
3
3
|
*
|
|
4
|
-
* The broker
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
4
|
+
* The broker binds every interface and forwards to every connected dashboard.
|
|
5
|
+
* A dashboard must present the broker's `dashboardToken`, and a browser page
|
|
6
|
+
* from a non-local origin needs the owner's OK. A native app needs neither: it
|
|
7
|
+
* can join as a device from anywhere on the network. The broker drops Buoy
|
|
8
|
+
* key names from device metadata (`redactAccountKeys`). Even so, a chat
|
|
9
|
+
* transcript is not a safe thing to send unfiltered: the agent reads storage
|
|
10
|
+
* values, network response bodies and user records, and any of it can end up
|
|
11
|
+
* quoted in an answer.
|
|
10
12
|
*
|
|
11
13
|
* So text crossing the wire is scrubbed for the shapes that are unambiguously
|
|
12
14
|
* credentials. This is a reduction in blast radius, not a guarantee — the real
|