@appilots/sdk 0.11.0 → 0.11.3
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-NA5H4IHH.mjs → chunk-2ZDELL54.mjs} +352 -114
- package/dist/{chunk-IZEWWAA7.js → chunk-5UVMNKPT.js} +8 -8
- package/dist/{chunk-3K7ORC4X.mjs → chunk-JKLE5SLN.mjs} +1 -1
- package/dist/{chunk-G6KI7KVH.mjs → chunk-ROXXCDIG.mjs} +299 -15
- package/dist/{chunk-55Y2AQE7.js → chunk-SUMIABJK.js} +299 -14
- package/dist/{chunk-2YPEQTL2.js → chunk-UFMTRGML.js} +622 -384
- 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-BPZ0j71S.d.mts → index-BR-33WMN.d.mts} +112 -1
- package/dist/{index-BPZ0j71S.d.ts → index-BR-33WMN.d.ts} +112 -1
- package/dist/index.d.mts +28 -3
- package/dist/index.d.ts +28 -3
- package/dist/index.js +112 -82
- package/dist/index.mjs +45 -15
- package/dist/navigation/index.d.mts +42 -6
- package/dist/navigation/index.d.ts +42 -6
- package/dist/navigation/index.js +13 -13
- package/dist/navigation/index.mjs +2 -2
- package/package.json +1 -1
|
@@ -83,6 +83,33 @@ interface ScreenActionMetadata {
|
|
|
83
83
|
* between sdk and mcp-generator packages.
|
|
84
84
|
*/
|
|
85
85
|
appilotsInferred?: AppilotsInferredAction;
|
|
86
|
+
/**
|
|
87
|
+
* How long this action's work takes, in milliseconds, as DECLARED by
|
|
88
|
+
* the app. The SDK waits this long for the UI to settle after pressing
|
|
89
|
+
* it, instead of the agnostic default.
|
|
90
|
+
*
|
|
91
|
+
* There is no constant that fits: an app operation runs from ~100ms to
|
|
92
|
+
* minutes, and when the wait is too short the agent photographs a
|
|
93
|
+
* loading screen with no controls on it and plans against nothing. The
|
|
94
|
+
* app is the only party that knows, so it says so:
|
|
95
|
+
*
|
|
96
|
+
* ```tsx
|
|
97
|
+
* registerScreen({
|
|
98
|
+
* name: 'Wizard',
|
|
99
|
+
* actions: [{ id: 'gerar', label: 'Gerar', type: 'submit', asyncBudgetMs: 90_000 }],
|
|
100
|
+
* });
|
|
101
|
+
* ```
|
|
102
|
+
*
|
|
103
|
+
* Omitting it is supported and common: the SDK then falls back on its
|
|
104
|
+
* defaults (6s, or 10s when the generator inferred the handler is
|
|
105
|
+
* async) AND on what it can see — while the screen keeps a loading
|
|
106
|
+
* indicator up, the wait runs on to a safety ceiling. So declaring is
|
|
107
|
+
* how an app says "this one is QUICK, do not wait on my spinner", or
|
|
108
|
+
* gives a number for work that shows no indicator at all. The value is
|
|
109
|
+
* clamped to `MAX_DECLARED_ASYNC_BUDGET_MS`: a declaration is a
|
|
110
|
+
* request, not a licence to hang the session.
|
|
111
|
+
*/
|
|
112
|
+
asyncBudgetMs?: number;
|
|
86
113
|
}
|
|
87
114
|
/**
|
|
88
115
|
* Inferred metadata about an action's expected async behavior.
|
|
@@ -156,12 +183,6 @@ declare function getAllScreens(): ScreenMetadata[];
|
|
|
156
183
|
/** Clear the screen registry (useful for testing) */
|
|
157
184
|
declare function clearScreenRegistry(): void;
|
|
158
185
|
|
|
159
|
-
/**
|
|
160
|
-
* Global navigation state — lightweight singleton so any part of the SDK
|
|
161
|
-
* can read the current screen without needing a React context or hook.
|
|
162
|
-
*
|
|
163
|
-
* Updated by AppilotsNavigationContainer and read by useAppilotsChat().
|
|
164
|
-
*/
|
|
165
186
|
/**
|
|
166
187
|
* Tell the SDK which screen the user is on.
|
|
167
188
|
*
|
|
@@ -199,6 +220,21 @@ interface RuntimeNavigationStateSnapshot {
|
|
|
199
220
|
routeNames: string[];
|
|
200
221
|
/** Whether React Navigation reports that goBack() can currently run. */
|
|
201
222
|
canGoBack?: boolean;
|
|
223
|
+
/**
|
|
224
|
+
* The stack a back press pops through, oldest first, ending on the
|
|
225
|
+
* current screen. Empty when no navigator is reachable.
|
|
226
|
+
*
|
|
227
|
+
* `canGoBack` says a back exists; this says where it goes.
|
|
228
|
+
*/
|
|
229
|
+
backStack?: string[];
|
|
230
|
+
/**
|
|
231
|
+
* Screens the user has been on this session, oldest first, capped and
|
|
232
|
+
* with consecutive repeats collapsed.
|
|
233
|
+
*
|
|
234
|
+
* Different from `backStack`: a popped screen leaves the stack and
|
|
235
|
+
* stays here, and a tab switch never touches the stack at all.
|
|
236
|
+
*/
|
|
237
|
+
visited?: string[];
|
|
202
238
|
}
|
|
203
239
|
/**
|
|
204
240
|
* Snapshot the runtime navigation tree in a small, serializable shape.
|
|
@@ -83,6 +83,33 @@ interface ScreenActionMetadata {
|
|
|
83
83
|
* between sdk and mcp-generator packages.
|
|
84
84
|
*/
|
|
85
85
|
appilotsInferred?: AppilotsInferredAction;
|
|
86
|
+
/**
|
|
87
|
+
* How long this action's work takes, in milliseconds, as DECLARED by
|
|
88
|
+
* the app. The SDK waits this long for the UI to settle after pressing
|
|
89
|
+
* it, instead of the agnostic default.
|
|
90
|
+
*
|
|
91
|
+
* There is no constant that fits: an app operation runs from ~100ms to
|
|
92
|
+
* minutes, and when the wait is too short the agent photographs a
|
|
93
|
+
* loading screen with no controls on it and plans against nothing. The
|
|
94
|
+
* app is the only party that knows, so it says so:
|
|
95
|
+
*
|
|
96
|
+
* ```tsx
|
|
97
|
+
* registerScreen({
|
|
98
|
+
* name: 'Wizard',
|
|
99
|
+
* actions: [{ id: 'gerar', label: 'Gerar', type: 'submit', asyncBudgetMs: 90_000 }],
|
|
100
|
+
* });
|
|
101
|
+
* ```
|
|
102
|
+
*
|
|
103
|
+
* Omitting it is supported and common: the SDK then falls back on its
|
|
104
|
+
* defaults (6s, or 10s when the generator inferred the handler is
|
|
105
|
+
* async) AND on what it can see — while the screen keeps a loading
|
|
106
|
+
* indicator up, the wait runs on to a safety ceiling. So declaring is
|
|
107
|
+
* how an app says "this one is QUICK, do not wait on my spinner", or
|
|
108
|
+
* gives a number for work that shows no indicator at all. The value is
|
|
109
|
+
* clamped to `MAX_DECLARED_ASYNC_BUDGET_MS`: a declaration is a
|
|
110
|
+
* request, not a licence to hang the session.
|
|
111
|
+
*/
|
|
112
|
+
asyncBudgetMs?: number;
|
|
86
113
|
}
|
|
87
114
|
/**
|
|
88
115
|
* Inferred metadata about an action's expected async behavior.
|
|
@@ -156,12 +183,6 @@ declare function getAllScreens(): ScreenMetadata[];
|
|
|
156
183
|
/** Clear the screen registry (useful for testing) */
|
|
157
184
|
declare function clearScreenRegistry(): void;
|
|
158
185
|
|
|
159
|
-
/**
|
|
160
|
-
* Global navigation state — lightweight singleton so any part of the SDK
|
|
161
|
-
* can read the current screen without needing a React context or hook.
|
|
162
|
-
*
|
|
163
|
-
* Updated by AppilotsNavigationContainer and read by useAppilotsChat().
|
|
164
|
-
*/
|
|
165
186
|
/**
|
|
166
187
|
* Tell the SDK which screen the user is on.
|
|
167
188
|
*
|
|
@@ -199,6 +220,21 @@ interface RuntimeNavigationStateSnapshot {
|
|
|
199
220
|
routeNames: string[];
|
|
200
221
|
/** Whether React Navigation reports that goBack() can currently run. */
|
|
201
222
|
canGoBack?: boolean;
|
|
223
|
+
/**
|
|
224
|
+
* The stack a back press pops through, oldest first, ending on the
|
|
225
|
+
* current screen. Empty when no navigator is reachable.
|
|
226
|
+
*
|
|
227
|
+
* `canGoBack` says a back exists; this says where it goes.
|
|
228
|
+
*/
|
|
229
|
+
backStack?: string[];
|
|
230
|
+
/**
|
|
231
|
+
* Screens the user has been on this session, oldest first, capped and
|
|
232
|
+
* with consecutive repeats collapsed.
|
|
233
|
+
*
|
|
234
|
+
* Different from `backStack`: a popped screen leaves the stack and
|
|
235
|
+
* stays here, and a tab switch never touches the stack at all.
|
|
236
|
+
*/
|
|
237
|
+
visited?: string[];
|
|
202
238
|
}
|
|
203
239
|
/**
|
|
204
240
|
* Snapshot the runtime navigation tree in a small, serializable shape.
|
package/dist/navigation/index.js
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunk5UVMNKPT_js = require('../chunk-5UVMNKPT.js');
|
|
4
|
+
var chunkSUMIABJK_js = require('../chunk-SUMIABJK.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "AppilotsNavigationContainer", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunk5UVMNKPT_js.AppilotsNavigationContainer; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "clearScreenRegistry", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkSUMIABJK_js.clearScreenRegistry; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "getActiveRouteNames", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkSUMIABJK_js.getActiveRouteNames; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "getAllScreens", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkSUMIABJK_js.getAllScreens; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "getCurrentScreen", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkSUMIABJK_js.getCurrentScreen; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "getNavigationRef", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkSUMIABJK_js.getNavigationRef; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "getNavigationStateSnapshot", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkSUMIABJK_js.getNavigationStateSnapshot; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "getScreenMetadata", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkSUMIABJK_js.getScreenMetadata; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "registerScreen", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkSUMIABJK_js.registerScreen; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "setCurrentScreen", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkSUMIABJK_js.setCurrentScreen; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "setNavigationRef", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkSUMIABJK_js.setNavigationRef; }
|
|
51
51
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { AppilotsNavigationContainer } from '../chunk-
|
|
2
|
-
export { clearScreenRegistry, getActiveRouteNames, getAllScreens, getCurrentScreen, getNavigationRef, getNavigationStateSnapshot, getScreenMetadata, registerScreen, setCurrentScreen, setNavigationRef } from '../chunk-
|
|
1
|
+
export { AppilotsNavigationContainer } from '../chunk-JKLE5SLN.mjs';
|
|
2
|
+
export { clearScreenRegistry, getActiveRouteNames, getAllScreens, getCurrentScreen, getNavigationRef, getNavigationStateSnapshot, getScreenMetadata, registerScreen, setCurrentScreen, setNavigationRef } from '../chunk-ROXXCDIG.mjs';
|