@appilots/sdk 0.13.0 → 0.14.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/.build-meta.json +3 -3
- package/dist/{chunk-UYBKXULM.mjs → chunk-6JWU3NBT.mjs} +52 -24
- package/dist/{chunk-HRWBK35Y.mjs → chunk-AKAMWKO6.mjs} +61 -10
- package/dist/{chunk-ALJGKORS.js → chunk-GDCBLSYT.js} +8 -8
- package/dist/{chunk-AJDHZRBN.js → chunk-JGUDXRXN.js} +369 -340
- package/dist/{chunk-L3SY3Q4K.mjs → chunk-N66DUP54.mjs} +1 -1
- package/dist/{chunk-UZ2D4BVX.js → chunk-QAZ4TN3Z.js} +64 -9
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +11 -11
- package/dist/hooks/index.mjs +2 -2
- package/dist/{index-CI4jmSoP.d.mts → index-wMMetyrj.d.mts} +33 -0
- package/dist/{index-CI4jmSoP.d.ts → index-wMMetyrj.d.ts} +33 -0
- package/dist/index.d.mts +115 -62
- package/dist/index.d.ts +115 -62
- package/dist/index.js +504 -179
- package/dist/index.mjs +399 -78
- package/dist/navigation/index.js +13 -13
- package/dist/navigation/index.mjs +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useAppilotsContext, setNavigationRef, appilotsDebugLog, setCurrentScreen } from './chunk-
|
|
1
|
+
import { useAppilotsContext, setNavigationRef, appilotsDebugLog, setCurrentScreen } from './chunk-AKAMWKO6.mjs';
|
|
2
2
|
import React, { useRef, useCallback, useEffect } from 'react';
|
|
3
3
|
|
|
4
4
|
function getActiveRouteName(state) {
|
|
@@ -4598,18 +4598,27 @@ var WRITE_SUCCESS = {
|
|
|
4598
4598
|
"a\\s+[e\xE9]t[e\xE9]\\s+(?:enregistr|cr[e\xE9]|ajout|sauvegard)[e\xE9]e?"
|
|
4599
4599
|
]
|
|
4600
4600
|
};
|
|
4601
|
+
var SENTENCE_START = "(?:^|[.!?:;*\\n]\\s*)";
|
|
4601
4602
|
var COMPLETION_CLAIM = {
|
|
4602
4603
|
pt: [
|
|
4603
4604
|
"j[a\xE1]\\s+(?:cadastrei|registrei|salvei|criei)",
|
|
4604
4605
|
"conclu[i\xED]\\s+o\\s+cadastro",
|
|
4605
|
-
"cadastro\\s+(?:foi\\s+)?(?:conclu[i\xED]do|realizado|feito)"
|
|
4606
|
+
"cadastro\\s+(?:foi\\s+)?(?:conclu[i\xED]do|realizado|feito)",
|
|
4607
|
+
`${SENTENCE_START}(?:eu\\s+)?(?:cadastrei|registrei|salvei|criei|adicionei|enviei)\\b`
|
|
4606
4608
|
],
|
|
4607
4609
|
en: [
|
|
4608
4610
|
"i(?:'|\u2019)?ve\\s+(?:registered|saved|created|added)",
|
|
4609
|
-
"i\\s+have\\s+(?:registered|saved|created|added)"
|
|
4611
|
+
"i\\s+have\\s+(?:registered|saved|created|added)",
|
|
4612
|
+
`${SENTENCE_START}i\\s+(?:registered|saved|created|added|submitted)\\b`
|
|
4610
4613
|
],
|
|
4611
|
-
es: [
|
|
4612
|
-
|
|
4614
|
+
es: [
|
|
4615
|
+
"ya\\s+(?:lo\\s+|la\\s+)?(?:registr[e\xE9]|guard[e\xE9]|cre[e\xE9])",
|
|
4616
|
+
`${SENTENCE_START}(?:ya\\s+)?he\\s+(?:registrado|guardado|creado|enviado|a[\xF1n]adido)\\b`
|
|
4617
|
+
],
|
|
4618
|
+
fr: [
|
|
4619
|
+
"j(?:e\\s+l(?:'|\u2019)ai|(?:'|\u2019)ai)\\s+(?:enregistr|cr[e\xE9]|ajout|sauvegard)[e\xE9]",
|
|
4620
|
+
`${SENTENCE_START}c(?:'|\u2019)est\\s+(?:enregistr|cr[e\xE9]|ajout|sauvegard)[e\xE9]`
|
|
4621
|
+
]
|
|
4613
4622
|
};
|
|
4614
4623
|
var SUBMIT_CONTROL = {
|
|
4615
4624
|
pt: ["cadastrar", "registrar", "salvar", "enviar", "confirmar"],
|
|
@@ -4744,6 +4753,7 @@ var AppilotsClient = class {
|
|
|
4744
4753
|
mcpVersion;
|
|
4745
4754
|
introspectionReporter;
|
|
4746
4755
|
user;
|
|
4756
|
+
plainLanguage;
|
|
4747
4757
|
sessionId = null;
|
|
4748
4758
|
mission = null;
|
|
4749
4759
|
missionDispatchPaused = false;
|
|
@@ -4762,6 +4772,7 @@ var AppilotsClient = class {
|
|
|
4762
4772
|
this.mcpVersion = options.mcpVersion;
|
|
4763
4773
|
this.introspectionReporter = options.introspectionReporter;
|
|
4764
4774
|
this.user = options.user;
|
|
4775
|
+
this.plainLanguage = options.plainLanguage;
|
|
4765
4776
|
this.headers = {
|
|
4766
4777
|
"Content-Type": "application/json",
|
|
4767
4778
|
// Version telemetry: lets the server correlate behavior per SDK
|
|
@@ -4911,6 +4922,19 @@ var AppilotsClient = class {
|
|
|
4911
4922
|
return {};
|
|
4912
4923
|
}
|
|
4913
4924
|
}
|
|
4925
|
+
/**
|
|
4926
|
+
* Per-session plain-language override — e.g. from the signed-in user's
|
|
4927
|
+
* accessibility profile. `undefined` hands the decision back to the
|
|
4928
|
+
* project setting. Applies from the next request on.
|
|
4929
|
+
*/
|
|
4930
|
+
setPlainLanguage(value) {
|
|
4931
|
+
this.plainLanguage = value;
|
|
4932
|
+
}
|
|
4933
|
+
/** Every relay-bound context carries the reply-style preference. */
|
|
4934
|
+
withPreferences(context) {
|
|
4935
|
+
if (this.plainLanguage === void 0) return context;
|
|
4936
|
+
return { ...context ?? {}, plainLanguage: this.plainLanguage };
|
|
4937
|
+
}
|
|
4914
4938
|
// ── Messages ──────────────────────────────────────────────────
|
|
4915
4939
|
async sendMessage(content, context) {
|
|
4916
4940
|
if (this.sessionStorage && !this.sessionId) await this.loadStoredSession();
|
|
@@ -4924,7 +4948,7 @@ var AppilotsClient = class {
|
|
|
4924
4948
|
body: JSON.stringify({
|
|
4925
4949
|
content,
|
|
4926
4950
|
sessionId: this.sessionId,
|
|
4927
|
-
context,
|
|
4951
|
+
context: this.withPreferences(context),
|
|
4928
4952
|
// Optional MCP version bundled with this app build. Server
|
|
4929
4953
|
// compares vs the active MCP doc to detect stale uploads.
|
|
4930
4954
|
...this.mcpVersion ? { mcpVersion: this.mcpVersion } : {},
|
|
@@ -5189,7 +5213,7 @@ var AppilotsClient = class {
|
|
|
5189
5213
|
JSON.stringify({
|
|
5190
5214
|
content,
|
|
5191
5215
|
sessionId: this.sessionId,
|
|
5192
|
-
context,
|
|
5216
|
+
context: this.withPreferences(context),
|
|
5193
5217
|
...this.mcpVersion ? { mcpVersion: this.mcpVersion } : {},
|
|
5194
5218
|
...this.introspectionFragment()
|
|
5195
5219
|
})
|
|
@@ -5208,7 +5232,9 @@ var AppilotsClient = class {
|
|
|
5208
5232
|
body: JSON.stringify({
|
|
5209
5233
|
sessionId: this.sessionId,
|
|
5210
5234
|
results,
|
|
5211
|
-
context: this.
|
|
5235
|
+
context: this.withPreferences(
|
|
5236
|
+
this.mission ? { ...context, missionProtocol: 1, missionId: this.mission.scope.id } : context
|
|
5237
|
+
),
|
|
5212
5238
|
hop
|
|
5213
5239
|
})
|
|
5214
5240
|
},
|
|
@@ -5296,7 +5322,7 @@ var AppilotsClient = class {
|
|
|
5296
5322
|
body: JSON.stringify({
|
|
5297
5323
|
command,
|
|
5298
5324
|
missionId: this.mission.scope.id,
|
|
5299
|
-
context
|
|
5325
|
+
context: this.withPreferences(context)
|
|
5300
5326
|
})
|
|
5301
5327
|
});
|
|
5302
5328
|
if (command === "resume") this.missionDispatchPaused = false;
|
|
@@ -5683,6 +5709,11 @@ var AppilotsClient = class {
|
|
|
5683
5709
|
};
|
|
5684
5710
|
}
|
|
5685
5711
|
};
|
|
5712
|
+
function isSpeechHost(value) {
|
|
5713
|
+
if (!value || typeof value !== "object") return false;
|
|
5714
|
+
const candidate = value;
|
|
5715
|
+
return typeof candidate.start === "function" && typeof candidate.stop === "function" && typeof candidate.cancel === "function";
|
|
5716
|
+
}
|
|
5686
5717
|
var defaultLightTheme = {
|
|
5687
5718
|
colors: {
|
|
5688
5719
|
primary: "#6366f1",
|
|
@@ -6943,6 +6974,10 @@ function actionHasCompletedConfirmGate(action, actions) {
|
|
|
6943
6974
|
return payload.destructive === true || payload.severity === "danger";
|
|
6944
6975
|
});
|
|
6945
6976
|
}
|
|
6977
|
+
function confirmExpiresAt(confirm) {
|
|
6978
|
+
const scope = readPayload(confirm).missionApproval;
|
|
6979
|
+
return typeof scope?.expiresAt === "number" ? scope.expiresAt : void 0;
|
|
6980
|
+
}
|
|
6946
6981
|
var ActionQueueMachine = class {
|
|
6947
6982
|
deps;
|
|
6948
6983
|
options;
|
|
@@ -7448,6 +7483,17 @@ var ActionQueueMachine = class {
|
|
|
7448
7483
|
return this.state.actions.filter((a) => a.status === "completed" || a.status === "failed");
|
|
7449
7484
|
}
|
|
7450
7485
|
};
|
|
7486
|
+
var STILL_WORKING_FIRST_MS = 1e4;
|
|
7487
|
+
var STILL_WORKING_EVERY_MS = 2e4;
|
|
7488
|
+
function startStillWorkingTimer(onTick) {
|
|
7489
|
+
let elapsedMs = STILL_WORKING_FIRST_MS;
|
|
7490
|
+
let timer = setTimeout(function tick() {
|
|
7491
|
+
onTick(Math.round(elapsedMs / 1e3));
|
|
7492
|
+
elapsedMs += STILL_WORKING_EVERY_MS;
|
|
7493
|
+
timer = setTimeout(tick, STILL_WORKING_EVERY_MS);
|
|
7494
|
+
}, STILL_WORKING_FIRST_MS);
|
|
7495
|
+
return () => clearTimeout(timer);
|
|
7496
|
+
}
|
|
7451
7497
|
function normalize3(s) {
|
|
7452
7498
|
return s.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/[^a-z0-9]/g, "");
|
|
7453
7499
|
}
|
|
@@ -11268,7 +11314,7 @@ async function waitForLoadingSettle(opts = {}) {
|
|
|
11268
11314
|
}
|
|
11269
11315
|
|
|
11270
11316
|
// src/version.ts
|
|
11271
|
-
var SDK_VERSION2 = "0.
|
|
11317
|
+
var SDK_VERSION2 = "0.14.0";
|
|
11272
11318
|
var FiberSentinel = class extends React2__default.default.Component {
|
|
11273
11319
|
componentDidMount() {
|
|
11274
11320
|
const fiber = this._reactInternals ?? this._reactInternalFiber ?? null;
|
|
@@ -11617,12 +11663,14 @@ function AppilotsProviderInner({
|
|
|
11617
11663
|
apiBaseUrl: config.apiBaseUrl,
|
|
11618
11664
|
apiKey: config.apiKey,
|
|
11619
11665
|
debug: config.debug,
|
|
11666
|
+
timeout: config.timeout,
|
|
11620
11667
|
appVersion: config.appVersion,
|
|
11621
11668
|
mcpVersion: config.mcpVersion,
|
|
11622
11669
|
// This package's published version, so the server knows which
|
|
11623
11670
|
// SDK is actually in the field (issue #312).
|
|
11624
11671
|
sdkVersion: SDK_VERSION2,
|
|
11625
11672
|
user: config.user,
|
|
11673
|
+
plainLanguage: config.plainLanguage,
|
|
11626
11674
|
// Only reports a FAILED reading; the happy path sends nothing.
|
|
11627
11675
|
introspectionReporter: getIntrospectionDiagnostics
|
|
11628
11676
|
}),
|
|
@@ -11638,6 +11686,9 @@ function AppilotsProviderInner({
|
|
|
11638
11686
|
externalClient
|
|
11639
11687
|
]
|
|
11640
11688
|
);
|
|
11689
|
+
React2.useEffect(() => {
|
|
11690
|
+
client.setPlainLanguage?.(config.plainLanguage);
|
|
11691
|
+
}, [client, config.plainLanguage]);
|
|
11641
11692
|
const fetchPersonalizationEnabled = config.fetchPersonalization !== false;
|
|
11642
11693
|
const [remotePersonalization, setRemotePersonalization] = React2.useState(
|
|
11643
11694
|
null
|
|
@@ -11714,6 +11765,7 @@ exports.clampSnapshotToWireLimits = clampSnapshotToWireLimits;
|
|
|
11714
11765
|
exports.clearAppilotsDebugTraces = clearAppilotsDebugTraces;
|
|
11715
11766
|
exports.clearScreenRegistry = clearScreenRegistry;
|
|
11716
11767
|
exports.componentRegistry = componentRegistry;
|
|
11768
|
+
exports.confirmExpiresAt = confirmExpiresAt;
|
|
11717
11769
|
exports.createComponentRegistry = createComponentRegistry;
|
|
11718
11770
|
exports.createElementRegistry = createElementRegistry;
|
|
11719
11771
|
exports.createListRegistry = createListRegistry;
|
|
@@ -11755,6 +11807,7 @@ exports.humanizeError = humanizeError;
|
|
|
11755
11807
|
exports.idLooselyMatches = idLooselyMatches;
|
|
11756
11808
|
exports.initAppilots = initAppilots;
|
|
11757
11809
|
exports.isAlwaysListContainer = isAlwaysListContainer;
|
|
11810
|
+
exports.isAppilotsSensitiveMarked = isAppilotsSensitiveMarked;
|
|
11758
11811
|
exports.isAutoTrackingEnabled = isAutoTrackingEnabled;
|
|
11759
11812
|
exports.isGenericSelectValue = isGenericSelectValue;
|
|
11760
11813
|
exports.isGeometryResolved = isGeometryResolved;
|
|
@@ -11765,6 +11818,7 @@ exports.isOptionalStepAutomationFailure = isOptionalStepAutomationFailure;
|
|
|
11765
11818
|
exports.isRectOnScreen = isRectOnScreen;
|
|
11766
11819
|
exports.isReferenceable = isReferenceable;
|
|
11767
11820
|
exports.isSourceControlId = isSourceControlId;
|
|
11821
|
+
exports.isSpeechHost = isSpeechHost;
|
|
11768
11822
|
exports.isSwitchLike = isSwitchLike;
|
|
11769
11823
|
exports.isVisibleValidationText = isVisibleValidationText;
|
|
11770
11824
|
exports.listRegistry = listRegistry;
|
|
@@ -11796,6 +11850,7 @@ exports.shouldSkipSubtree = shouldSkipSubtree;
|
|
|
11796
11850
|
exports.snapshotShowsOpenCreateForm = snapshotShowsOpenCreateForm;
|
|
11797
11851
|
exports.sourceControlId = sourceControlId;
|
|
11798
11852
|
exports.sourceControlTarget = sourceControlTarget;
|
|
11853
|
+
exports.startStillWorkingTimer = startStillWorkingTimer;
|
|
11799
11854
|
exports.subscribeAppilotsDebugTraces = subscribeAppilotsDebugTraces;
|
|
11800
11855
|
exports.subscribeGeometryHost = subscribeGeometryHost;
|
|
11801
11856
|
exports.switchValue = switchValue;
|
package/dist/hooks/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { w as SuggestedPrompt, y as UseAppilotsFieldOptions, z as UseAppilotsSliderOptions, B as UseAppilotsTargetOptions, D as UseAppilotsToggleOptions, G as UseSuggestedPromptsOptions, H as UseSuggestedPromptsReturn, Q as useAppilots, V as useAppilotsActions, W as useAppilotsChat, Y as useAppilotsField, Z as useAppilotsNavigation, _ as useAppilotsSlider, $ as useAppilotsTarget, a0 as useAppilotsToggle, a1 as useSuggestedPrompts } from '../index-
|
|
1
|
+
export { w as SuggestedPrompt, y as UseAppilotsFieldOptions, z as UseAppilotsSliderOptions, B as UseAppilotsTargetOptions, D as UseAppilotsToggleOptions, G as UseSuggestedPromptsOptions, H as UseSuggestedPromptsReturn, Q as useAppilots, V as useAppilotsActions, W as useAppilotsChat, Y as useAppilotsField, Z as useAppilotsNavigation, _ as useAppilotsSlider, $ as useAppilotsTarget, a0 as useAppilotsToggle, a1 as useSuggestedPrompts } from '../index-wMMetyrj.mjs';
|
|
2
2
|
import 'react';
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { w as SuggestedPrompt, y as UseAppilotsFieldOptions, z as UseAppilotsSliderOptions, B as UseAppilotsTargetOptions, D as UseAppilotsToggleOptions, G as UseSuggestedPromptsOptions, H as UseSuggestedPromptsReturn, Q as useAppilots, V as useAppilotsActions, W as useAppilotsChat, Y as useAppilotsField, Z as useAppilotsNavigation, _ as useAppilotsSlider, $ as useAppilotsTarget, a0 as useAppilotsToggle, a1 as useSuggestedPrompts } from '../index-
|
|
1
|
+
export { w as SuggestedPrompt, y as UseAppilotsFieldOptions, z as UseAppilotsSliderOptions, B as UseAppilotsTargetOptions, D as UseAppilotsToggleOptions, G as UseSuggestedPromptsOptions, H as UseSuggestedPromptsReturn, Q as useAppilots, V as useAppilotsActions, W as useAppilotsChat, Y as useAppilotsField, Z as useAppilotsNavigation, _ as useAppilotsSlider, $ as useAppilotsTarget, a0 as useAppilotsToggle, a1 as useSuggestedPrompts } from '../index-wMMetyrj.js';
|
|
2
2
|
import 'react';
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunkJGUDXRXN_js = require('../chunk-JGUDXRXN.js');
|
|
4
|
+
require('../chunk-QAZ4TN3Z.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "useAppilots", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkJGUDXRXN_js.useAppilots; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "useAppilotsActions", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkJGUDXRXN_js.useAppilotsActions; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "useAppilotsChat", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkJGUDXRXN_js.useAppilotsChat; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "useAppilotsField", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkJGUDXRXN_js.useAppilotsField; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "useAppilotsNavigation", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkJGUDXRXN_js.useAppilotsNavigation; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "useAppilotsSlider", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkJGUDXRXN_js.useAppilotsSlider; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "useAppilotsTarget", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkJGUDXRXN_js.useAppilotsTarget; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "useAppilotsToggle", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkJGUDXRXN_js.useAppilotsToggle; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "useSuggestedPrompts", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkJGUDXRXN_js.useSuggestedPrompts; }
|
|
43
43
|
});
|
package/dist/hooks/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { useAppilots, useAppilotsActions, useAppilotsChat, useAppilotsField, useAppilotsNavigation, useAppilotsSlider, useAppilotsTarget, useAppilotsToggle, useSuggestedPrompts } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { useAppilots, useAppilotsActions, useAppilotsChat, useAppilotsField, useAppilotsNavigation, useAppilotsSlider, useAppilotsTarget, useAppilotsToggle, useSuggestedPrompts } from '../chunk-6JWU3NBT.mjs';
|
|
2
|
+
import '../chunk-AKAMWKO6.mjs';
|
|
@@ -408,6 +408,13 @@ interface AppilotsClientOptions {
|
|
|
408
408
|
* id. Identifiers are dashboard-only — never sent to the LLM.
|
|
409
409
|
*/
|
|
410
410
|
user?: AppilotsUser;
|
|
411
|
+
/**
|
|
412
|
+
* Accessibility: ask the agent to reply in plain language (short
|
|
413
|
+
* sentences, everyday words, numbered steps). `undefined` defers to the
|
|
414
|
+
* project setting in the dashboard; `true`/`false` overrides it for this
|
|
415
|
+
* session. Change it later with `setPlainLanguage`.
|
|
416
|
+
*/
|
|
417
|
+
plainLanguage?: boolean;
|
|
411
418
|
}
|
|
412
419
|
interface AppilotsUser {
|
|
413
420
|
/** The app's own user id (matches your backend). */
|
|
@@ -472,6 +479,8 @@ interface SendMessageContext {
|
|
|
472
479
|
missionId?: string;
|
|
473
480
|
/** Supported device language, independent of the app/map/visible UI locale. */
|
|
474
481
|
deviceLocale?: SupportedAppilotsLocale;
|
|
482
|
+
/** Set by the client from `plainLanguage` / `setPlainLanguage`; see there. */
|
|
483
|
+
plainLanguage?: boolean;
|
|
475
484
|
/**
|
|
476
485
|
* Which client platform this observation came from — `'react-native'`,
|
|
477
486
|
* `'web'`, `'android'`, `'ios'`, or any other client-defined string.
|
|
@@ -526,6 +535,7 @@ declare class AppilotsClient {
|
|
|
526
535
|
private readonly mcpVersion;
|
|
527
536
|
private readonly introspectionReporter;
|
|
528
537
|
private readonly user;
|
|
538
|
+
private plainLanguage;
|
|
529
539
|
private sessionId;
|
|
530
540
|
private mission;
|
|
531
541
|
private missionDispatchPaused;
|
|
@@ -566,6 +576,14 @@ declare class AppilotsClient {
|
|
|
566
576
|
* must not take the message down with it.
|
|
567
577
|
*/
|
|
568
578
|
private introspectionFragment;
|
|
579
|
+
/**
|
|
580
|
+
* Per-session plain-language override — e.g. from the signed-in user's
|
|
581
|
+
* accessibility profile. `undefined` hands the decision back to the
|
|
582
|
+
* project setting. Applies from the next request on.
|
|
583
|
+
*/
|
|
584
|
+
setPlainLanguage(value: boolean | undefined): void;
|
|
585
|
+
/** Every relay-bound context carries the reply-style preference. */
|
|
586
|
+
private withPreferences;
|
|
569
587
|
sendMessage(content: string, context?: SendMessageContext): Promise<SendMessageResponse>;
|
|
570
588
|
/**
|
|
571
589
|
* Streaming variant of `sendMessage` — consumes the server's SSE
|
|
@@ -786,8 +804,23 @@ interface AppilotsConfig {
|
|
|
786
804
|
* flags silently denied the fourth.
|
|
787
805
|
*/
|
|
788
806
|
permissions?: Partial<AgentPermissions>;
|
|
807
|
+
/**
|
|
808
|
+
* Accessibility: plain-language replies (short sentences, everyday
|
|
809
|
+
* words, numbered steps) for this session. Omit to follow the dashboard
|
|
810
|
+
* setting; `true`/`false` overrides it. Changing it later takes effect
|
|
811
|
+
* on the next message without starting a new session.
|
|
812
|
+
*/
|
|
813
|
+
plainLanguage?: boolean;
|
|
789
814
|
/** Enable debug logging */
|
|
790
815
|
debug?: boolean;
|
|
816
|
+
/**
|
|
817
|
+
* How long (ms) the client waits for the assistant before giving up on
|
|
818
|
+
* a request, and how long a reply stream may stay silent. Default
|
|
819
|
+
* 60000; agent continuations always get at least 150000. Raise it for
|
|
820
|
+
* users or networks that need more time — the user's message stays in
|
|
821
|
+
* the transcript either way.
|
|
822
|
+
*/
|
|
823
|
+
timeout?: number;
|
|
791
824
|
/**
|
|
792
825
|
* Host app version (e.g. package.json version). Forwarded to the API
|
|
793
826
|
* as `X-App-Version` so the server can serve the MCP document matching
|
|
@@ -408,6 +408,13 @@ interface AppilotsClientOptions {
|
|
|
408
408
|
* id. Identifiers are dashboard-only — never sent to the LLM.
|
|
409
409
|
*/
|
|
410
410
|
user?: AppilotsUser;
|
|
411
|
+
/**
|
|
412
|
+
* Accessibility: ask the agent to reply in plain language (short
|
|
413
|
+
* sentences, everyday words, numbered steps). `undefined` defers to the
|
|
414
|
+
* project setting in the dashboard; `true`/`false` overrides it for this
|
|
415
|
+
* session. Change it later with `setPlainLanguage`.
|
|
416
|
+
*/
|
|
417
|
+
plainLanguage?: boolean;
|
|
411
418
|
}
|
|
412
419
|
interface AppilotsUser {
|
|
413
420
|
/** The app's own user id (matches your backend). */
|
|
@@ -472,6 +479,8 @@ interface SendMessageContext {
|
|
|
472
479
|
missionId?: string;
|
|
473
480
|
/** Supported device language, independent of the app/map/visible UI locale. */
|
|
474
481
|
deviceLocale?: SupportedAppilotsLocale;
|
|
482
|
+
/** Set by the client from `plainLanguage` / `setPlainLanguage`; see there. */
|
|
483
|
+
plainLanguage?: boolean;
|
|
475
484
|
/**
|
|
476
485
|
* Which client platform this observation came from — `'react-native'`,
|
|
477
486
|
* `'web'`, `'android'`, `'ios'`, or any other client-defined string.
|
|
@@ -526,6 +535,7 @@ declare class AppilotsClient {
|
|
|
526
535
|
private readonly mcpVersion;
|
|
527
536
|
private readonly introspectionReporter;
|
|
528
537
|
private readonly user;
|
|
538
|
+
private plainLanguage;
|
|
529
539
|
private sessionId;
|
|
530
540
|
private mission;
|
|
531
541
|
private missionDispatchPaused;
|
|
@@ -566,6 +576,14 @@ declare class AppilotsClient {
|
|
|
566
576
|
* must not take the message down with it.
|
|
567
577
|
*/
|
|
568
578
|
private introspectionFragment;
|
|
579
|
+
/**
|
|
580
|
+
* Per-session plain-language override — e.g. from the signed-in user's
|
|
581
|
+
* accessibility profile. `undefined` hands the decision back to the
|
|
582
|
+
* project setting. Applies from the next request on.
|
|
583
|
+
*/
|
|
584
|
+
setPlainLanguage(value: boolean | undefined): void;
|
|
585
|
+
/** Every relay-bound context carries the reply-style preference. */
|
|
586
|
+
private withPreferences;
|
|
569
587
|
sendMessage(content: string, context?: SendMessageContext): Promise<SendMessageResponse>;
|
|
570
588
|
/**
|
|
571
589
|
* Streaming variant of `sendMessage` — consumes the server's SSE
|
|
@@ -786,8 +804,23 @@ interface AppilotsConfig {
|
|
|
786
804
|
* flags silently denied the fourth.
|
|
787
805
|
*/
|
|
788
806
|
permissions?: Partial<AgentPermissions>;
|
|
807
|
+
/**
|
|
808
|
+
* Accessibility: plain-language replies (short sentences, everyday
|
|
809
|
+
* words, numbered steps) for this session. Omit to follow the dashboard
|
|
810
|
+
* setting; `true`/`false` overrides it. Changing it later takes effect
|
|
811
|
+
* on the next message without starting a new session.
|
|
812
|
+
*/
|
|
813
|
+
plainLanguage?: boolean;
|
|
789
814
|
/** Enable debug logging */
|
|
790
815
|
debug?: boolean;
|
|
816
|
+
/**
|
|
817
|
+
* How long (ms) the client waits for the assistant before giving up on
|
|
818
|
+
* a request, and how long a reply stream may stay silent. Default
|
|
819
|
+
* 60000; agent continuations always get at least 150000. Raise it for
|
|
820
|
+
* users or networks that need more time — the user's message stays in
|
|
821
|
+
* the transcript either way.
|
|
822
|
+
*/
|
|
823
|
+
timeout?: number;
|
|
791
824
|
/**
|
|
792
825
|
* Host app version (e.g. package.json version). Forwarded to the API
|
|
793
826
|
* as `X-App-Version` so the server can serve the MCP document matching
|