@lobu/runtime-device 23.0.0 → 24.1.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/component.json +1 -1
- package/dist/dependencies.bun.lock +30 -27
- package/npm-shrinkwrap.json +131 -115
- package/package.json +2 -1
- package/vendor/cli/dist/bundled-skills/lobu/SKILL.md +73 -0
- package/vendor/cli/dist/commands/_lib/apply/apply-cmd.js +9 -11
- package/vendor/cli/dist/commands/_lib/apply/client.d.ts +3 -11
- package/vendor/cli/dist/commands/_lib/apply/client.js +3 -3
- package/vendor/cli/dist/commands/_lib/apply/desired-state.d.ts +0 -6
- package/vendor/cli/dist/commands/_lib/apply/desired-state.js +6 -15
- package/vendor/cli/dist/commands/_lib/apply/diff.js +1 -0
- package/vendor/cli/dist/commands/_lib/apply/map-config.js +8 -0
- package/vendor/cli/dist/commands/_lib/view-bundler.d.ts +2 -9
- package/vendor/cli/dist/commands/_lib/view-bundler.js +36 -119
- package/vendor/cli/dist/config/define.d.ts +8 -0
- package/vendor/cli/dist/connectors/README.md +1 -1
- package/vendor/cli/dist/connectors/linkedin-inbox-adapter.js +4 -7
- package/vendor/cli/dist/connectors/linkedin.ts +53 -34
- package/vendor/cli/dist/connectors/reddit.ts +92 -20
- package/vendor/cli/dist/connectors/slack.ts +1 -0
- package/vendor/cli/dist/connectors/whatsapp-web-adapter.js +41 -11
- package/vendor/cli/dist/connectors/whatsapp-web-helpers.ts +1 -1
- package/vendor/cli/dist/connectors/whatsapp_web.ts +2 -2
- package/vendor/cli/dist/connectors/x-dm-adapter.js +65 -30
- package/vendor/cli/dist/connectors/x-identity.ts +5 -3
- package/vendor/cli/dist/runtime-components.json +4 -4
- package/vendor/cli/dist/templates/AGENTS.md.tmpl +10 -3
- package/vendor/cli/package.json +1 -1
- package/vendor/connector-sdk/package.json +1 -1
- package/vendor/connector-worker/dist/agent-turn/gateway-tools.d.ts +2 -2
- package/vendor/connector-worker/dist/agent-turn/gateway-tools.js +2 -2
- package/vendor/connector-worker/dist/agent-turn/guest-entry.js +34 -2
- package/vendor/connector-worker/dist/agent-turn/guest.bundle.js +362 -300
- package/vendor/connector-worker/dist/agent-turn/native-session.d.ts +12 -0
- package/vendor/connector-worker/dist/agent-turn/native-session.js +32 -6
- package/vendor/connector-worker/dist/agent-turn/types.d.ts +24 -3
- package/vendor/connector-worker/dist/daemon/agent-turn.js +5 -1
- package/vendor/connector-worker/dist/daemon/automation-acp.js +23 -11
- package/vendor/connector-worker/dist/daemon/automation.js +20 -15
- package/vendor/connector-worker/dist/isolate/prelude.js +93 -44
- package/vendor/connector-worker/package.json +1 -1
- package/vendor/core/dist/agent-policy.js +0 -3
- package/vendor/core/dist/agent-tooling.d.ts +1 -1
- package/vendor/core/dist/agent-tooling.js +3 -1
- package/vendor/core/dist/contracts/agent-settings.d.ts +6 -2
- package/vendor/core/dist/contracts/agent-settings.js +12 -1
- package/vendor/core/dist/contracts/tools/manage-views.d.ts +53 -234
- package/vendor/core/dist/contracts/tools/manage-views.js +50 -76
- package/vendor/core/dist/contracts/tools/view-attach.d.ts +5 -8
- package/vendor/core/dist/contracts/tools/view-attach.js +14 -31
- package/vendor/core/dist/contracts/tools/view-definition.d.ts +21 -0
- package/vendor/core/dist/contracts/tools/view-definition.js +165 -0
- package/vendor/core/dist/contracts/tools/view-runtime.d.ts +74 -0
- package/vendor/core/dist/contracts/tools/view-runtime.js +86 -0
- package/vendor/core/dist/contracts/worker/protocol.d.ts +39 -2
- package/vendor/core/dist/contracts/worker/protocol.js +24 -1
- package/vendor/core/dist/index.d.ts +1 -1
- package/vendor/core/dist/index.js +2 -1
- package/vendor/core/dist/suggestions.d.ts +15 -2
- package/vendor/core/dist/suggestions.js +48 -3
- package/vendor/core/dist/types.d.ts +26 -0
- package/vendor/core/dist/types.js +5 -0
- package/vendor/core/package.json +16 -5
- package/vendor/postgres/cf/src/connection.js +18 -0
- package/vendor/postgres/cjs/src/connection.js +18 -0
- package/vendor/postgres/src/connection.js +18 -0
- /package/vendor/postgres/{.bun-tag-f39dafdb2305d504 → .bun-tag-2f292c6554a8475e} +0 -0
|
@@ -1,50 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isEventAttachment = isEventAttachment;
|
|
4
|
-
exports.
|
|
5
|
-
exports.matchesType = matchesType;
|
|
4
|
+
exports.matchesCollection = matchesCollection;
|
|
6
5
|
exports.matchesRecord = matchesRecord;
|
|
7
6
|
exports.hasWorkspaceAttachment = hasWorkspaceAttachment;
|
|
8
7
|
exports.eventAttachmentsFor = eventAttachmentsFor;
|
|
9
8
|
const collection_selection_1 = require("./collection-selection");
|
|
10
|
-
/** An event's type qualifies its linked entities; it never names a page tab. */
|
|
11
9
|
function isEventAttachment(attachment) {
|
|
12
|
-
return
|
|
10
|
+
return "event" in attachment;
|
|
13
11
|
}
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
/** A tab on the type's list page, when the list's selection implies `when`. */
|
|
13
|
+
function matchesCollection(attachment, typeSlug, selection = {}) {
|
|
14
|
+
return ("collection" in attachment &&
|
|
15
|
+
attachment.collection === typeSlug &&
|
|
16
|
+
(!attachment.when || (0, collection_selection_1.selectionImplies)(selection, attachment.when)));
|
|
16
17
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
attachment.
|
|
21
|
-
attachment.
|
|
22
|
-
(!attachment.when || (0, collection_selection_1.selectionImplies)(selection, attachment.when)) &&
|
|
23
|
-
(attachment.placement ?? "tab") === placement);
|
|
24
|
-
}
|
|
25
|
-
function matchesRecord(attachment, record, placement) {
|
|
26
|
-
if (isEventAttachment(attachment))
|
|
27
|
-
return false;
|
|
28
|
-
if ((attachment.placement ?? "tab") !== placement)
|
|
29
|
-
return false;
|
|
30
|
-
if ("entity" in attachment) {
|
|
31
|
-
return typeof attachment.entity === "number"
|
|
32
|
-
? attachment.entity === record.id
|
|
33
|
-
: record.parentId === null && attachment.entity === record.slug;
|
|
34
|
-
}
|
|
35
|
-
return ("type" in attachment &&
|
|
36
|
-
attachment.type === record.type &&
|
|
37
|
-
attachment.surface !== "collection");
|
|
18
|
+
/** A card on the record's page: every record of the type, or one pinned id. */
|
|
19
|
+
function matchesRecord(attachment, record) {
|
|
20
|
+
return ("record" in attachment &&
|
|
21
|
+
attachment.record === record.type &&
|
|
22
|
+
(attachment.id === undefined || attachment.id === record.id));
|
|
38
23
|
}
|
|
39
24
|
function hasWorkspaceAttachment(attach) {
|
|
40
|
-
return attach.some((attachment) =>
|
|
41
|
-
"workspace" in attachment &&
|
|
42
|
-
attachment.workspace === true);
|
|
25
|
+
return attach.some((attachment) => "workspace" in attachment);
|
|
43
26
|
}
|
|
44
27
|
/** Without a kind, the web host considers every event attachment a candidate. */
|
|
45
28
|
function eventAttachmentsFor(attach, semanticType) {
|
|
46
29
|
return attach
|
|
47
30
|
.filter(isEventAttachment)
|
|
48
|
-
.filter((attachment) => semanticType === undefined || attachment.
|
|
31
|
+
.filter((attachment) => semanticType === undefined || attachment.event === semanticType);
|
|
49
32
|
}
|
|
50
33
|
//# sourceMappingURL=view-attach.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ViewActionDecl, type ViewAttachment, type ViewParamDecl } from "./manage-views";
|
|
2
|
+
/** A view's declaration with its defaults applied: what the server stores and
|
|
3
|
+
* what the CLI hashes, so both derive it from the same function. */
|
|
4
|
+
export interface ViewDefinitionRecord {
|
|
5
|
+
key: string;
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
attach: ViewAttachment[];
|
|
9
|
+
params: Record<string, ViewParamDecl>;
|
|
10
|
+
actions: Record<string, ViewActionDecl>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Read `export const view = defineView({...})` out of a view module, without
|
|
14
|
+
* running it. `js` is the module with TypeScript and JSX already stripped
|
|
15
|
+
* (esbuild `transform`); the argument must be a plain literal (objects,
|
|
16
|
+
* arrays, strings, numbers, booleans, null), so a declaration is data the
|
|
17
|
+
* server can read safely from any author's source. Throws an Error whose
|
|
18
|
+
* message names what to fix.
|
|
19
|
+
*/
|
|
20
|
+
export declare function readViewDefinition(js: string): ViewDefinitionRecord;
|
|
21
|
+
//# sourceMappingURL=view-definition.d.ts.map
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readViewDefinition = readViewDefinition;
|
|
4
|
+
const value_1 = require("@sinclair/typebox/value");
|
|
5
|
+
const acorn_1 = require("acorn");
|
|
6
|
+
const manage_views_1 = require("./manage-views");
|
|
7
|
+
const VIEWS_PACKAGE = "@lobu/views";
|
|
8
|
+
/**
|
|
9
|
+
* Read `export const view = defineView({...})` out of a view module, without
|
|
10
|
+
* running it. `js` is the module with TypeScript and JSX already stripped
|
|
11
|
+
* (esbuild `transform`); the argument must be a plain literal (objects,
|
|
12
|
+
* arrays, strings, numbers, booleans, null), so a declaration is data the
|
|
13
|
+
* server can read safely from any author's source. Throws an Error whose
|
|
14
|
+
* message names what to fix.
|
|
15
|
+
*/
|
|
16
|
+
function readViewDefinition(js) {
|
|
17
|
+
let program;
|
|
18
|
+
try {
|
|
19
|
+
program = (0, acorn_1.parse)(js, {
|
|
20
|
+
ecmaVersion: "latest",
|
|
21
|
+
sourceType: "module",
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
throw new Error(`view module does not parse: ${error.message}`);
|
|
26
|
+
}
|
|
27
|
+
const callee = defineViewLocalName(program.body);
|
|
28
|
+
const argument = callee ? viewExportArgument(program.body, callee) : null;
|
|
29
|
+
if (!argument) {
|
|
30
|
+
throw new Error(`the module must export const view = defineView({ key, attach, ... }) with defineView imported from "${VIEWS_PACKAGE}"`);
|
|
31
|
+
}
|
|
32
|
+
if (!hasDefaultExport(program.body)) {
|
|
33
|
+
throw new Error("the module must have a default-export component");
|
|
34
|
+
}
|
|
35
|
+
const raw = literalValue(argument, "defineView");
|
|
36
|
+
if (!value_1.Value.Check(manage_views_1.ViewDefinitionSchema, raw)) {
|
|
37
|
+
const first = value_1.Value.Errors(manage_views_1.ViewDefinitionSchema, raw).First();
|
|
38
|
+
const at = first?.path
|
|
39
|
+
? `defineView${first.path.split("/").join(".")}`
|
|
40
|
+
: "defineView";
|
|
41
|
+
// A union (an attach entry) names the shapes it accepts, not "Expected
|
|
42
|
+
// union value".
|
|
43
|
+
const schema = first?.schema;
|
|
44
|
+
const message = schema?.anyOf && schema.description
|
|
45
|
+
? `Expected ${schema.description}`
|
|
46
|
+
: (first?.message ?? "invalid view definition");
|
|
47
|
+
throw new Error(`${at}: ${message}`);
|
|
48
|
+
}
|
|
49
|
+
const def = raw;
|
|
50
|
+
return {
|
|
51
|
+
key: def.key,
|
|
52
|
+
name: def.name?.trim() ? def.name : def.key,
|
|
53
|
+
description: def.description ?? "",
|
|
54
|
+
attach: def.attach,
|
|
55
|
+
params: def.params ?? {},
|
|
56
|
+
actions: def.actions ?? {},
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function defineViewLocalName(body) {
|
|
60
|
+
for (const statement of body) {
|
|
61
|
+
if (statement.type !== "ImportDeclaration")
|
|
62
|
+
continue;
|
|
63
|
+
if (statement.source.value !== VIEWS_PACKAGE)
|
|
64
|
+
continue;
|
|
65
|
+
for (const spec of statement.specifiers) {
|
|
66
|
+
if (spec.type !== "ImportSpecifier")
|
|
67
|
+
continue;
|
|
68
|
+
const imported = spec.imported;
|
|
69
|
+
if (imported.name === "defineView" || imported.value === "defineView") {
|
|
70
|
+
return spec.local.name;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
function hasDefaultExport(body) {
|
|
77
|
+
return body.some((statement) => statement.type === "ExportDefaultDeclaration" ||
|
|
78
|
+
(statement.type === "ExportNamedDeclaration" &&
|
|
79
|
+
(statement.specifiers ?? []).some((spec) => spec.exported.name === "default")));
|
|
80
|
+
}
|
|
81
|
+
function viewExportArgument(body, callee) {
|
|
82
|
+
for (const statement of body) {
|
|
83
|
+
if (statement.type !== "ExportNamedDeclaration")
|
|
84
|
+
continue;
|
|
85
|
+
const declaration = statement.declaration;
|
|
86
|
+
if (declaration?.type !== "VariableDeclaration")
|
|
87
|
+
continue;
|
|
88
|
+
for (const declarator of declaration.declarations) {
|
|
89
|
+
if (declarator.id.name !== "view")
|
|
90
|
+
continue;
|
|
91
|
+
const init = declarator.init;
|
|
92
|
+
const args = init?.arguments;
|
|
93
|
+
if (init?.type === "CallExpression" &&
|
|
94
|
+
init.callee.type === "Identifier" &&
|
|
95
|
+
init.callee.name === callee &&
|
|
96
|
+
args?.length === 1) {
|
|
97
|
+
return args[0] ?? null;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
function literalValue(node, path) {
|
|
104
|
+
switch (node.type) {
|
|
105
|
+
case "ObjectExpression": {
|
|
106
|
+
const out = {};
|
|
107
|
+
for (const prop of node.properties) {
|
|
108
|
+
if (prop.type !== "Property" ||
|
|
109
|
+
prop.kind !== "init" ||
|
|
110
|
+
prop.computed ||
|
|
111
|
+
prop.method ||
|
|
112
|
+
prop.shorthand) {
|
|
113
|
+
throw notLiteral(path, "a spread, shorthand, method or computed key");
|
|
114
|
+
}
|
|
115
|
+
const keyNode = prop.key;
|
|
116
|
+
const key = keyNode.type === "Identifier"
|
|
117
|
+
? keyNode.name
|
|
118
|
+
: typeof keyNode.value === "string" ||
|
|
119
|
+
typeof keyNode.value === "number"
|
|
120
|
+
? String(keyNode.value)
|
|
121
|
+
: null;
|
|
122
|
+
if (key === null || key === "__proto__") {
|
|
123
|
+
throw notLiteral(path, "an unsupported key");
|
|
124
|
+
}
|
|
125
|
+
out[key] = literalValue(prop.value, `${path}.${key}`);
|
|
126
|
+
}
|
|
127
|
+
return out;
|
|
128
|
+
}
|
|
129
|
+
case "ArrayExpression":
|
|
130
|
+
return node.elements.map((element, index) => {
|
|
131
|
+
if (!element || element.type === "SpreadElement") {
|
|
132
|
+
throw notLiteral(`${path}[${index}]`, "a hole or spread");
|
|
133
|
+
}
|
|
134
|
+
return literalValue(element, `${path}[${index}]`);
|
|
135
|
+
});
|
|
136
|
+
case "Literal":
|
|
137
|
+
if (node.regex || node.bigint !== undefined) {
|
|
138
|
+
throw notLiteral(path, "a regular expression or bigint");
|
|
139
|
+
}
|
|
140
|
+
return node.value;
|
|
141
|
+
case "UnaryExpression": {
|
|
142
|
+
const argument = node.argument;
|
|
143
|
+
if (node.operator === "-" &&
|
|
144
|
+
argument.type === "Literal" &&
|
|
145
|
+
typeof argument.value === "number") {
|
|
146
|
+
return -argument.value;
|
|
147
|
+
}
|
|
148
|
+
throw notLiteral(path, `the expression \`${node.operator}…\``);
|
|
149
|
+
}
|
|
150
|
+
case "TemplateLiteral":
|
|
151
|
+
if (node.expressions.length === 0) {
|
|
152
|
+
return (node.quasis[0]?.value)
|
|
153
|
+
.cooked;
|
|
154
|
+
}
|
|
155
|
+
throw notLiteral(path, "a template with ${…}");
|
|
156
|
+
default:
|
|
157
|
+
throw notLiteral(path, node.type === "Identifier"
|
|
158
|
+
? `the variable \`${node.name}\``
|
|
159
|
+
: `a ${node.type}`);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
function notLiteral(path, found) {
|
|
163
|
+
return new Error(`${path} must be written out as a literal (objects, arrays, strings, numbers, booleans, null); found ${found}`);
|
|
164
|
+
}
|
|
165
|
+
//# sourceMappingURL=view-definition.js.map
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The view runtime contract: React, React DOM and `@lobu/views` are supplied
|
|
3
|
+
* by the view shell, never bundled into a view. The server builds them once
|
|
4
|
+
* from its own installation and inlines that script ahead of every view
|
|
5
|
+
* bundle as `globalThis[VIEW_RUNTIME_GLOBAL]`; each view bundle reads its
|
|
6
|
+
* runtime imports off that global. A runtime fix reaches views using this
|
|
7
|
+
* contract on the next deploy, without re-saving them. A self-contained
|
|
8
|
+
* bundle from before the contract keeps running on its own runtime until it
|
|
9
|
+
* is saved again; one the server built is rebuilt when served.
|
|
10
|
+
*
|
|
11
|
+
* Every view compiler builds through these pieces — the server on save and on
|
|
12
|
+
* a served rebuild, and `lobu apply` in the author's checkout — so the same
|
|
13
|
+
* retained source compiles to the same bundle wherever it is built.
|
|
14
|
+
*/
|
|
15
|
+
/** Global the shell's runtime script assigns and every view bundle reads. */
|
|
16
|
+
export declare const VIEW_RUNTIME_GLOBAL = "__lobuViews";
|
|
17
|
+
/** Module specifiers a view imports from the shell runtime. */
|
|
18
|
+
export declare const VIEW_RUNTIME_MODULES: readonly string[];
|
|
19
|
+
/** Packages behind {@link VIEW_RUNTIME_MODULES}. A view whose retained
|
|
20
|
+
* dependencies are all among these needs nothing but its own source files
|
|
21
|
+
* to compile, so the server can build it. */
|
|
22
|
+
export declare const VIEW_RUNTIME_PACKAGES: readonly string[];
|
|
23
|
+
/** Entry source that mounts the module at `specifier` through the runtime's
|
|
24
|
+
* `mountView`: its `view` declaration and default-export component. */
|
|
25
|
+
export declare function viewMountEntry(specifier: string): string;
|
|
26
|
+
/** Entry source for the shell runtime script: every runtime module, keyed by
|
|
27
|
+
* specifier on the runtime global. */
|
|
28
|
+
export declare function viewRuntimeEntry(): string;
|
|
29
|
+
/** esbuild options every view bundle and the runtime script share. */
|
|
30
|
+
export declare const VIEW_BUILD_OPTIONS: {
|
|
31
|
+
readonly bundle: true;
|
|
32
|
+
readonly write: false;
|
|
33
|
+
readonly format: "iife";
|
|
34
|
+
readonly platform: "browser";
|
|
35
|
+
readonly target: "es2022";
|
|
36
|
+
readonly jsx: "automatic";
|
|
37
|
+
readonly minify: true;
|
|
38
|
+
readonly sourcemap: false;
|
|
39
|
+
readonly legalComments: "none";
|
|
40
|
+
readonly define: {
|
|
41
|
+
readonly "process.env.NODE_ENV": "\"production\"";
|
|
42
|
+
};
|
|
43
|
+
readonly logLevel: "silent";
|
|
44
|
+
};
|
|
45
|
+
interface RuntimePluginBuild {
|
|
46
|
+
onResolve(options: {
|
|
47
|
+
filter: RegExp;
|
|
48
|
+
}, callback: (args: {
|
|
49
|
+
path: string;
|
|
50
|
+
}) => {
|
|
51
|
+
path: string;
|
|
52
|
+
namespace: string;
|
|
53
|
+
} | undefined): void;
|
|
54
|
+
onLoad(options: {
|
|
55
|
+
filter: RegExp;
|
|
56
|
+
namespace: string;
|
|
57
|
+
}, callback: (args: {
|
|
58
|
+
path: string;
|
|
59
|
+
}) => {
|
|
60
|
+
contents: string;
|
|
61
|
+
loader: "js";
|
|
62
|
+
}): void;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* esbuild plugin resolving each runtime module to a shim that reads it off
|
|
66
|
+
* the runtime global, so the bundle carries none of the runtime. Structurally
|
|
67
|
+
* typed: core does not depend on esbuild.
|
|
68
|
+
*/
|
|
69
|
+
export declare function viewRuntimePlugin(): {
|
|
70
|
+
name: string;
|
|
71
|
+
setup(build: RuntimePluginBuild): void;
|
|
72
|
+
};
|
|
73
|
+
export {};
|
|
74
|
+
//# sourceMappingURL=view-runtime.d.ts.map
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The view runtime contract: React, React DOM and `@lobu/views` are supplied
|
|
4
|
+
* by the view shell, never bundled into a view. The server builds them once
|
|
5
|
+
* from its own installation and inlines that script ahead of every view
|
|
6
|
+
* bundle as `globalThis[VIEW_RUNTIME_GLOBAL]`; each view bundle reads its
|
|
7
|
+
* runtime imports off that global. A runtime fix reaches views using this
|
|
8
|
+
* contract on the next deploy, without re-saving them. A self-contained
|
|
9
|
+
* bundle from before the contract keeps running on its own runtime until it
|
|
10
|
+
* is saved again; one the server built is rebuilt when served.
|
|
11
|
+
*
|
|
12
|
+
* Every view compiler builds through these pieces — the server on save and on
|
|
13
|
+
* a served rebuild, and `lobu apply` in the author's checkout — so the same
|
|
14
|
+
* retained source compiles to the same bundle wherever it is built.
|
|
15
|
+
*/
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.VIEW_BUILD_OPTIONS = exports.VIEW_RUNTIME_PACKAGES = exports.VIEW_RUNTIME_MODULES = exports.VIEW_RUNTIME_GLOBAL = void 0;
|
|
18
|
+
exports.viewMountEntry = viewMountEntry;
|
|
19
|
+
exports.viewRuntimeEntry = viewRuntimeEntry;
|
|
20
|
+
exports.viewRuntimePlugin = viewRuntimePlugin;
|
|
21
|
+
/** Global the shell's runtime script assigns and every view bundle reads. */
|
|
22
|
+
exports.VIEW_RUNTIME_GLOBAL = "__lobuViews";
|
|
23
|
+
/** Module specifiers a view imports from the shell runtime. */
|
|
24
|
+
exports.VIEW_RUNTIME_MODULES = [
|
|
25
|
+
"react",
|
|
26
|
+
"react/jsx-runtime",
|
|
27
|
+
"react-dom",
|
|
28
|
+
"react-dom/client",
|
|
29
|
+
"@lobu/views",
|
|
30
|
+
"@lobu/views/components",
|
|
31
|
+
];
|
|
32
|
+
/** Packages behind {@link VIEW_RUNTIME_MODULES}. A view whose retained
|
|
33
|
+
* dependencies are all among these needs nothing but its own source files
|
|
34
|
+
* to compile, so the server can build it. */
|
|
35
|
+
exports.VIEW_RUNTIME_PACKAGES = [
|
|
36
|
+
"react",
|
|
37
|
+
"react-dom",
|
|
38
|
+
"@lobu/views",
|
|
39
|
+
];
|
|
40
|
+
const RUNTIME_NAMESPACE = "lobu-view-runtime";
|
|
41
|
+
/** Entry source that mounts the module at `specifier` through the runtime's
|
|
42
|
+
* `mountView`: its `view` declaration and default-export component. */
|
|
43
|
+
function viewMountEntry(specifier) {
|
|
44
|
+
return `import { mountView } from "@lobu/views";\nimport * as mod from ${JSON.stringify(specifier)};\nmountView(mod.view, mod.default);\n`;
|
|
45
|
+
}
|
|
46
|
+
/** Entry source for the shell runtime script: every runtime module, keyed by
|
|
47
|
+
* specifier on the runtime global. */
|
|
48
|
+
function viewRuntimeEntry() {
|
|
49
|
+
const imports = exports.VIEW_RUNTIME_MODULES.map((specifier, i) => `import * as m${i} from ${JSON.stringify(specifier)};`);
|
|
50
|
+
const entries = exports.VIEW_RUNTIME_MODULES.map((specifier, i) => `${JSON.stringify(specifier)}: m${i}`);
|
|
51
|
+
return `${imports.join("\n")}\nglobalThis[${JSON.stringify(exports.VIEW_RUNTIME_GLOBAL)}] = Object.freeze({ ${entries.join(", ")} });\n`;
|
|
52
|
+
}
|
|
53
|
+
/** esbuild options every view bundle and the runtime script share. */
|
|
54
|
+
exports.VIEW_BUILD_OPTIONS = {
|
|
55
|
+
bundle: true,
|
|
56
|
+
write: false,
|
|
57
|
+
format: "iife",
|
|
58
|
+
platform: "browser",
|
|
59
|
+
target: "es2022",
|
|
60
|
+
jsx: "automatic",
|
|
61
|
+
minify: true,
|
|
62
|
+
sourcemap: false,
|
|
63
|
+
legalComments: "none",
|
|
64
|
+
define: { "process.env.NODE_ENV": '"production"' },
|
|
65
|
+
logLevel: "silent",
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* esbuild plugin resolving each runtime module to a shim that reads it off
|
|
69
|
+
* the runtime global, so the bundle carries none of the runtime. Structurally
|
|
70
|
+
* typed: core does not depend on esbuild.
|
|
71
|
+
*/
|
|
72
|
+
function viewRuntimePlugin() {
|
|
73
|
+
return {
|
|
74
|
+
name: "lobu-view-runtime",
|
|
75
|
+
setup(build) {
|
|
76
|
+
build.onResolve({ filter: /.*/ }, (args) => exports.VIEW_RUNTIME_MODULES.includes(args.path)
|
|
77
|
+
? { path: args.path, namespace: RUNTIME_NAMESPACE }
|
|
78
|
+
: undefined);
|
|
79
|
+
build.onLoad({ filter: /.*/, namespace: RUNTIME_NAMESPACE }, (args) => ({
|
|
80
|
+
contents: `module.exports = globalThis[${JSON.stringify(exports.VIEW_RUNTIME_GLOBAL)}][${JSON.stringify(args.path)}];`,
|
|
81
|
+
loader: "js",
|
|
82
|
+
}));
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=view-runtime.js.map
|
|
@@ -442,6 +442,14 @@ export declare const AgentTurnPollPayloadSchema: import("@sinclair/typebox").TOb
|
|
|
442
442
|
* stays off unless the caller explicitly requests an effort level.
|
|
443
443
|
*/
|
|
444
444
|
reasoning: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
445
|
+
/**
|
|
446
|
+
* pi-ai's `Model.thinkingLevelMap`: the provider's name for each
|
|
447
|
+
* thinking level, `null` where the model does not serve that level.
|
|
448
|
+
* gpt-5-mini maps `off` to `null` because it cannot turn reasoning off;
|
|
449
|
+
* without the map pi-ai sends `effort: "none"` and OpenAI rejects it.
|
|
450
|
+
* Absent → pi-ai's own defaults.
|
|
451
|
+
*/
|
|
452
|
+
thinking_level_map: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>>>;
|
|
445
453
|
/**
|
|
446
454
|
* The modalities this model accepts, in pi-ai's own `Model.input`
|
|
447
455
|
* vocabulary and resolved from pi-ai's model registry — NOT guessed
|
|
@@ -489,7 +497,7 @@ export declare const AgentTurnPollPayloadSchema: import("@sinclair/typebox").TOb
|
|
|
489
497
|
}>>;
|
|
490
498
|
/**
|
|
491
499
|
* The gateway tools available for this turn, by NAME only —
|
|
492
|
-
* `ask_user`, `send_message
|
|
500
|
+
* `ask_user`, `send_message` and the rest of
|
|
493
501
|
* `@lobu/plugin-conversations`. The guest runs that package's own
|
|
494
502
|
* implementation, so the route, the request body and the schema live
|
|
495
503
|
* there and never on this wire; sending a name the package does not
|
|
@@ -521,6 +529,12 @@ export declare const AgentTurnPollPayloadSchema: import("@sinclair/typebox").TOb
|
|
|
521
529
|
conversation_id: import("@sinclair/typebox").TString;
|
|
522
530
|
platform: import("@sinclair/typebox").TString;
|
|
523
531
|
}>>;
|
|
532
|
+
/**
|
|
533
|
+
* Ask the turn's own model for follow-up chips after it answers and
|
|
534
|
+
* return them with the completion. Set by the gateway only for a
|
|
535
|
+
* human-facing turn; absent → no chips.
|
|
536
|
+
*/
|
|
537
|
+
follow_ups: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TLiteral<true>>;
|
|
524
538
|
}>>;
|
|
525
539
|
/**
|
|
526
540
|
* Long-term memory for this turn: `@lobu/plugin-memory`'s recall hook
|
|
@@ -850,6 +864,14 @@ export declare const PollResponseSchema: import("@sinclair/typebox").TObject<{
|
|
|
850
864
|
* stays off unless the caller explicitly requests an effort level.
|
|
851
865
|
*/
|
|
852
866
|
reasoning: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
867
|
+
/**
|
|
868
|
+
* pi-ai's `Model.thinkingLevelMap`: the provider's name for each
|
|
869
|
+
* thinking level, `null` where the model does not serve that level.
|
|
870
|
+
* gpt-5-mini maps `off` to `null` because it cannot turn reasoning off;
|
|
871
|
+
* without the map pi-ai sends `effort: "none"` and OpenAI rejects it.
|
|
872
|
+
* Absent → pi-ai's own defaults.
|
|
873
|
+
*/
|
|
874
|
+
thinking_level_map: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>>>;
|
|
853
875
|
/**
|
|
854
876
|
* The modalities this model accepts, in pi-ai's own `Model.input`
|
|
855
877
|
* vocabulary and resolved from pi-ai's model registry — NOT guessed
|
|
@@ -897,7 +919,7 @@ export declare const PollResponseSchema: import("@sinclair/typebox").TObject<{
|
|
|
897
919
|
}>>;
|
|
898
920
|
/**
|
|
899
921
|
* The gateway tools available for this turn, by NAME only —
|
|
900
|
-
* `ask_user`, `send_message
|
|
922
|
+
* `ask_user`, `send_message` and the rest of
|
|
901
923
|
* `@lobu/plugin-conversations`. The guest runs that package's own
|
|
902
924
|
* implementation, so the route, the request body and the schema live
|
|
903
925
|
* there and never on this wire; sending a name the package does not
|
|
@@ -929,6 +951,12 @@ export declare const PollResponseSchema: import("@sinclair/typebox").TObject<{
|
|
|
929
951
|
conversation_id: import("@sinclair/typebox").TString;
|
|
930
952
|
platform: import("@sinclair/typebox").TString;
|
|
931
953
|
}>>;
|
|
954
|
+
/**
|
|
955
|
+
* Ask the turn's own model for follow-up chips after it answers and
|
|
956
|
+
* return them with the completion. Set by the gateway only for a
|
|
957
|
+
* human-facing turn; absent → no chips.
|
|
958
|
+
*/
|
|
959
|
+
follow_ups: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TLiteral<true>>;
|
|
932
960
|
}>>;
|
|
933
961
|
/**
|
|
934
962
|
* Long-term memory for this turn: `@lobu/plugin-memory`'s recall hook
|
|
@@ -1287,6 +1315,15 @@ export declare const CompleteAgentTurnRequestSchema: import("@sinclair/typebox")
|
|
|
1287
1315
|
* (`chat-response-bridge`) already acts on it.
|
|
1288
1316
|
*/
|
|
1289
1317
|
replied_in_band: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
1318
|
+
/**
|
|
1319
|
+
* Follow-up chips for the owner's answer, proposed by the same model after it
|
|
1320
|
+
* answered (`tools.follow_ups`). The worker is untrusted, so the completion
|
|
1321
|
+
* route re-sanitizes them; the gateway delivers them with the reply.
|
|
1322
|
+
*/
|
|
1323
|
+
suggestions: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
1324
|
+
title: import("@sinclair/typebox").TString;
|
|
1325
|
+
message: import("@sinclair/typebox").TString;
|
|
1326
|
+
}>>>;
|
|
1290
1327
|
/**
|
|
1291
1328
|
* Tool traces that finished too late to ride a heartbeat, oldest first.
|
|
1292
1329
|
*
|
|
@@ -29,6 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
exports.HeartbeatResponseSchema = exports.DispatchChromeActionResponseSchema = exports.DispatchChromeActionRequestSchema = exports.ExecuteConnectorOperationRequestSchema = exports.HeartbeatRequestSchema = exports.AGENT_TURN_BRIDGE_BYTES = exports.TURN_DELTA_MAX_CHARS = exports.PollAuthSignalResponseSchema = exports.PollAuthSignalRequestSchema = exports.EmitAuthArtifactRequestSchema = exports.CompleteAgentTurnResponseSchema = exports.CompleteAgentTurnRequestSchema = exports.AGENT_TURN_INPUT_MAX = exports.TURN_TOOL_EVENT_QUEUE_MAX = exports.TurnToolEventSchema = exports.TURN_TOOL_OUTPUT_MAX_CHARS = exports.CompleteAutomationResponseSchema = exports.CompleteAutomationRequestSchema = exports.CompleteAuthRequestSchema = exports.CompleteEmbeddingsRequestSchema = exports.EmbeddingEntrySchema = exports.EmbedEventSchema = exports.CompleteActionRequestSchema = exports.CompleteRequestSchema = exports.StreamBatchSchema = exports.ContentItemSchema = exports.ActivatePageResponseSchema = exports.ActivatePageRequestSchema = exports.PollResponseSchema = exports.FeedSourceAckSchema = exports.AgentTurnPollPayloadSchema = exports.AutomationPollPayloadSchema = exports.AutomationPollContextSchema = exports.AutomationPollEventSchema = exports.AutomationPollMetaSchema = exports.AutomationExecutionConfigSchema = exports.PollRequestSchema = exports.WORKER_POLL_MAX_WAIT_SECONDS = exports.FeedNotificationSchema = exports.EXECUTION_BACKENDS = exports.OAuthCredentialsSchema = exports.WorkerExitDiagnosticsSchema = exports.WorkerExitReasonSchema = exports.RunTypeSchema = exports.ConnectorHttpRequestSchema = exports.SourceAttributionSchema = exports.CONNECTOR_HTTP_MAX_BYTES = exports.CONNECTOR_HTTP_AUTH_CAPABILITY = void 0;
|
|
30
30
|
exports.defaultBackendCapacity = defaultBackendCapacity;
|
|
31
31
|
const typebox_1 = require("@sinclair/typebox");
|
|
32
|
+
const suggestions_1 = require("../../suggestions");
|
|
32
33
|
const manage_operations_1 = require("../tools/manage-operations");
|
|
33
34
|
exports.CONNECTOR_HTTP_AUTH_CAPABILITY = "http_auth";
|
|
34
35
|
exports.CONNECTOR_HTTP_MAX_BYTES = 4 * 1024 * 1024;
|
|
@@ -471,6 +472,14 @@ exports.AgentTurnPollPayloadSchema = typebox_1.Type.Object({
|
|
|
471
472
|
* stays off unless the caller explicitly requests an effort level.
|
|
472
473
|
*/
|
|
473
474
|
reasoning: typebox_1.Type.Optional(typebox_1.Type.Boolean()),
|
|
475
|
+
/**
|
|
476
|
+
* pi-ai's `Model.thinkingLevelMap`: the provider's name for each
|
|
477
|
+
* thinking level, `null` where the model does not serve that level.
|
|
478
|
+
* gpt-5-mini maps `off` to `null` because it cannot turn reasoning off;
|
|
479
|
+
* without the map pi-ai sends `effort: "none"` and OpenAI rejects it.
|
|
480
|
+
* Absent → pi-ai's own defaults.
|
|
481
|
+
*/
|
|
482
|
+
thinking_level_map: typebox_1.Type.Optional(typebox_1.Type.Record(typebox_1.Type.String(), typebox_1.Type.Union([typebox_1.Type.String(), typebox_1.Type.Null()]))),
|
|
474
483
|
/**
|
|
475
484
|
* The modalities this model accepts, in pi-ai's own `Model.input`
|
|
476
485
|
* vocabulary and resolved from pi-ai's model registry — NOT guessed
|
|
@@ -526,7 +535,7 @@ exports.AgentTurnPollPayloadSchema = typebox_1.Type.Object({
|
|
|
526
535
|
remote_runtime: typebox_1.Type.Optional(typebox_1.Type.Object({ provider_id: typebox_1.Type.String({ minLength: 1 }) })),
|
|
527
536
|
/**
|
|
528
537
|
* The gateway tools available for this turn, by NAME only —
|
|
529
|
-
* `ask_user`, `send_message
|
|
538
|
+
* `ask_user`, `send_message` and the rest of
|
|
530
539
|
* `@lobu/plugin-conversations`. The guest runs that package's own
|
|
531
540
|
* implementation, so the route, the request body and the schema live
|
|
532
541
|
* there and never on this wire; sending a name the package does not
|
|
@@ -558,6 +567,12 @@ exports.AgentTurnPollPayloadSchema = typebox_1.Type.Object({
|
|
|
558
567
|
conversation_id: typebox_1.Type.String({ minLength: 1 }),
|
|
559
568
|
platform: typebox_1.Type.String({ minLength: 1 }),
|
|
560
569
|
})),
|
|
570
|
+
/**
|
|
571
|
+
* Ask the turn's own model for follow-up chips after it answers and
|
|
572
|
+
* return them with the completion. Set by the gateway only for a
|
|
573
|
+
* human-facing turn; absent → no chips.
|
|
574
|
+
*/
|
|
575
|
+
follow_ups: typebox_1.Type.Optional(typebox_1.Type.Literal(true)),
|
|
561
576
|
})),
|
|
562
577
|
/**
|
|
563
578
|
* Long-term memory for this turn: `@lobu/plugin-memory`'s recall hook
|
|
@@ -969,6 +984,14 @@ exports.CompleteAgentTurnRequestSchema = typebox_1.Type.Object({
|
|
|
969
984
|
* (`chat-response-bridge`) already acts on it.
|
|
970
985
|
*/
|
|
971
986
|
replied_in_band: typebox_1.Type.Optional(typebox_1.Type.Boolean()),
|
|
987
|
+
/**
|
|
988
|
+
* Follow-up chips for the owner's answer, proposed by the same model after it
|
|
989
|
+
* answered (`tools.follow_ups`). The worker is untrusted, so the completion
|
|
990
|
+
* route re-sanitizes them; the gateway delivers them with the reply.
|
|
991
|
+
*/
|
|
992
|
+
suggestions: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.Object({ title: typebox_1.Type.String(), message: typebox_1.Type.String() }), {
|
|
993
|
+
maxItems: suggestions_1.SUGGESTION_LIMITS.maxPrompts,
|
|
994
|
+
})),
|
|
972
995
|
/**
|
|
973
996
|
* Tool traces that finished too late to ride a heartbeat, oldest first.
|
|
974
997
|
*
|
|
@@ -32,7 +32,7 @@ export * from "./secret-refs";
|
|
|
32
32
|
export * from "./reserved";
|
|
33
33
|
export { extractTraceId, generateTraceId } from "./trace";
|
|
34
34
|
export type { AgentErrorContext, AgentInlineGuardrail, AgentOptions, AuthProfile, ConversationMessage, DeclaredCredential, HistoryMessage, InstructionContext, InstructionProvider, LogLevel, McpOAuthConfig, NetworkConfig, NixConfig, RegistryEntry, SessionContext, SkillConfig, SkillsConfig, SuggestedPrompt, ThinkingLevel, ThreadResponsePayload, } from "./types";
|
|
35
|
-
export { hasCredentialSource } from "./types";
|
|
35
|
+
export { hasCredentialSource, isRefreshSuspended } from "./types";
|
|
36
36
|
export { SUGGESTION_LIMITS, sanitizeSuggestionPrompts } from "./types";
|
|
37
37
|
export type { BaseMessage } from "./types/message";
|
|
38
38
|
export * from "./utils/encryption";
|
|
@@ -16,7 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
17
17
|
};
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.withLobuFileParameters = exports.slugify = exports.titleFromSessionJsonl = exports.parseSessionEntries = exports.entryToMessage = exports.sanitizeSuggestionPrompts = exports.SUGGESTION_LIMITS = exports.hasCredentialSource = exports.generateTraceId = exports.extractTraceId = exports.SDK_COMPAT_PROTOCOLS = exports.resolveSdkCompat = exports.isSdkCompat = exports.withSpan = exports.withChildSpan = exports.shutdownTracing = exports.SpanStatusCode = exports.SpanKind = exports.runInSpanContext = exports.initTracing = exports.getTracer = exports.getTraceparent = exports.getCurrentSpan = exports.flushTracing = exports.createSpan = exports.createRootSpan = exports.createChildSpan = exports.renderSkillMemorySection = exports.renderFallbackSystemContext = exports.BaseInstructionProvider = exports.CommandRegistry = exports.inferGrantKind = void 0;
|
|
19
|
+
exports.withLobuFileParameters = exports.slugify = exports.titleFromSessionJsonl = exports.parseSessionEntries = exports.entryToMessage = exports.sanitizeSuggestionPrompts = exports.SUGGESTION_LIMITS = exports.isRefreshSuspended = exports.hasCredentialSource = exports.generateTraceId = exports.extractTraceId = exports.SDK_COMPAT_PROTOCOLS = exports.resolveSdkCompat = exports.isSdkCompat = exports.withSpan = exports.withChildSpan = exports.shutdownTracing = exports.SpanStatusCode = exports.SpanKind = exports.runInSpanContext = exports.initTracing = exports.getTracer = exports.getTraceparent = exports.getCurrentSpan = exports.flushTracing = exports.createSpan = exports.createRootSpan = exports.createChildSpan = exports.renderSkillMemorySection = exports.renderFallbackSystemContext = exports.BaseInstructionProvider = exports.CommandRegistry = exports.inferGrantKind = void 0;
|
|
20
20
|
__exportStar(require("./agent-policy"), exports);
|
|
21
21
|
__exportStar(require("./tool-trace-summary"), exports);
|
|
22
22
|
__exportStar(require("./shell-safety"), exports);
|
|
@@ -84,6 +84,7 @@ Object.defineProperty(exports, "extractTraceId", { enumerable: true, get: functi
|
|
|
84
84
|
Object.defineProperty(exports, "generateTraceId", { enumerable: true, get: function () { return trace_1.generateTraceId; } });
|
|
85
85
|
var types_1 = require("./types");
|
|
86
86
|
Object.defineProperty(exports, "hasCredentialSource", { enumerable: true, get: function () { return types_1.hasCredentialSource; } });
|
|
87
|
+
Object.defineProperty(exports, "isRefreshSuspended", { enumerable: true, get: function () { return types_1.isRefreshSuspended; } });
|
|
87
88
|
var types_2 = require("./types");
|
|
88
89
|
Object.defineProperty(exports, "SUGGESTION_LIMITS", { enumerable: true, get: function () { return types_2.SUGGESTION_LIMITS; } });
|
|
89
90
|
Object.defineProperty(exports, "sanitizeSuggestionPrompts", { enumerable: true, get: function () { return types_2.sanitizeSuggestionPrompts; } });
|
|
@@ -31,9 +31,22 @@ export declare const SUGGESTION_LIMITS: {
|
|
|
31
31
|
* Normalize an untrusted `prompts` value into at most {@link SUGGESTION_LIMITS}
|
|
32
32
|
* valid `{title,message}` entries. Trims BEFORE capping length (so leading
|
|
33
33
|
* whitespace can't yield an empty displayed title), drops malformed/empty
|
|
34
|
-
* entries, and returns `[]` for any non-array input. Shared by the
|
|
35
|
-
* and
|
|
34
|
+
* entries, and returns `[]` for any non-array input. Shared by the worker
|
|
35
|
+
* and completion route so the worker (untrusted) and the server enforce one
|
|
36
36
|
* identical contract.
|
|
37
37
|
*/
|
|
38
38
|
export declare function sanitizeSuggestionPrompts(value: unknown): SuggestedPrompt[];
|
|
39
|
+
/**
|
|
40
|
+
* The follow-up question asked after a human-facing turn's reply, on the same
|
|
41
|
+
* session and model that wrote it. Asked as a side request — never appended to
|
|
42
|
+
* the conversation — so the model can use the user's language and preferences
|
|
43
|
+
* retained in its current context. Reusing the prefix enables prompt caching.
|
|
44
|
+
*/
|
|
45
|
+
export declare const FOLLOW_UP_SUGGESTIONS_PROMPT: string;
|
|
46
|
+
/**
|
|
47
|
+
* The chips in a reply to {@link FOLLOW_UP_SUGGESTIONS_PROMPT}, sanitized.
|
|
48
|
+
* Tolerates a markdown fence or prose around the object by parsing from the
|
|
49
|
+
* first `{` to the last `}`; anything unparseable is no suggestions.
|
|
50
|
+
*/
|
|
51
|
+
export declare function parseFollowUpSuggestions(reply: string): SuggestedPrompt[];
|
|
39
52
|
//# sourceMappingURL=suggestions.d.ts.map
|