@mihe-dev/js 0.1.0 → 0.2.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/dist/card-view.d.ts +79 -0
- package/dist/card-view.d.ts.map +1 -0
- package/dist/card-view.js +99 -0
- package/dist/card-view.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/mihe.d.ts +22 -1
- package/dist/mihe.d.ts.map +1 -1
- package/dist/mihe.iife.min.js +20 -9
- package/dist/mihe.iife.min.js.map +4 -4
- package/dist/mihe.js +39 -1
- package/dist/mihe.js.map +1 -1
- package/dist/mihe.min.js +20 -9
- package/dist/mihe.min.js.map +4 -4
- package/dist/widget/card.d.ts +8 -6
- package/dist/widget/card.d.ts.map +1 -1
- package/dist/widget/card.js +19 -16
- package/dist/widget/card.js.map +1 -1
- package/dist/widget/orb.d.ts +1 -0
- package/dist/widget/orb.d.ts.map +1 -1
- package/dist/widget/orb.js +5 -2
- package/dist/widget/orb.js.map +1 -1
- package/dist/widget/panel.d.ts.map +1 -1
- package/dist/widget/panel.js +2 -1
- package/dist/widget/panel.js.map +1 -1
- package/dist/widget/styles.d.ts +1 -1
- package/dist/widget/styles.d.ts.map +1 -1
- package/dist/widget/styles.js +11 -0
- package/dist/widget/styles.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a confirmation card says (amendment 99), worked out once per proposal
|
|
3
|
+
* and drawn by every card Mihe has: the web component's and the React SDK's.
|
|
4
|
+
*
|
|
5
|
+
* Two sources, both trusted, neither the model:
|
|
6
|
+
*
|
|
7
|
+
* 1. **The app's own description.** `describeProposal` (an option) is handed
|
|
8
|
+
* the proposal, exactly the input that will run, and returns the lines to
|
|
9
|
+
* show: before and after, money in the store's currency, thumbnails. It is
|
|
10
|
+
* the app's code over the app's data, so it can say what a generic card
|
|
11
|
+
* can't. It must describe the input it was given, never anything else.
|
|
12
|
+
* 2. **The registry's display hints**, for an app that doesn't describe a
|
|
13
|
+
* card. They live in the action's input schema as annotations: a summary
|
|
14
|
+
* template at the root (`x-mihe-summary`), and on each field a `title`,
|
|
15
|
+
* `x-mihe-format` (`money`, `yesno`, `date`) and `x-mihe-hidden`. Fields
|
|
16
|
+
* are shown in the schema's order. Hide only an opaque id that has a
|
|
17
|
+
* readable name beside it which the app checks: everything else that will
|
|
18
|
+
* run must be on the card.
|
|
19
|
+
*
|
|
20
|
+
* With neither, the card is what it always was: every field, by its key.
|
|
21
|
+
*/
|
|
22
|
+
import type { ProposalPayload } from "./client.js";
|
|
23
|
+
/** One line of a card. */
|
|
24
|
+
export interface CardLine {
|
|
25
|
+
/** What the line is about: "Price", "Amber Soy Candle". */
|
|
26
|
+
label?: string;
|
|
27
|
+
/** The value, or what it becomes. */
|
|
28
|
+
text?: string;
|
|
29
|
+
/** What it was before, shown struck through ahead of `text`. */
|
|
30
|
+
before?: string;
|
|
31
|
+
/** A list, each entry on its own line so each can be checked. */
|
|
32
|
+
items?: string[];
|
|
33
|
+
/** Pictures of what the line is about, small. http(s), blob: and data:image only. */
|
|
34
|
+
images?: {
|
|
35
|
+
src: string;
|
|
36
|
+
alt?: string;
|
|
37
|
+
}[];
|
|
38
|
+
}
|
|
39
|
+
/** What `describeProposal` returns. */
|
|
40
|
+
export interface ProposalDescription {
|
|
41
|
+
/** One line saying what will happen: "Change Linen Shirt's price". */
|
|
42
|
+
summary?: string;
|
|
43
|
+
lines: CardLine[];
|
|
44
|
+
/** A short note under the lines: "All start as drafts." */
|
|
45
|
+
note?: string;
|
|
46
|
+
/** The confirm button's words: "Make 3 products". Defaults to "Confirm". */
|
|
47
|
+
confirmLabel?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Describes a proposal for its card, from the app's own data. Return null (or
|
|
51
|
+
* throw) to fall back to the registry's hints. Called once per proposal; the
|
|
52
|
+
* card waits for it, with Confirm disabled, for up to four seconds.
|
|
53
|
+
*/
|
|
54
|
+
export type DescribeProposal = (proposal: ProposalPayload) => ProposalDescription | null | undefined | Promise<ProposalDescription | null | undefined>;
|
|
55
|
+
/** A card ready to draw. */
|
|
56
|
+
export interface CardView extends ProposalDescription {
|
|
57
|
+
/** Where it came from: the app, the registry's hints, or neither. */
|
|
58
|
+
source: "app" | "hints" | "plain";
|
|
59
|
+
}
|
|
60
|
+
type Schema = {
|
|
61
|
+
title?: unknown;
|
|
62
|
+
properties?: Record<string, Schema>;
|
|
63
|
+
items?: Schema;
|
|
64
|
+
"x-mihe-summary"?: unknown;
|
|
65
|
+
"x-mihe-format"?: unknown;
|
|
66
|
+
"x-mihe-hidden"?: unknown;
|
|
67
|
+
};
|
|
68
|
+
/** One value, as its field's hints say to show it. */
|
|
69
|
+
export declare function formatField(value: unknown, schema: unknown): string;
|
|
70
|
+
/** `x-mihe-summary`, filled from the input: "Change {productName}" → "Change Linen Shirt". Null if a field it names is missing. */
|
|
71
|
+
export declare function fillSummary(template: unknown, input: Record<string, unknown>, schema: Schema): string | null;
|
|
72
|
+
/** The card from the registry's hints (or, with none, every field by its key). */
|
|
73
|
+
export declare function hintedView(proposal: ProposalPayload): CardView;
|
|
74
|
+
/** The app's description, made safe to draw (only plain strings, only picture addresses that can't run anything). */
|
|
75
|
+
export declare function appView(d: ProposalDescription): CardView;
|
|
76
|
+
/** How long a card waits for the app's description before drawing from the hints. */
|
|
77
|
+
export declare const DESCRIBE_TIMEOUT_MS = 4000;
|
|
78
|
+
export {};
|
|
79
|
+
//# sourceMappingURL=card-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-view.d.ts","sourceRoot":"","sources":["../../../js/src/card-view.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGhD,0BAA0B;AAC1B,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E,OAAO,EAAE,MAAM,EAAE,OAAO,GAAG,MAAM,CAgBnE;AAED,mIAAmI;AACnI,wBAAgB,WAAW,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAS5G;AAED,kFAAkF;AAClF,wBAAgB,UAAU,CAAC,QAAQ,EAAE,eAAe,GAAG,QAAQ,CAa9D;AAID,qHAAqH;AACrH,wBAAgB,OAAO,CAAC,CAAC,EAAE,mBAAmB,GAAG,QAAQ,CAexD;AAED,qFAAqF;AACrF,eAAO,MAAM,mBAAmB,OAAO,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a confirmation card says (amendment 99), worked out once per proposal
|
|
3
|
+
* and drawn by every card Mihe has: the web component's and the React SDK's.
|
|
4
|
+
*
|
|
5
|
+
* Two sources, both trusted, neither the model:
|
|
6
|
+
*
|
|
7
|
+
* 1. **The app's own description.** `describeProposal` (an option) is handed
|
|
8
|
+
* the proposal, exactly the input that will run, and returns the lines to
|
|
9
|
+
* show: before and after, money in the store's currency, thumbnails. It is
|
|
10
|
+
* the app's code over the app's data, so it can say what a generic card
|
|
11
|
+
* can't. It must describe the input it was given, never anything else.
|
|
12
|
+
* 2. **The registry's display hints**, for an app that doesn't describe a
|
|
13
|
+
* card. They live in the action's input schema as annotations: a summary
|
|
14
|
+
* template at the root (`x-mihe-summary`), and on each field a `title`,
|
|
15
|
+
* `x-mihe-format` (`money`, `yesno`, `date`) and `x-mihe-hidden`. Fields
|
|
16
|
+
* are shown in the schema's order. Hide only an opaque id that has a
|
|
17
|
+
* readable name beside it which the app checks: everything else that will
|
|
18
|
+
* run must be on the card.
|
|
19
|
+
*
|
|
20
|
+
* With neither, the card is what it always was: every field, by its key.
|
|
21
|
+
*/
|
|
22
|
+
import { formatValue, humanizeKey } from "./widget/format.js";
|
|
23
|
+
const asSchema = (v) => (v && typeof v === "object" ? v : {});
|
|
24
|
+
const hidden = (s) => s["x-mihe-hidden"] === true;
|
|
25
|
+
const title = (key, s) => (typeof s.title === "string" && s.title.trim() ? s.title : humanizeKey(key));
|
|
26
|
+
/** One value, as its field's hints say to show it. */
|
|
27
|
+
export function formatField(value, schema) {
|
|
28
|
+
const s = asSchema(schema);
|
|
29
|
+
const fmt = s["x-mihe-format"];
|
|
30
|
+
if (fmt === "yesno" && typeof value === "boolean")
|
|
31
|
+
return value ? "Yes" : "No";
|
|
32
|
+
if (fmt === "money" && typeof value === "number")
|
|
33
|
+
return value.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
|
34
|
+
if (fmt === "date" && typeof value === "string" && !Number.isNaN(Date.parse(value)))
|
|
35
|
+
return new Date(value).toLocaleDateString(undefined, { day: "numeric", month: "short", year: "numeric" });
|
|
36
|
+
if (Array.isArray(value))
|
|
37
|
+
return value.map((v) => formatField(v, s.items)).join(", ") || "—";
|
|
38
|
+
if (value && typeof value === "object") {
|
|
39
|
+
const props = s.properties ?? {};
|
|
40
|
+
const keys = [...Object.keys(props).filter((k) => k in value), ...Object.keys(value).filter((k) => !(k in props))];
|
|
41
|
+
const visible = keys.filter((k) => !hidden(asSchema(props[k])));
|
|
42
|
+
// With hints, an object reads as its fields in order, labelled by their titles ("Amber Candle · Price 18").
|
|
43
|
+
if (Object.keys(props).length)
|
|
44
|
+
return visible.map((k) => (k === visible[0] && typeof value[k] === "string" ? String(value[k]) : `${title(k, asSchema(props[k]))} ${formatField(value[k], props[k])}`)).join(" · ");
|
|
45
|
+
return formatValue(value);
|
|
46
|
+
}
|
|
47
|
+
return formatValue(value);
|
|
48
|
+
}
|
|
49
|
+
/** `x-mihe-summary`, filled from the input: "Change {productName}" → "Change Linen Shirt". Null if a field it names is missing. */
|
|
50
|
+
export function fillSummary(template, input, schema) {
|
|
51
|
+
if (typeof template !== "string" || !template.trim())
|
|
52
|
+
return null;
|
|
53
|
+
let missing = false;
|
|
54
|
+
const out = template.replace(/\{([A-Za-z0-9_]+)\}/g, (_, key) => {
|
|
55
|
+
const v = input[key];
|
|
56
|
+
if (v === undefined || v === null || v === "") {
|
|
57
|
+
missing = true;
|
|
58
|
+
return "";
|
|
59
|
+
}
|
|
60
|
+
return Array.isArray(v) ? String(v.length) : formatField(v, schema.properties?.[key]);
|
|
61
|
+
});
|
|
62
|
+
return missing ? null : out;
|
|
63
|
+
}
|
|
64
|
+
/** The card from the registry's hints (or, with none, every field by its key). */
|
|
65
|
+
export function hintedView(proposal) {
|
|
66
|
+
const schema = asSchema(proposal.inputSchema);
|
|
67
|
+
const props = schema.properties ?? {};
|
|
68
|
+
const input = proposal.input ?? {};
|
|
69
|
+
const hinted = !!schema["x-mihe-summary"] || Object.values(props).some((p) => { const s = asSchema(p); return typeof s.title === "string" || hidden(s) || s["x-mihe-format"] !== undefined; });
|
|
70
|
+
const keys = [...Object.keys(props).filter((k) => k in input), ...Object.keys(input).filter((k) => !(k in props))];
|
|
71
|
+
const lines = keys.filter((k) => !hidden(asSchema(props[k]))).map((k) => {
|
|
72
|
+
const v = input[k];
|
|
73
|
+
const label = hinted ? title(k, asSchema(props[k])) : humanizeKey(k);
|
|
74
|
+
return Array.isArray(v) && v.length > 0 ? { label, items: v.map((x) => formatField(x, asSchema(props[k]).items)) } : { label, text: formatField(v, props[k]) };
|
|
75
|
+
});
|
|
76
|
+
const summary = fillSummary(schema["x-mihe-summary"], input, schema) ?? undefined;
|
|
77
|
+
return { source: hinted ? "hints" : "plain", ...(summary ? { summary } : {}), lines };
|
|
78
|
+
}
|
|
79
|
+
const SAFE_SRC = /^(https?:|blob:|data:image\/)/i;
|
|
80
|
+
/** The app's description, made safe to draw (only plain strings, only picture addresses that can't run anything). */
|
|
81
|
+
export function appView(d) {
|
|
82
|
+
const str = (v) => (typeof v === "string" ? v : v === undefined || v === null ? undefined : String(v));
|
|
83
|
+
return {
|
|
84
|
+
source: "app",
|
|
85
|
+
...(str(d.summary) ? { summary: str(d.summary) } : {}),
|
|
86
|
+
...(str(d.note) ? { note: str(d.note) } : {}),
|
|
87
|
+
...(str(d.confirmLabel) ? { confirmLabel: str(d.confirmLabel) } : {}),
|
|
88
|
+
lines: (Array.isArray(d.lines) ? d.lines : []).map((l) => ({
|
|
89
|
+
...(str(l.label) ? { label: str(l.label) } : {}),
|
|
90
|
+
...(str(l.text) !== undefined ? { text: str(l.text) } : {}),
|
|
91
|
+
...(str(l.before) !== undefined ? { before: str(l.before) } : {}),
|
|
92
|
+
...(Array.isArray(l.items) ? { items: l.items.map((x) => String(x)) } : {}),
|
|
93
|
+
...(Array.isArray(l.images) ? { images: l.images.filter((im) => im && typeof im.src === "string" && SAFE_SRC.test(im.src)).slice(0, 12).map((im) => ({ src: im.src, ...(str(im.alt) ? { alt: str(im.alt) } : {}) })) } : {}),
|
|
94
|
+
})),
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
/** How long a card waits for the app's description before drawing from the hints. */
|
|
98
|
+
export const DESCRIBE_TIMEOUT_MS = 4000;
|
|
99
|
+
//# sourceMappingURL=card-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-view.js","sourceRoot":"","sources":["../../../js/src/card-view.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAyC3D,MAAM,QAAQ,GAAG,CAAC,CAAU,EAAU,EAAE,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAE,CAAY,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAC3F,MAAM,MAAM,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;AAC1D,MAAM,KAAK,GAAG,CAAC,GAAW,EAAE,CAAS,EAAE,EAAE,CAAC,CAAC,OAA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AAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC7N,CAAC,CAAC;KACJ,CAAC;AACJ,CAAC;AAED,qFAAqF;AACrF,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ export type { AssistantChart, AssistantQueryParam, AssistantTable, AssistantTabl
|
|
|
23
23
|
export { mountWidget, defineMiheAssistant, ELEMENT_NAME } from "./widget/element.js";
|
|
24
24
|
export type { MiheAssistantElement, MountedWidget, WidgetOptions } from "./widget/element.js";
|
|
25
25
|
export { formatValue, humanizeKey } from "./widget/format.js";
|
|
26
|
+
export { appView, fillSummary, formatField, hintedView, DESCRIBE_TIMEOUT_MS } from "./card-view.js";
|
|
27
|
+
export type { CardLine, CardView, DescribeProposal, ProposalDescription } from "./card-view.js";
|
|
26
28
|
export { VoiceSession, voiceUrl } from "./voice.js";
|
|
27
29
|
export type { VoiceEvent, VoiceState, VoiceSessionOptions } from "./voice.js";
|
|
28
30
|
export { MicrophoneCapture, SpeakerQueue, toPcm16, fromPcm16 } from "./audio.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../js/src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAC3E,YAAY,EAAE,WAAW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AC3D,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACjG,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAE7F,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACjD,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE3E,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE9E,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,YAAY,EACV,aAAa,EACb,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,EACR,sBAAsB,GACvB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,YAAY,EACV,WAAW,EACX,aAAa,EACb,eAAe,EACf,eAAe,GAChB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC9C,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEnE,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -20,6 +20,7 @@ export { Mihe, createMihe, SDK_VERSION, ASSISTANT_PANEL_ID } from "./mihe.js";
|
|
|
20
20
|
export { chartDeclaration, chartSignature, tableDeclaration, tableSignature, tabsDeclaration, tabsSignature, } from "./declarations.js";
|
|
21
21
|
export { mountWidget, defineMiheAssistant, ELEMENT_NAME } from "./widget/element.js";
|
|
22
22
|
export { formatValue, humanizeKey } from "./widget/format.js";
|
|
23
|
+
export { appView, fillSummary, formatField, hintedView, DESCRIBE_TIMEOUT_MS } from "./card-view.js";
|
|
23
24
|
export { VoiceSession, voiceUrl } from "./voice.js";
|
|
24
25
|
export { MicrophoneCapture, SpeakerQueue, toPcm16, fromPcm16 } from "./audio.js";
|
|
25
26
|
export { AssistantStore } from "./store.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../js/src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAG3E,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,aAAa,GACd,MAAM,gBAAgB,CAAC;AAUxB,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAElF,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../js/src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAG3E,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,aAAa,GACd,MAAM,gBAAgB,CAAC;AAUxB,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAElF,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGjG,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGjD,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE9E,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAWzC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAQ3C,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAG9C,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEnE,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/mihe.d.ts
CHANGED
|
@@ -15,10 +15,11 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { KnowledgeSourceRef, ProposalStatus, WidgetSettings } from "@mihe-dev/protocol";
|
|
17
17
|
import { type ConnectionState, type ProposalPayload } from "./client.js";
|
|
18
|
+
import { type CardView, type DescribeProposal } from "./card-view.js";
|
|
18
19
|
import { type AssistantChart, type AssistantTable, type AssistantTabs } from "./declarations.js";
|
|
19
20
|
import { AssistantStore, type ActionHandler, type ComponentDeclaration, type ScreenDeclaration } from "./store.js";
|
|
20
21
|
import { type VoiceState } from "./voice.js";
|
|
21
|
-
export declare const SDK_VERSION = "0.
|
|
22
|
+
export declare const SDK_VERSION = "0.2.0";
|
|
22
23
|
/**
|
|
23
24
|
* DOM id of the assistant panel, so a custom trigger can point
|
|
24
25
|
* `aria-controls` at it.
|
|
@@ -110,6 +111,12 @@ export interface MiheState {
|
|
|
110
111
|
messages: ChatMessage[];
|
|
111
112
|
/** Confirmation cards awaiting a decision. */
|
|
112
113
|
proposals: ProposalPayload[];
|
|
114
|
+
/**
|
|
115
|
+
* What each card says, by proposal id (amendment 99): the app's description
|
|
116
|
+
* or the registry's hints. `"pending"` while the app is describing it, when
|
|
117
|
+
* the card shows its title and keeps Confirm disabled.
|
|
118
|
+
*/
|
|
119
|
+
cardViews: Record<string, CardView | "pending">;
|
|
113
120
|
/** True from the moment a turn starts until it completes or fails. */
|
|
114
121
|
busy: boolean;
|
|
115
122
|
lastError: string | null;
|
|
@@ -184,6 +191,14 @@ export interface MiheOptions {
|
|
|
184
191
|
* while building an integration; leave it off in production.
|
|
185
192
|
*/
|
|
186
193
|
debug?: boolean;
|
|
194
|
+
/**
|
|
195
|
+
* Say what a confirmation card means, from the app's own data (amendment
|
|
196
|
+
* 99): before and after ("$12 → $13"), money in the right currency,
|
|
197
|
+
* thumbnails of the photos involved. Handed exactly the input that will run;
|
|
198
|
+
* describe that and nothing else. Without it, or when it returns null, the
|
|
199
|
+
* card uses the registry's display hints. See `ProposalDescription`.
|
|
200
|
+
*/
|
|
201
|
+
describeProposal?: DescribeProposal;
|
|
187
202
|
}
|
|
188
203
|
/** Create the assistant and connect it. */
|
|
189
204
|
export declare function createMihe(options: MiheOptions): Mihe;
|
|
@@ -249,6 +264,12 @@ export declare class Mihe {
|
|
|
249
264
|
/** Disconnect and drop every listener. The instance is done after this. */
|
|
250
265
|
destroy(): void;
|
|
251
266
|
send: (text: string) => void;
|
|
267
|
+
/**
|
|
268
|
+
* Work out what a card says (amendment 99). The app's description when it
|
|
269
|
+
* gives one in time, else the registry's hints. Until then the card is
|
|
270
|
+
* pending, so nobody confirms a card whose words are about to change.
|
|
271
|
+
*/
|
|
272
|
+
private describe;
|
|
252
273
|
respondToProposal: (proposalId: string, confirmed: boolean) => void;
|
|
253
274
|
open: () => void;
|
|
254
275
|
close: () => void;
|
package/dist/mihe.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mihe.d.ts","sourceRoot":"","sources":["../../../js/src/mihe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,cAAc,EAEd,cAAc,EACf,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,eAAe,EACrB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"mihe.d.ts","sourceRoot":"","sources":["../../../js/src/mihe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,cAAc,EAEd,cAAc,EACf,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,eAAe,EACrB,MAAM,UAAU,CAAC;AAClB,OAAO,EAA4C,KAAK,QAAQ,EAAE,KAAK,gBAAgB,EAA4B,MAAM,aAAa,CAAC;AAGvI,OAAO,EAOL,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,cAAc,EACd,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACvB,MAAM,SAAS,CAAC;AACjB,OAAO,EAA2C,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAYnF,eAAO,MAAM,WAAW,UAAU,CAAC;AAEnC;;;GAGG;AACH,eAAO,MAAM,kBAAkB,eAAe,CAAC;AAE/C,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,kBAAkB,EAAE,CAAC;CAChC;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,OAAO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