@belonguniverseai/react-sdk 0.6.4 → 0.6.6
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/api/client.d.ts +197 -0
- package/dist/api/pre-prompts.d.ts +80 -0
- package/dist/api/query-keys.d.ts +4 -0
- package/dist/api/skills.d.ts +8 -3
- package/dist/component/{abnfDiagram-N423BO3Z-DR3fMT7g.js → abnfDiagram-N423BO3Z-C6FcPK3d.js} +4 -4
- package/dist/component/{arc-DJkYOSuJ.js → arc-BFUQjzCS.js} +2 -2
- package/dist/component/{architectureDiagram-T3A2C74G-BIp4IBPk.js → architectureDiagram-T3A2C74G-BDBrDBki.js} +3 -3
- package/dist/component/{blockDiagram-VBNYF7ZC-BqryGqC6.js → blockDiagram-VBNYF7ZC-UZV4Vc3P.js} +4 -4
- package/dist/component/{c4Diagram-5PPSVZJV-GktlF-Di.js → c4Diagram-5PPSVZJV-CCPtctjO.js} +3 -3
- package/dist/component/{channel-3CusDaXb.js → channel-CIUveBDa.js} +2 -2
- package/dist/component/{chunk-2GRJ4B5K-DMTs6j_c.js → chunk-2GRJ4B5K-CRCj56HD.js} +2 -2
- package/dist/component/{chunk-2Q5K7J3B-CIU34hPH.js → chunk-2Q5K7J3B-CL0yogzL.js} +2 -2
- package/dist/component/{chunk-5RXB4S5H-Ds3vF1Mv.js → chunk-5RXB4S5H-Blwl04-V.js} +5 -5
- package/dist/component/{chunk-5VM5RSS4-DGxDkIm6.js → chunk-5VM5RSS4-C497fKeV.js} +2 -2
- package/dist/component/{chunk-6Q2QTUOP-BI8oZt98.js → chunk-6Q2QTUOP-C_2Jk1ii.js} +2 -2
- package/dist/component/{chunk-GF5L2VYU-D-36xUd5.js → chunk-GF5L2VYU-Cs_Nhfpw.js} +6 -6
- package/dist/component/{chunk-JWPE2WC7-8N_wQ762.js → chunk-JWPE2WC7-Dcs41Q_n.js} +2 -2
- package/dist/component/{chunk-KBJHAD2P-ChxxpkWc.js → chunk-KBJHAD2P-BWm1frM-.js} +2 -2
- package/dist/component/{chunk-RYQCIY6F-CSY-95OP.js → chunk-RYQCIY6F-XA_jesTk.js} +2 -2
- package/dist/component/{chunk-XXDRQBXY-BQd9yyE1.js → chunk-XXDRQBXY-BDtOkxP3.js} +2 -2
- package/dist/component/{classDiagram-JCYQIIEL-BOq63iUL.js → classDiagram-JCYQIIEL-CvZflq4I.js} +3 -3
- package/dist/component/{classDiagram-v2-OCEON4UE-BOq63iUL.js → classDiagram-v2-OCEON4UE-CvZflq4I.js} +3 -3
- package/dist/component/{cose-bilkent-JH36ORCC-B9x8cp5w.js → cose-bilkent-JH36ORCC-C1arfbyI.js} +2 -2
- package/dist/component/{cynefinDiagram-MW4NZA55-OF6l99SS.js → cynefinDiagram-MW4NZA55-CS5V8R4P.js} +3 -3
- package/dist/component/{dagre-VZM6K2ZE-CELO1hFb.js → dagre-VZM6K2ZE-BZ6hBjLx.js} +3 -3
- package/dist/component/{diagram-7IWD3JNH-COzvm6E2.js → diagram-7IWD3JNH-sP7Tm4Ov.js} +4 -4
- package/dist/component/{diagram-B4RE2ZJO-DR9KMRGw.js → diagram-B4RE2ZJO-BNGAdSWl.js} +3 -3
- package/dist/component/{diagram-LBJQPF4R-D47Zqm-k.js → diagram-LBJQPF4R-FUyO9neA.js} +3 -3
- package/dist/component/{diagram-Q27KOJAE-Key1bw_Y.js → diagram-Q27KOJAE-j_dqjRdo.js} +4 -4
- package/dist/component/{diagram-UB23O5K3-Cxf-sZnK.js → diagram-UB23O5K3-C9DPA3Ub.js} +3 -3
- package/dist/component/{ebnfDiagram-BXEA7PRR-C8uURt_x.js → ebnfDiagram-BXEA7PRR-D33P9__e.js} +4 -4
- package/dist/component/{erDiagram-JOGREHBK-CpCxe8Ib.js → erDiagram-JOGREHBK-DOB0CdMC.js} +5 -5
- package/dist/component/{flowDiagram-UKHOOZJN-urFG2I71.js → flowDiagram-UKHOOZJN-Byd1bpG0.js} +7 -7
- package/dist/component/{ganttDiagram-PKOTCBZU-8nA9faYf.js → ganttDiagram-PKOTCBZU-DYe8BZEh.js} +3 -3
- package/dist/component/{gitGraphDiagram-DS77QQ5N-u4cbNW8o.js → gitGraphDiagram-DS77QQ5N-XZ8Mo4GA.js} +4 -4
- package/dist/component/{highlighted-body-OFNGDK62-Bo-15uvJ.js → highlighted-body-OFNGDK62-CL31TQjN.js} +2 -2
- package/dist/component/index.js +2 -2
- package/dist/component/{infoDiagram-6WML65LV-ZAv4gZpA.js → infoDiagram-6WML65LV-CKFHlOyG.js} +2 -2
- package/dist/component/{ishikawaDiagram-WSZJBQD7-CvB6evSz.js → ishikawaDiagram-WSZJBQD7-DcYs6_Ks.js} +2 -2
- package/dist/component/{journeyDiagram-NVQOT4AX-M5BRYuPr.js → journeyDiagram-NVQOT4AX-BdL6QUhp.js} +5 -5
- package/dist/component/{kanban-definition-27J2QSJJ-LL6GkmVe.js → kanban-definition-27J2QSJJ-BXSCmJV1.js} +3 -3
- package/dist/component/{linear-DVg61V66.js → linear-CKjHF2HZ.js} +2 -2
- package/dist/component/{mermaid-GHXKKRXX-C2L7fCIM.js → mermaid-GHXKKRXX-DkoZohjm.js} +30023 -28852
- package/dist/component/{mindmap-definition-FAOFIHXS-BBZzsLh7.js → mindmap-definition-FAOFIHXS-DW4hhNZQ.js} +4 -4
- package/dist/component/{pegDiagram-VL7TDLO6-BEG86cY8.js → pegDiagram-VL7TDLO6-Bi-Kyrnt.js} +4 -4
- package/dist/component/{pieDiagram-7S7Q4E2Y-BTkrNjAi.js → pieDiagram-7S7Q4E2Y-BMhIZVGK.js} +4 -4
- package/dist/component/{quadrantDiagram-CIZ2JOQS-BsjBAd4w.js → quadrantDiagram-CIZ2JOQS-bceN8tX9.js} +3 -3
- package/dist/component/{railroadDiagram-AXF67PYL-DuE0ZFxj.js → railroadDiagram-AXF67PYL-D-nJshKI.js} +4 -4
- package/dist/component/{requirementDiagram-LRYGKXZP-CcshEEMy.js → requirementDiagram-LRYGKXZP-CYZUa3OC.js} +4 -4
- package/dist/component/{sankeyDiagram-W5VNT64P-CFn011ig.js → sankeyDiagram-W5VNT64P-BGB3WZee.js} +2 -2
- package/dist/component/{sequenceDiagram-SI44F4Z6-DmMZNJDw.js → sequenceDiagram-SI44F4Z6-C1vZr0MI.js} +4 -4
- package/dist/component/{sizeCapture-X5ZJPWSS-Ce4PhIAO.js → sizeCapture-X5ZJPWSS-RlcsaXgG.js} +2 -2
- package/dist/component/{stateDiagram-OKZ733FA-DDVzQKaO.js → stateDiagram-OKZ733FA-fvMUXvo7.js} +3 -3
- package/dist/component/{stateDiagram-v2-UEYNNEHI-DeeW8PDA.js → stateDiagram-v2-UEYNNEHI-C5wIei7D.js} +3 -3
- package/dist/component/{swimlanes-SLNWSIFB-CZh2_vzg.js → swimlanes-SLNWSIFB-C3hQy7qq.js} +4 -4
- package/dist/component/{swimlanesDiagram-ULZ7WXOC-Wb0Ri7qR.js → swimlanesDiagram-ULZ7WXOC-ByZ1cbCX.js} +3 -3
- package/dist/component/{timeline-definition-Z64GVDOM-rfiLwdTR.js → timeline-definition-Z64GVDOM-D0_tzWD4.js} +3 -3
- package/dist/component/{vennDiagram-T6HMQDX7-D8l7hqNb.js → vennDiagram-T6HMQDX7-C9YEUDaF.js} +2 -2
- package/dist/component/{wardleyDiagram-T6FBY63Y-7YqmpmtC.js → wardleyDiagram-T6FBY63Y-CXHDuHLt.js} +3 -3
- package/dist/component/{xychartDiagram-ELKLHX3M-Dx2ECqt8.js → xychartDiagram-ELKLHX3M-n_ilatMg.js} +3 -3
- package/dist/components/embed/EmbedComposer.d.ts +21 -1
- package/dist/components/embed/EmbedRail.d.ts +5 -1
- package/dist/components/embed/MentionInput.d.ts +16 -1
- package/dist/components/embed/MobileNavBar.d.ts +5 -2
- package/dist/components/embed/SavePromptDialog.d.ts +11 -0
- package/dist/components/embed/save-prompt-name.d.ts +39 -0
- package/dist/components/embed/use-preview-bytes.d.ts +5 -0
- package/dist/components/prompts/ConfirmDeletePromptDialog.d.ts +13 -0
- package/dist/components/prompts/EditPromptDialog.d.ts +14 -0
- package/dist/components/prompts/NewPromptDialog.d.ts +9 -0
- package/dist/components/prompts/PromptsListSurface.d.ts +21 -0
- package/dist/embed/copy.d.ts +9 -0
- package/dist/embed/dock-state.d.ts +1 -1
- package/dist/embed/legal-disclaimer.d.ts +6 -0
- package/dist/embed/prompt-slots.d.ts +26 -0
- package/dist/embed/slash-commands.d.ts +45 -0
- package/dist/embed/voice-unlock.d.ts +36 -0
- package/dist/i18n/messages/en.d.ts +43 -0
- package/dist/i18n/messages/surfaces/embedMisc.d.ts +3 -0
- package/dist/i18n/messages/surfaces/header.d.ts +3 -0
- package/dist/i18n/messages/surfaces/prompts.d.ts +164 -0
- package/dist/routes/prompts.d.ts +2 -0
- package/dist/stream/queued-message-outbox.d.ts +25 -0
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CommandSummary, SkillSummary } from '../api/skills.ts';
|
|
2
|
+
import { PrePromptSummary } from '../api/pre-prompts.ts';
|
|
2
3
|
/** Fallback group label for a workspace command the backend could not
|
|
3
4
|
* attribute to a plugin (flat project commands). Plugin-attributed commands
|
|
4
5
|
* render under their own section instead — see `cmd.group` below. */
|
|
@@ -93,6 +94,50 @@ export declare const applySlashCommand: (text: string, match: SlashTokenMatch, n
|
|
|
93
94
|
readonly text: string;
|
|
94
95
|
readonly caret: number;
|
|
95
96
|
};
|
|
97
|
+
/**
|
|
98
|
+
* Replace the matched `/query` token with the FULL saved body; returns the new
|
|
99
|
+
* draft + the caret at the end of the insert.
|
|
100
|
+
*
|
|
101
|
+
* Deliberately NOT the same splice as {@link applySlashCommand}: that one
|
|
102
|
+
* inserts `/name ` — with a trailing space — so it absorbs a space already at
|
|
103
|
+
* the splice point to avoid a double space. A body carries no trailing space,
|
|
104
|
+
* so absorbing one would glue the saved text to the following word. The token
|
|
105
|
+
* is replaced EXACTLY; prose on both sides survives untouched.
|
|
106
|
+
*/
|
|
107
|
+
export declare const applySlashPrompt: (text: string, match_: SlashTokenMatch, body: string) => {
|
|
108
|
+
readonly text: string;
|
|
109
|
+
readonly caret: number;
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* The section a saved pre-prompt renders under. A stable IDENTITY string (React
|
|
113
|
+
* keys + {@link bucketByGroup}'s tier), NOT the display label — SlashCommandMenu
|
|
114
|
+
* localizes "Your prompts" separately, the same split {@link COMMAND_GROUP}
|
|
115
|
+
* already has.
|
|
116
|
+
*/
|
|
117
|
+
export declare const PRE_PROMPT_GROUP = "Your prompts";
|
|
118
|
+
/**
|
|
119
|
+
* Merge a user's saved pre-prompts into the composer's option list, and hand
|
|
120
|
+
* back the name → body map the composer splices from.
|
|
121
|
+
*
|
|
122
|
+
* THIS is where the ticket's precedence — builtins > skills > workspace
|
|
123
|
+
* commands > pre-prompts — is resolved: a prompt whose name is already claimed
|
|
124
|
+
* by a builtin or by anything in `skills` (which `paletteOptions` in chat.tsx
|
|
125
|
+
* has already ordered commands-then-skills) is DROPPED. Survivors append after
|
|
126
|
+
* the skills, and `bodyByName` is built from the SAME survivor set, so the
|
|
127
|
+
* rendered options and the bodies they insert can never disagree.
|
|
128
|
+
*
|
|
129
|
+
* A name shadowed AFTER the fact (the user saves `reconciliation`, the tenant
|
|
130
|
+
* later publishes a skill by that name) silently loses its menu row here. The
|
|
131
|
+
* save dialog blocks the collision at save time; surfacing a later shadow is a
|
|
132
|
+
* follow-up, not this slice.
|
|
133
|
+
*/
|
|
134
|
+
export declare const mergeSlashOptions: ({ skills, prompts, }: {
|
|
135
|
+
readonly skills: readonly SkillSummary[];
|
|
136
|
+
readonly prompts: readonly PrePromptSummary[];
|
|
137
|
+
}) => {
|
|
138
|
+
readonly options: readonly SkillSummary[];
|
|
139
|
+
readonly bodyByName: ReadonlyMap<string, string>;
|
|
140
|
+
};
|
|
96
141
|
/**
|
|
97
142
|
* Extract the FIRST `/name` token — anywhere in the draft — matching a known
|
|
98
143
|
* skill. Returns the skill + the draft with the token spliced out, or null
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The dock's hidden VOICE unlock — a cheat code typed into the chat composer
|
|
3
|
+
* (`belong:call`) reveals the dial button for THIS browser while
|
|
4
|
+
* `VOICE_CALL_BUTTON_ENABLED` (components/embed/rail-flags.ts) keeps it hidden
|
|
5
|
+
* for everyone else.
|
|
6
|
+
*
|
|
7
|
+
* Deliberately the same shape as dev-mode.ts's `belong:dev`: same exact-match
|
|
8
|
+
* recognizer, same localStorage persistence, same tiny external store so a
|
|
9
|
+
* surface outside the chat route (the rail, the mobile nav) re-renders when the
|
|
10
|
+
* composer flips it. Someone who knows one code can guess how the other behaves.
|
|
11
|
+
*
|
|
12
|
+
* This unlocks an ENTRY POINT, nothing else. The voice stack — `startCall`, the
|
|
13
|
+
* CallScreen, push-to-talk, the reload-survival redial — is always live and
|
|
14
|
+
* unchanged; the flag only decided whether a button was drawn. So this is a
|
|
15
|
+
* visibility toggle, not a feature flag with behaviour behind it, and it grants
|
|
16
|
+
* no capability a user with the button showing would not already have.
|
|
17
|
+
*
|
|
18
|
+
* Toggling, not a one-way door: typing the code again hides the button. A user
|
|
19
|
+
* who turned voice on for a demo must be able to turn it off without clearing
|
|
20
|
+
* site data.
|
|
21
|
+
*/
|
|
22
|
+
export declare const VOICE_CHEAT_CODE = "belong:call";
|
|
23
|
+
/** True when the typed text is the cheat code (trim + case-insensitive).
|
|
24
|
+
* EXACT match only — asking the agent "what is belong:call?" must reach the
|
|
25
|
+
* agent as a question, not vanish into a toggle. */
|
|
26
|
+
export declare const isVoiceCheatCode: (text: string) => boolean;
|
|
27
|
+
/** `useSyncExternalStore` subscribe — fires whenever the unlock changes. */
|
|
28
|
+
export declare const subscribeVoiceUnlock: (listener: () => void) => (() => void);
|
|
29
|
+
/**
|
|
30
|
+
* Whether this browser has opted into the dial button. Storage that throws
|
|
31
|
+
* (Safari private mode, cookies disabled) reads as LOCKED — the safe default,
|
|
32
|
+
* and the same best-effort idiom the rest of the embed layer uses.
|
|
33
|
+
*/
|
|
34
|
+
export declare const readVoiceUnlocked: () => boolean;
|
|
35
|
+
/** Flip the unlock (the cheat code's only effect) and notify every surface. */
|
|
36
|
+
export declare const toggleVoiceUnlocked: () => void;
|
|
@@ -241,6 +241,47 @@ export declare const en: {
|
|
|
241
241
|
readonly approveAndRun: "Approve & run";
|
|
242
242
|
readonly reject: "Reject";
|
|
243
243
|
};
|
|
244
|
+
readonly prompts: {
|
|
245
|
+
readonly saveAsPrompt: "Save as prompt";
|
|
246
|
+
readonly dialogTitle: "Save this as a prompt";
|
|
247
|
+
readonly dialogDescription: string;
|
|
248
|
+
readonly nameLabel: "Name";
|
|
249
|
+
readonly namePlaceholder: "monthly-recon";
|
|
250
|
+
readonly descriptionLabel: "Description (optional)";
|
|
251
|
+
readonly descriptionPlaceholder: "What this prompt does";
|
|
252
|
+
readonly bodyLabel: "What gets saved";
|
|
253
|
+
readonly save: "Save prompt";
|
|
254
|
+
readonly cancel: "Cancel";
|
|
255
|
+
readonly saving: "Saving…";
|
|
256
|
+
readonly errorNameEmpty: "Give your prompt a name.";
|
|
257
|
+
readonly errorNameInvalid: "Use lowercase letters, numbers and dashes — like monthly-recon.";
|
|
258
|
+
readonly errorNameBuiltin: "That name is already a built-in command. Pick another.";
|
|
259
|
+
readonly errorNameSkill: "A skill already uses that name. Pick another.";
|
|
260
|
+
readonly errorNameCommand: "A command already uses that name. Pick another.";
|
|
261
|
+
readonly errorNamePrompt: "You already have a prompt with that name.";
|
|
262
|
+
readonly errorSaveFailed: "Couldn't save your prompt — try again.";
|
|
263
|
+
readonly viewTitle: "Prompts";
|
|
264
|
+
readonly subtitle: "The prompts you saved. Type / in the message box to run one.";
|
|
265
|
+
readonly searchPlaceholder: "Search your prompts";
|
|
266
|
+
readonly loading: "Loading your prompts…";
|
|
267
|
+
readonly loadError: "Couldn't load your prompts.";
|
|
268
|
+
readonly empty: "No saved prompts yet.";
|
|
269
|
+
readonly emptyHint: "Write a message, then choose Save as prompt to keep it here.";
|
|
270
|
+
readonly noResults: "No prompts match “{{q}}”.";
|
|
271
|
+
readonly new: "New prompt";
|
|
272
|
+
readonly bodyPlaceholder: "The message that runs when you use it";
|
|
273
|
+
readonly actionsMenu: "Prompt actions";
|
|
274
|
+
readonly edit: "Edit";
|
|
275
|
+
readonly delete: "Delete";
|
|
276
|
+
readonly editTitle: "Edit prompt";
|
|
277
|
+
readonly editDescription: string;
|
|
278
|
+
readonly saveChanges: "Save changes";
|
|
279
|
+
readonly deleteConfirmTitle: "Delete this prompt?";
|
|
280
|
+
readonly deleteConfirmBody: "It disappears from the / menu. Your past messages are untouched.";
|
|
281
|
+
readonly deleteConfirm: "Delete prompt";
|
|
282
|
+
readonly errorEditFailed: "Couldn't save your changes — try again.";
|
|
283
|
+
readonly errorGone: "That prompt is no longer there.";
|
|
284
|
+
};
|
|
244
285
|
readonly login: {
|
|
245
286
|
readonly welcome: "Welcome to {{name}}";
|
|
246
287
|
readonly byBelong: "by Belong";
|
|
@@ -252,6 +293,7 @@ export declare const en: {
|
|
|
252
293
|
readonly navChat: "Chat";
|
|
253
294
|
readonly navFiles: "Files";
|
|
254
295
|
readonly navScheduled: "Scheduled";
|
|
296
|
+
readonly navPrompts: "Prompts";
|
|
255
297
|
readonly chatPlanRunning: "Chat — plan running, {{completed}} of {{total}} steps done";
|
|
256
298
|
readonly devMode: "Dev mode";
|
|
257
299
|
readonly devModeTitle: "Dev mode (belong:dev)";
|
|
@@ -313,6 +355,7 @@ export declare const en: {
|
|
|
313
355
|
};
|
|
314
356
|
readonly embed: {
|
|
315
357
|
readonly yourSkills: "Your skills";
|
|
358
|
+
readonly yourPrompts: "Your prompts";
|
|
316
359
|
readonly skillsMenuLabel: "Skills";
|
|
317
360
|
readonly minimizeSkills: "Minimize skills";
|
|
318
361
|
readonly expandSkills: "Expand skills";
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
export declare const embedMiscEn: {
|
|
4
4
|
readonly embed: {
|
|
5
5
|
readonly yourSkills: "Your skills";
|
|
6
|
+
readonly yourPrompts: "Your prompts";
|
|
6
7
|
readonly skillsMenuLabel: "Skills";
|
|
7
8
|
readonly minimizeSkills: "Minimize skills";
|
|
8
9
|
readonly expandSkills: "Expand skills";
|
|
@@ -48,6 +49,7 @@ export declare const embedMiscEn: {
|
|
|
48
49
|
export declare const embedMiscEs: {
|
|
49
50
|
embed: {
|
|
50
51
|
yourSkills: string;
|
|
52
|
+
yourPrompts: string;
|
|
51
53
|
skillsMenuLabel: string;
|
|
52
54
|
minimizeSkills: string;
|
|
53
55
|
expandSkills: string;
|
|
@@ -93,6 +95,7 @@ export declare const embedMiscEs: {
|
|
|
93
95
|
export declare const embedMiscPt: {
|
|
94
96
|
embed: {
|
|
95
97
|
yourSkills: string;
|
|
98
|
+
yourPrompts: string;
|
|
96
99
|
skillsMenuLabel: string;
|
|
97
100
|
minimizeSkills: string;
|
|
98
101
|
expandSkills: string;
|
|
@@ -5,6 +5,7 @@ export declare const headerEn: {
|
|
|
5
5
|
readonly navChat: "Chat";
|
|
6
6
|
readonly navFiles: "Files";
|
|
7
7
|
readonly navScheduled: "Scheduled";
|
|
8
|
+
readonly navPrompts: "Prompts";
|
|
8
9
|
readonly chatPlanRunning: "Chat — plan running, {{completed}} of {{total}} steps done";
|
|
9
10
|
readonly devMode: "Dev mode";
|
|
10
11
|
readonly devModeTitle: "Dev mode (belong:dev)";
|
|
@@ -29,6 +30,7 @@ export declare const headerEs: {
|
|
|
29
30
|
navChat: string;
|
|
30
31
|
navFiles: string;
|
|
31
32
|
navScheduled: string;
|
|
33
|
+
navPrompts: string;
|
|
32
34
|
chatPlanRunning: string;
|
|
33
35
|
devMode: string;
|
|
34
36
|
devModeTitle: string;
|
|
@@ -53,6 +55,7 @@ export declare const headerPt: {
|
|
|
53
55
|
navChat: string;
|
|
54
56
|
navFiles: string;
|
|
55
57
|
navScheduled: string;
|
|
58
|
+
navPrompts: string;
|
|
56
59
|
chatPlanRunning: string;
|
|
57
60
|
devMode: string;
|
|
58
61
|
devModeTitle: string;
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Saved-prompt strings: the composer's Save-as-prompt affordance and its
|
|
3
|
+
* dialog (BEL-256), plus the Prompts rail surface that lists, renames, edits
|
|
4
|
+
* and deletes them (BEL-259).
|
|
5
|
+
*
|
|
6
|
+
* Copy names the PRODUCT, never the plumbing (§42): "prompt", never
|
|
7
|
+
* "pre-prompt", "the slash menu" or "the composer". A Simetrik user does not
|
|
8
|
+
* have our vocabulary, and our vocabulary tells them only that something they
|
|
9
|
+
* cannot name went wrong.
|
|
10
|
+
*
|
|
11
|
+
* "Prompts" stays "Prompts" in es and pt. The loanword is what
|
|
12
|
+
* `embed.yourPrompts` already ships in both, and a surface calling itself
|
|
13
|
+
* "Plantillas" while the `/` menu said "prompts" would read as two features.
|
|
14
|
+
*
|
|
15
|
+
* TEACHING `{{slot}}` (BEL-258). `dialogDescription` and `editDescription` are
|
|
16
|
+
* the ONLY places the product says that double braces mean anything — without
|
|
17
|
+
* that sentence every saved prompt carries zero blanks and the feature is
|
|
18
|
+
* unreachable. Both dialogs already render these two strings, so the copy
|
|
19
|
+
* lands at the moment a body is being written with no component change.
|
|
20
|
+
*
|
|
21
|
+
* Two things the copy has to get right:
|
|
22
|
+
*
|
|
23
|
+
* • The EXAMPLE is a real slot. `prompt-slots.ts` matches
|
|
24
|
+
* `{{`+1–64 of `[\p{L}\p{N}_-]`+`}}` — so `{{ two words }}` is prose, not a
|
|
25
|
+
* blank. Spelling the syntax out as a literal "{{double braces}}" would
|
|
26
|
+
* teach a form that silently never selects, so the sentence names the
|
|
27
|
+
* braces in prose and shows a one-word slot the user can copy. Unicode
|
|
28
|
+
* letters count, hence a translated `{{cuenta}}` / `{{conta}}`.
|
|
29
|
+
* • The braces survive i18next. `{{account}}` looks exactly like the `{{q}}`
|
|
30
|
+
* interpolation in `noResults` below, but with `skipOnVariables` (i18next's
|
|
31
|
+
* default, and untouched by `i18n.ts`) a placeholder with no matching
|
|
32
|
+
* option is left verbatim rather than blanked. Pinned in `i18n.test.ts` for
|
|
33
|
+
* all three locales so an interpolation-config change cannot quietly eat
|
|
34
|
+
* the one character the sentence exists to show.
|
|
35
|
+
*/
|
|
36
|
+
export declare const promptsEn: {
|
|
37
|
+
readonly prompts: {
|
|
38
|
+
readonly saveAsPrompt: "Save as prompt";
|
|
39
|
+
readonly dialogTitle: "Save this as a prompt";
|
|
40
|
+
readonly dialogDescription: string;
|
|
41
|
+
readonly nameLabel: "Name";
|
|
42
|
+
readonly namePlaceholder: "monthly-recon";
|
|
43
|
+
readonly descriptionLabel: "Description (optional)";
|
|
44
|
+
readonly descriptionPlaceholder: "What this prompt does";
|
|
45
|
+
readonly bodyLabel: "What gets saved";
|
|
46
|
+
readonly save: "Save prompt";
|
|
47
|
+
readonly cancel: "Cancel";
|
|
48
|
+
readonly saving: "Saving…";
|
|
49
|
+
readonly errorNameEmpty: "Give your prompt a name.";
|
|
50
|
+
readonly errorNameInvalid: "Use lowercase letters, numbers and dashes — like monthly-recon.";
|
|
51
|
+
readonly errorNameBuiltin: "That name is already a built-in command. Pick another.";
|
|
52
|
+
readonly errorNameSkill: "A skill already uses that name. Pick another.";
|
|
53
|
+
readonly errorNameCommand: "A command already uses that name. Pick another.";
|
|
54
|
+
readonly errorNamePrompt: "You already have a prompt with that name.";
|
|
55
|
+
readonly errorSaveFailed: "Couldn't save your prompt — try again.";
|
|
56
|
+
readonly viewTitle: "Prompts";
|
|
57
|
+
readonly subtitle: "The prompts you saved. Type / in the message box to run one.";
|
|
58
|
+
readonly searchPlaceholder: "Search your prompts";
|
|
59
|
+
readonly loading: "Loading your prompts…";
|
|
60
|
+
readonly loadError: "Couldn't load your prompts.";
|
|
61
|
+
readonly empty: "No saved prompts yet.";
|
|
62
|
+
readonly emptyHint: "Write a message, then choose Save as prompt to keep it here.";
|
|
63
|
+
readonly noResults: "No prompts match “{{q}}”.";
|
|
64
|
+
readonly new: "New prompt";
|
|
65
|
+
readonly bodyPlaceholder: "The message that runs when you use it";
|
|
66
|
+
readonly actionsMenu: "Prompt actions";
|
|
67
|
+
readonly edit: "Edit";
|
|
68
|
+
readonly delete: "Delete";
|
|
69
|
+
readonly editTitle: "Edit prompt";
|
|
70
|
+
readonly editDescription: string;
|
|
71
|
+
readonly saveChanges: "Save changes";
|
|
72
|
+
readonly deleteConfirmTitle: "Delete this prompt?";
|
|
73
|
+
readonly deleteConfirmBody: "It disappears from the / menu. Your past messages are untouched.";
|
|
74
|
+
readonly deleteConfirm: "Delete prompt";
|
|
75
|
+
readonly errorEditFailed: "Couldn't save your changes — try again.";
|
|
76
|
+
readonly errorGone: "That prompt is no longer there.";
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
export declare const promptsEs: {
|
|
80
|
+
prompts: {
|
|
81
|
+
saveAsPrompt: string;
|
|
82
|
+
dialogTitle: string;
|
|
83
|
+
dialogDescription: string;
|
|
84
|
+
nameLabel: string;
|
|
85
|
+
namePlaceholder: string;
|
|
86
|
+
descriptionLabel: string;
|
|
87
|
+
descriptionPlaceholder: string;
|
|
88
|
+
bodyLabel: string;
|
|
89
|
+
save: string;
|
|
90
|
+
cancel: string;
|
|
91
|
+
saving: string;
|
|
92
|
+
errorNameEmpty: string;
|
|
93
|
+
errorNameInvalid: string;
|
|
94
|
+
errorNameBuiltin: string;
|
|
95
|
+
errorNameSkill: string;
|
|
96
|
+
errorNameCommand: string;
|
|
97
|
+
errorNamePrompt: string;
|
|
98
|
+
errorSaveFailed: string;
|
|
99
|
+
viewTitle: string;
|
|
100
|
+
subtitle: string;
|
|
101
|
+
searchPlaceholder: string;
|
|
102
|
+
loading: string;
|
|
103
|
+
loadError: string;
|
|
104
|
+
empty: string;
|
|
105
|
+
emptyHint: string;
|
|
106
|
+
noResults: string;
|
|
107
|
+
new: string;
|
|
108
|
+
bodyPlaceholder: string;
|
|
109
|
+
actionsMenu: string;
|
|
110
|
+
edit: string;
|
|
111
|
+
delete: string;
|
|
112
|
+
editTitle: string;
|
|
113
|
+
editDescription: string;
|
|
114
|
+
saveChanges: string;
|
|
115
|
+
deleteConfirmTitle: string;
|
|
116
|
+
deleteConfirmBody: string;
|
|
117
|
+
deleteConfirm: string;
|
|
118
|
+
errorEditFailed: string;
|
|
119
|
+
errorGone: string;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
export declare const promptsPt: {
|
|
123
|
+
prompts: {
|
|
124
|
+
saveAsPrompt: string;
|
|
125
|
+
dialogTitle: string;
|
|
126
|
+
dialogDescription: string;
|
|
127
|
+
nameLabel: string;
|
|
128
|
+
namePlaceholder: string;
|
|
129
|
+
descriptionLabel: string;
|
|
130
|
+
descriptionPlaceholder: string;
|
|
131
|
+
bodyLabel: string;
|
|
132
|
+
save: string;
|
|
133
|
+
cancel: string;
|
|
134
|
+
saving: string;
|
|
135
|
+
errorNameEmpty: string;
|
|
136
|
+
errorNameInvalid: string;
|
|
137
|
+
errorNameBuiltin: string;
|
|
138
|
+
errorNameSkill: string;
|
|
139
|
+
errorNameCommand: string;
|
|
140
|
+
errorNamePrompt: string;
|
|
141
|
+
errorSaveFailed: string;
|
|
142
|
+
viewTitle: string;
|
|
143
|
+
subtitle: string;
|
|
144
|
+
searchPlaceholder: string;
|
|
145
|
+
loading: string;
|
|
146
|
+
loadError: string;
|
|
147
|
+
empty: string;
|
|
148
|
+
emptyHint: string;
|
|
149
|
+
noResults: string;
|
|
150
|
+
new: string;
|
|
151
|
+
bodyPlaceholder: string;
|
|
152
|
+
actionsMenu: string;
|
|
153
|
+
edit: string;
|
|
154
|
+
delete: string;
|
|
155
|
+
editTitle: string;
|
|
156
|
+
editDescription: string;
|
|
157
|
+
saveChanges: string;
|
|
158
|
+
deleteConfirmTitle: string;
|
|
159
|
+
deleteConfirmBody: string;
|
|
160
|
+
deleteConfirm: string;
|
|
161
|
+
errorEditFailed: string;
|
|
162
|
+
errorGone: string;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const queuedMessageOutboxEntrySchema: z.ZodObject<{
|
|
3
|
+
sessionId: z.ZodString;
|
|
4
|
+
text: z.ZodString;
|
|
5
|
+
clientMessageId: z.ZodString;
|
|
6
|
+
submittedAt: z.ZodNumber;
|
|
7
|
+
mode: z.ZodEnum<{
|
|
8
|
+
plan: "plan";
|
|
9
|
+
approve: "approve";
|
|
10
|
+
balanced: "balanced";
|
|
11
|
+
bypass: "bypass";
|
|
12
|
+
}>;
|
|
13
|
+
skill: z.ZodOptional<z.ZodString>;
|
|
14
|
+
fileIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
15
|
+
runtime: z.ZodOptional<z.ZodString>;
|
|
16
|
+
llmProvider: z.ZodOptional<z.ZodString>;
|
|
17
|
+
llmModel: z.ZodOptional<z.ZodString>;
|
|
18
|
+
workspaceExternalId: z.ZodOptional<z.ZodString>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
export type QueuedMessageOutboxEntry = Readonly<z.infer<typeof queuedMessageOutboxEntrySchema>>;
|
|
21
|
+
export declare const readQueuedMessageOutbox: (sessionId: string) => readonly QueuedMessageOutboxEntry[];
|
|
22
|
+
export declare const rememberQueuedMessage: (entry: QueuedMessageOutboxEntry) => void;
|
|
23
|
+
export declare const forgetQueuedMessage: (sessionId: string, clientMessageId: string) => void;
|
|
24
|
+
export declare const forgetQueuedMessages: (sessionId: string, clientMessageIds: ReadonlySet<string>) => void;
|
|
25
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@belonguniverseai/react-sdk",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.6",
|
|
4
4
|
"description": "Belong — embeddable React AI assistant dock. Mount <BelongWidget> in your app tree with getToken dependency-injection auth.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|