@genesislcap/ai-assistant 15.103.2 → 15.105.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/ai-assistant.api.json +55 -1
- package/dist/ai-assistant.d.ts +10 -0
- package/dist/chat-driver.cjs +12 -2
- package/dist/chat-driver.cjs.map +2 -2
- package/dist/chat-driver.mjs +12 -2
- package/dist/chat-driver.mjs.map +2 -2
- package/dist/dts/autopilot/decision-message.d.ts.map +1 -1
- package/dist/dts/headless/describe-interaction.d.ts.map +1 -1
- package/dist/dts/headless/headless.types.d.ts +2 -0
- package/dist/dts/headless/headless.types.d.ts.map +1 -1
- package/dist/dts/headless-server/types.d.ts +1 -0
- package/dist/dts/headless-server/types.d.ts.map +1 -1
- package/dist/dts/state/decision-surface.d.ts.map +1 -1
- package/dist/dts/types/interaction-surface.d.ts +8 -0
- package/dist/dts/types/interaction-surface.d.ts.map +1 -1
- package/dist/esm/autopilot/decision-message.js +3 -2
- package/dist/esm/headless/describe-interaction.js +1 -1
- package/dist/esm/headless-server/compact.js +1 -1
- package/dist/esm/state/decision-surface.js +7 -2
- package/dist/headless-server.cjs +1 -1
- package/dist/headless-server.cjs.map +2 -2
- package/dist/headless-server.mjs +1 -1
- package/dist/headless-server.mjs.map +2 -2
- package/package.json +17 -17
|
@@ -18917,7 +18917,7 @@
|
|
|
18917
18917
|
},
|
|
18918
18918
|
{
|
|
18919
18919
|
"kind": "Content",
|
|
18920
|
-
"text": "string | {\n readonly id?: string;\n readonly label: string;\n readonly unavailable?: () => string | undefined;\n}"
|
|
18920
|
+
"text": "string | {\n readonly id?: string;\n readonly label: string;\n readonly hint?: string;\n readonly unavailable?: () => string | undefined;\n}"
|
|
18921
18921
|
},
|
|
18922
18922
|
{
|
|
18923
18923
|
"kind": "Content",
|
|
@@ -19948,6 +19948,33 @@
|
|
|
19948
19948
|
"endIndex": 2
|
|
19949
19949
|
}
|
|
19950
19950
|
},
|
|
19951
|
+
{
|
|
19952
|
+
"kind": "PropertySignature",
|
|
19953
|
+
"canonicalReference": "@genesislcap/ai-assistant!DescribedAction#hint:member",
|
|
19954
|
+
"docComment": "/**\n * A sentence worth knowing before picking it. Only on a numbered option, when its widget gave one.\n */\n",
|
|
19955
|
+
"excerptTokens": [
|
|
19956
|
+
{
|
|
19957
|
+
"kind": "Content",
|
|
19958
|
+
"text": "readonly hint?: "
|
|
19959
|
+
},
|
|
19960
|
+
{
|
|
19961
|
+
"kind": "Content",
|
|
19962
|
+
"text": "string"
|
|
19963
|
+
},
|
|
19964
|
+
{
|
|
19965
|
+
"kind": "Content",
|
|
19966
|
+
"text": ";"
|
|
19967
|
+
}
|
|
19968
|
+
],
|
|
19969
|
+
"isReadonly": true,
|
|
19970
|
+
"isOptional": true,
|
|
19971
|
+
"releaseTag": "Beta",
|
|
19972
|
+
"name": "hint",
|
|
19973
|
+
"propertyTypeTokenRange": {
|
|
19974
|
+
"startIndex": 1,
|
|
19975
|
+
"endIndex": 2
|
|
19976
|
+
}
|
|
19977
|
+
},
|
|
19951
19978
|
{
|
|
19952
19979
|
"kind": "PropertySignature",
|
|
19953
19980
|
"canonicalReference": "@genesislcap/ai-assistant!DescribedAction#label:member",
|
|
@@ -43218,6 +43245,33 @@
|
|
|
43218
43245
|
"endIndex": 2
|
|
43219
43246
|
}
|
|
43220
43247
|
},
|
|
43248
|
+
{
|
|
43249
|
+
"kind": "PropertySignature",
|
|
43250
|
+
"canonicalReference": "@genesislcap/ai-assistant!SurfaceAction#hint:member",
|
|
43251
|
+
"docComment": "/**\n * A short-form option's hint, when its widget gave one: a sentence worth knowing before picking it.\n */\n",
|
|
43252
|
+
"excerptTokens": [
|
|
43253
|
+
{
|
|
43254
|
+
"kind": "Content",
|
|
43255
|
+
"text": "readonly hint?: "
|
|
43256
|
+
},
|
|
43257
|
+
{
|
|
43258
|
+
"kind": "Content",
|
|
43259
|
+
"text": "string"
|
|
43260
|
+
},
|
|
43261
|
+
{
|
|
43262
|
+
"kind": "Content",
|
|
43263
|
+
"text": ";"
|
|
43264
|
+
}
|
|
43265
|
+
],
|
|
43266
|
+
"isReadonly": true,
|
|
43267
|
+
"isOptional": true,
|
|
43268
|
+
"releaseTag": "Beta",
|
|
43269
|
+
"name": "hint",
|
|
43270
|
+
"propertyTypeTokenRange": {
|
|
43271
|
+
"startIndex": 1,
|
|
43272
|
+
"endIndex": 2
|
|
43273
|
+
}
|
|
43274
|
+
},
|
|
43221
43275
|
{
|
|
43222
43276
|
"kind": "PropertySignature",
|
|
43223
43277
|
"canonicalReference": "@genesislcap/ai-assistant!SurfaceAction#label:member",
|
package/dist/ai-assistant.d.ts
CHANGED
|
@@ -4707,6 +4707,12 @@ export declare type DecisionOption = string | {
|
|
|
4707
4707
|
readonly id?: string;
|
|
4708
4708
|
/** The option's text, as the person sees it. */
|
|
4709
4709
|
readonly label: string;
|
|
4710
|
+
/**
|
|
4711
|
+
* A sentence worth knowing before picking the option, as the person reads it (e.g. a
|
|
4712
|
+
* tooltip). Shown with the option to whoever decides it, so the autopilot and the headless CLI
|
|
4713
|
+
* choose from more than the bare label. Plain text, static like the label.
|
|
4714
|
+
*/
|
|
4715
|
+
readonly hint?: string;
|
|
4710
4716
|
/**
|
|
4711
4717
|
* Why it cannot be chosen right now, or `undefined` when it can — the button's own guard (e.g.
|
|
4712
4718
|
* "2 validation errors" for a Continue that needs a validated handler). Read fresh every time.
|
|
@@ -4979,6 +4985,8 @@ export declare interface DescribedAction {
|
|
|
4979
4985
|
readonly name: string;
|
|
4980
4986
|
/** What the person would read on the button, when it differs from the name. */
|
|
4981
4987
|
readonly label?: string;
|
|
4988
|
+
/** A sentence worth knowing before picking it. Only on a numbered option, when its widget gave one. */
|
|
4989
|
+
readonly hint?: string;
|
|
4982
4990
|
/** What a full-form action does, as its widget wrote it. */
|
|
4983
4991
|
readonly description?: string;
|
|
4984
4992
|
/** Whether it can be taken now. */
|
|
@@ -10480,6 +10488,8 @@ export declare interface SurfaceAction {
|
|
|
10480
10488
|
readonly name: string;
|
|
10481
10489
|
/** The text the person sees for it, where it has one. */
|
|
10482
10490
|
readonly label?: string;
|
|
10491
|
+
/** A short-form option's hint, when its widget gave one: a sentence worth knowing before picking it. */
|
|
10492
|
+
readonly hint?: string;
|
|
10483
10493
|
/** Whether running it settles the interaction. Every short-form action does. */
|
|
10484
10494
|
readonly finishes: boolean;
|
|
10485
10495
|
/** Whether it can be run right now. */
|
package/dist/chat-driver.cjs
CHANGED
|
@@ -6649,7 +6649,12 @@ var IdleClock = class {
|
|
|
6649
6649
|
// src/state/decision-surface.ts
|
|
6650
6650
|
var SELECT_ACTION = "select";
|
|
6651
6651
|
var REPLY_ACTION = "reply";
|
|
6652
|
-
var normalise = (option) => typeof option === "string" ? { id: option, label: option } : {
|
|
6652
|
+
var normalise = (option) => typeof option === "string" ? { id: option, label: option } : {
|
|
6653
|
+
id: option.id ?? option.label,
|
|
6654
|
+
label: option.label,
|
|
6655
|
+
hint: option.hint,
|
|
6656
|
+
unavailable: option.unavailable
|
|
6657
|
+
};
|
|
6653
6658
|
var GENERIC_UNAVAILABLE = "not available in this state";
|
|
6654
6659
|
function unavailableReason(guard, ...args) {
|
|
6655
6660
|
if (!guard) return void 0;
|
|
@@ -6691,6 +6696,7 @@ function buildDecisionSurface(spec) {
|
|
|
6691
6696
|
return {
|
|
6692
6697
|
name: o.id,
|
|
6693
6698
|
label: o.label,
|
|
6699
|
+
...o.hint !== void 0 ? { hint: o.hint } : {},
|
|
6694
6700
|
finishes: true,
|
|
6695
6701
|
enabled: unavailable === void 0,
|
|
6696
6702
|
...unavailable !== void 0 ? { unavailable } : {}
|
|
@@ -12886,7 +12892,10 @@ function renderActions(actions, options = {}) {
|
|
|
12886
12892
|
lines.push(` reply({text}) \u2014 answer in your own words${unavailable}`);
|
|
12887
12893
|
} else {
|
|
12888
12894
|
numbering.push(action.name);
|
|
12889
|
-
|
|
12895
|
+
const hint = action.hint?.trim();
|
|
12896
|
+
lines.push(
|
|
12897
|
+
` [${numbering.length}] "${action.label ?? action.name}"${hint ? ` \u2014 ${hint}` : ""}${unavailable}`
|
|
12898
|
+
);
|
|
12890
12899
|
}
|
|
12891
12900
|
}
|
|
12892
12901
|
const allSettle = actions.every((a) => a.description === void 0);
|
|
@@ -13021,6 +13030,7 @@ var describeAction = (action, n) => ({
|
|
|
13021
13030
|
...n !== void 0 ? { n } : {},
|
|
13022
13031
|
name: action.name,
|
|
13023
13032
|
...action.label !== void 0 ? { label: action.label } : {},
|
|
13033
|
+
...action.hint !== void 0 ? { hint: action.hint } : {},
|
|
13024
13034
|
...action.description !== void 0 ? { description: action.description } : {},
|
|
13025
13035
|
enabled: action.enabled,
|
|
13026
13036
|
...action.unavailable !== void 0 ? { unavailable: action.unavailable } : {},
|