@mountaya/studio 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/CHANGELOG.md +30 -0
- package/dist/agent/index.cjs +2561 -2815
- package/dist/agent/index.cjs.map +1 -1
- package/dist/agent/index.d.cts +766 -786
- package/dist/agent/index.d.ts +766 -786
- package/dist/agent/index.js +2553 -2790
- package/dist/agent/index.js.map +1 -1
- package/dist/chunk-3Oi_Zrtm.js +9 -0
- package/dist/chunk-3Oi_Zrtm.js.map +1 -0
- package/dist/chunk-B18OPIu_.js +6 -0
- package/dist/chunk-B18OPIu_.js.map +1 -0
- package/dist/chunk-B5Uz3Qct.cjs +15 -0
- package/dist/chunk-B5Uz3Qct.cjs.map +1 -0
- package/dist/chunk-BBEJwkd3.d.cts +839 -0
- package/dist/chunk-BIEc_SkR.cjs +29 -0
- package/dist/chunk-BIEc_SkR.cjs.map +1 -0
- package/dist/chunk-BKMFOe-N.js +171 -0
- package/dist/chunk-BKMFOe-N.js.map +1 -0
- package/dist/chunk-BP4uy7E1.d.ts +11583 -0
- package/dist/chunk-BSHTsFiB.js +1403 -0
- package/dist/chunk-BSHTsFiB.js.map +1 -0
- package/dist/chunk-BTUUABGI.js +17 -0
- package/dist/chunk-BTUUABGI.js.map +1 -0
- package/dist/chunk-BaPiaz5X.cjs +115 -0
- package/dist/chunk-BaPiaz5X.cjs.map +1 -0
- package/dist/chunk-BeCVpkYr.cjs +542 -0
- package/dist/chunk-BeCVpkYr.cjs.map +1 -0
- package/dist/chunk-BgngsvK8.cjs +6202 -0
- package/dist/chunk-BgngsvK8.cjs.map +1 -0
- package/dist/chunk-BhInd7CJ.d.cts +253 -0
- package/dist/chunk-Bn6ZbxkS.cjs +27 -0
- package/dist/chunk-By9ZnkVI.js +60 -0
- package/dist/chunk-By9ZnkVI.js.map +1 -0
- package/dist/chunk-BzqPhxsz.cjs +367 -0
- package/dist/chunk-BzqPhxsz.cjs.map +1 -0
- package/dist/chunk-C2mMX81q.d.ts +443 -0
- package/dist/chunk-C2rr9Q0V.cjs +1402 -0
- package/dist/chunk-C2rr9Q0V.cjs.map +1 -0
- package/dist/{directorThreads-CqmvsV8b.d.cts → chunk-CDJCbwIQ.d.cts} +20 -22
- package/dist/chunk-CLGvBOVH.d.cts +1654 -0
- package/dist/chunk-COdw1dc6.d.ts +525 -0
- package/dist/chunk-CQCJnT2i.d.ts +511 -0
- package/dist/chunk-CSyHY67q.cjs +353 -0
- package/dist/chunk-CSyHY67q.cjs.map +1 -0
- package/dist/chunk-CiK1Iqrv.js +950 -0
- package/dist/chunk-CiK1Iqrv.js.map +1 -0
- package/dist/chunk-CmJBgSwZ.cjs +24 -0
- package/dist/chunk-CmJBgSwZ.cjs.map +1 -0
- package/dist/chunk-CnrsRK2u.cjs +83 -0
- package/dist/chunk-CnrsRK2u.cjs.map +1 -0
- package/dist/chunk-Co782_9r.js +326 -0
- package/dist/chunk-Co782_9r.js.map +1 -0
- package/dist/chunk-Csr3KDpZ.cjs +32 -0
- package/dist/chunk-Csr3KDpZ.cjs.map +1 -0
- package/dist/chunk-CwkmccXv.js +89 -0
- package/dist/chunk-CwkmccXv.js.map +1 -0
- package/dist/chunk-D0Q4iL9B.cjs +255 -0
- package/dist/chunk-D0Q4iL9B.cjs.map +1 -0
- package/dist/chunk-DFwiSzUS.cjs +72 -0
- package/dist/chunk-DFwiSzUS.cjs.map +1 -0
- package/dist/chunk-DIFayl2P.d.cts +443 -0
- package/dist/chunk-DIGF58ux.d.cts +525 -0
- package/dist/chunk-DKuuuld5.js +101 -0
- package/dist/chunk-DKuuuld5.js.map +1 -0
- package/dist/chunk-DMePkFEo.js +5054 -0
- package/dist/chunk-DMePkFEo.js.map +1 -0
- package/dist/chunk-DO5SIBgu.js +305 -0
- package/dist/chunk-DO5SIBgu.js.map +1 -0
- package/dist/chunk-DOQ_7eE5.d.ts +6662 -0
- package/dist/{tabs-B2nRO4p_.d.ts → chunk-DThaaNeb.d.cts} +2 -2
- package/dist/{tabs-B2nRO4p_.d.cts → chunk-DThaaNeb.d.ts} +2 -2
- package/dist/{directorThreads-CqmvsV8b.d.ts → chunk-DUQzjUJy.d.ts} +20 -22
- package/dist/chunk-DX37IPhV.cjs +1903 -0
- package/dist/chunk-DX37IPhV.cjs.map +1 -0
- package/dist/chunk-Damps5Tk.cjs +155 -0
- package/dist/chunk-Damps5Tk.cjs.map +1 -0
- package/dist/chunk-DbK5PhpJ.d.ts +1654 -0
- package/dist/chunk-De0vAASv.d.ts +253 -0
- package/dist/chunk-DhSZ7YZt.d.cts +6662 -0
- package/dist/chunk-DjEvqvPA.cjs +43 -0
- package/dist/chunk-DjEvqvPA.cjs.map +1 -0
- package/dist/{saveFile-j-1kkApx.d.cts → chunk-DkwDzwvu.d.cts} +7 -9
- package/dist/{saveFile-j-1kkApx.d.ts → chunk-DkwDzwvu.d.ts} +7 -9
- package/dist/chunk-Dmszv9If.js +71 -0
- package/dist/chunk-Dmszv9If.js.map +1 -0
- package/dist/chunk-Dp_ftNWY.d.cts +511 -0
- package/dist/chunk-DsHQySz0.js +31 -0
- package/dist/chunk-DsHQySz0.js.map +1 -0
- package/dist/chunk-DwoUyHHh.js +281 -0
- package/dist/chunk-DwoUyHHh.js.map +1 -0
- package/dist/chunk-IaIDQflj.d.cts +2315 -0
- package/dist/chunk-IaIDQflj.d.ts +2315 -0
- package/dist/chunk-cVXLsZfL.d.ts +839 -0
- package/dist/chunk-mIaCX9EJ.d.cts +11583 -0
- package/dist/chunk-nJQxbOwQ.cjs +8962 -0
- package/dist/chunk-nJQxbOwQ.cjs.map +1 -0
- package/dist/chunk-o9jaxhCO.js +8852 -0
- package/dist/chunk-o9jaxhCO.js.map +1 -0
- package/dist/chunk-p-Tt_Lwz.js +14 -0
- package/dist/chunk-p-Tt_Lwz.js.map +1 -0
- package/dist/engines/index.cjs +2046 -3401
- package/dist/engines/index.cjs.map +1 -1
- package/dist/engines/index.d.cts +1510 -1550
- package/dist/engines/index.d.ts +1510 -1550
- package/dist/engines/index.js +2039 -3380
- package/dist/engines/index.js.map +1 -1
- package/dist/handlers/index.cjs +47 -93
- package/dist/handlers/index.cjs.map +1 -1
- package/dist/handlers/index.d.cts +61 -103
- package/dist/handlers/index.d.ts +61 -103
- package/dist/handlers/index.js +27 -36
- package/dist/handlers/index.js.map +1 -1
- package/dist/index.cjs +3347 -4398
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -7297
- package/dist/index.d.ts +8 -7297
- package/dist/index.js +2997 -3187
- package/dist/index.js.map +1 -1
- package/dist/plugins/index.cjs +482 -949
- package/dist/plugins/index.cjs.map +1 -1
- package/dist/plugins/index.d.cts +44 -61
- package/dist/plugins/index.d.ts +44 -61
- package/dist/plugins/index.js +471 -915
- package/dist/plugins/index.js.map +1 -1
- package/dist/seams/index.cjs +77 -140
- package/dist/seams/index.cjs.map +1 -1
- package/dist/seams/index.d.cts +125 -158
- package/dist/seams/index.d.ts +125 -158
- package/dist/seams/index.js +41 -71
- package/dist/seams/index.js.map +1 -1
- package/dist/strings/fr/index.cjs +2130 -2116
- package/dist/strings/fr/index.cjs.map +1 -1
- package/dist/strings/fr/index.d.cts +3 -5
- package/dist/strings/fr/index.d.ts +3 -5
- package/dist/strings/fr/index.js +2125 -2114
- package/dist/strings/fr/index.js.map +1 -1
- package/dist/strings/index.cjs +2331 -2625
- package/dist/strings/index.cjs.map +1 -1
- package/dist/strings/index.d.cts +3 -731
- package/dist/strings/index.d.ts +3 -731
- package/dist/strings/index.js +2324 -2615
- package/dist/strings/index.js.map +1 -1
- package/dist/testing/index.cjs +214 -276
- package/dist/testing/index.cjs.map +1 -1
- package/dist/testing/index.d.cts +61 -121
- package/dist/testing/index.d.ts +61 -121
- package/dist/testing/index.js +208 -273
- package/dist/testing/index.js.map +1 -1
- package/dist/time/index.cjs +23 -23
- package/dist/time/index.cjs.map +1 -1
- package/dist/time/index.d.cts +5 -7
- package/dist/time/index.d.ts +5 -7
- package/dist/time/index.js +18 -21
- package/dist/time/index.js.map +1 -1
- package/package.json +14 -15
- package/src/agent/rules/stateDelta.ts +1 -0
- package/src/agent/stores/agentThreads.ts +1 -4
- package/src/bus/rules/bus.ts +1 -2
- package/src/bus/rules/defineRegistry.ts +3 -5
- package/src/bus/rules/types.ts +6 -7
- package/src/chrome/stores/uiStore.ts +4 -2
- package/src/embed/rules/fieldDependencies.ts +2 -0
- package/src/embed/rules/safetyRules.ts +2 -0
- package/src/embed/rules/tableCode.ts +4 -3
- package/src/index.ts +6 -27
- package/src/itinerary/rules/import.ts +6 -8
- package/src/plugins/contracts/plugin.ts +4 -2
- package/src/seams/rules/formatters.ts +5 -3
- package/src/testing/index.ts +1 -5
- package/src/viewer/rules/platformViewer.ts +1 -0
- package/dist/bus-BwiNiXdH.d.ts +0 -514
- package/dist/bus-DzmhPwdK.d.cts +0 -514
- package/dist/chainModel-B23pEP_1.d.cts +0 -127
- package/dist/chainModel-B23pEP_1.d.ts +0 -127
- package/dist/chunk-2HFY7ETU.js +0 -5721
- package/dist/chunk-2HFY7ETU.js.map +0 -1
- package/dist/chunk-355TOXSB.js +0 -72
- package/dist/chunk-355TOXSB.js.map +0 -1
- package/dist/chunk-4ZCUZVSV.js +0 -10275
- package/dist/chunk-4ZCUZVSV.js.map +0 -1
- package/dist/chunk-6HEKY3NF.js +0 -95
- package/dist/chunk-6HEKY3NF.js.map +0 -1
- package/dist/chunk-7GFLGGBX.cjs +0 -8
- package/dist/chunk-7GFLGGBX.cjs.map +0 -1
- package/dist/chunk-7NBRCENN.cjs +0 -19
- package/dist/chunk-7NBRCENN.cjs.map +0 -1
- package/dist/chunk-AF5GCXE3.js +0 -8
- package/dist/chunk-AF5GCXE3.js.map +0 -1
- package/dist/chunk-CJDIFRGZ.cjs +0 -2005
- package/dist/chunk-CJDIFRGZ.cjs.map +0 -1
- package/dist/chunk-CNPZY7N3.js +0 -349
- package/dist/chunk-CNPZY7N3.js.map +0 -1
- package/dist/chunk-DZJHTWSF.cjs +0 -45
- package/dist/chunk-DZJHTWSF.cjs.map +0 -1
- package/dist/chunk-EABIHHWA.js +0 -42
- package/dist/chunk-EABIHHWA.js.map +0 -1
- package/dist/chunk-EKZWV6RS.cjs +0 -415
- package/dist/chunk-EKZWV6RS.cjs.map +0 -1
- package/dist/chunk-EOKRXXAC.cjs +0 -24
- package/dist/chunk-EOKRXXAC.cjs.map +0 -1
- package/dist/chunk-F73W2ZTJ.js +0 -1126
- package/dist/chunk-F73W2ZTJ.js.map +0 -1
- package/dist/chunk-H4DVOZ5O.js +0 -1897
- package/dist/chunk-H4DVOZ5O.js.map +0 -1
- package/dist/chunk-HI52PBFT.cjs +0 -10314
- package/dist/chunk-HI52PBFT.cjs.map +0 -1
- package/dist/chunk-IDBXFBLG.cjs +0 -1225
- package/dist/chunk-IDBXFBLG.cjs.map +0 -1
- package/dist/chunk-LBWTJZUJ.js +0 -297
- package/dist/chunk-LBWTJZUJ.js.map +0 -1
- package/dist/chunk-NCLA6DKD.cjs +0 -310
- package/dist/chunk-NCLA6DKD.cjs.map +0 -1
- package/dist/chunk-O4MC5DPD.js +0 -19
- package/dist/chunk-O4MC5DPD.js.map +0 -1
- package/dist/chunk-OP37FKW6.cjs +0 -98
- package/dist/chunk-OP37FKW6.cjs.map +0 -1
- package/dist/chunk-OQSYFH3Z.cjs +0 -5945
- package/dist/chunk-OQSYFH3Z.cjs.map +0 -1
- package/dist/chunk-PACIO4NS.cjs +0 -26
- package/dist/chunk-PACIO4NS.cjs.map +0 -1
- package/dist/chunk-PSZ2R3TC.cjs +0 -75
- package/dist/chunk-PSZ2R3TC.cjs.map +0 -1
- package/dist/chunk-QFO5CZG2.cjs +0 -136
- package/dist/chunk-QFO5CZG2.cjs.map +0 -1
- package/dist/chunk-QL63MUEW.cjs +0 -140
- package/dist/chunk-QL63MUEW.cjs.map +0 -1
- package/dist/chunk-RFUPPVZO.js +0 -17
- package/dist/chunk-RFUPPVZO.js.map +0 -1
- package/dist/chunk-RPG2LWMP.js +0 -23
- package/dist/chunk-RPG2LWMP.js.map +0 -1
- package/dist/chunk-TIBXK6B7.cjs +0 -12
- package/dist/chunk-TIBXK6B7.cjs.map +0 -1
- package/dist/chunk-UU65VNEV.js +0 -381
- package/dist/chunk-UU65VNEV.js.map +0 -1
- package/dist/chunk-VGX6TR2I.js +0 -209
- package/dist/chunk-VGX6TR2I.js.map +0 -1
- package/dist/chunk-WUTDDBVP.js +0 -130
- package/dist/chunk-WUTDDBVP.js.map +0 -1
- package/dist/chunk-WVQQLKCI.cjs +0 -224
- package/dist/chunk-WVQQLKCI.cjs.map +0 -1
- package/dist/chunk-WZYXG3SE.js +0 -111
- package/dist/chunk-WZYXG3SE.js.map +0 -1
- package/dist/chunk-XDI2X3KE.js +0 -6
- package/dist/chunk-XDI2X3KE.js.map +0 -1
- package/dist/chunk-XKHLRIC7.cjs +0 -381
- package/dist/chunk-XKHLRIC7.cjs.map +0 -1
- package/dist/context-DNtd2WUv.d.cts +0 -11666
- package/dist/context-DgB72Bur.d.ts +0 -11666
- package/dist/en-Bu4Ti9Ev.d.cts +0 -2315
- package/dist/en-Bu4Ti9Ev.d.ts +0 -2315
- package/dist/shareLink-B6hlt942.d.ts +0 -144
- package/dist/shareLink-C7rIMb7x.d.ts +0 -527
- package/dist/shareLink-CnTxxXjp.d.cts +0 -144
- package/dist/shareLink-DyZVYH2V.d.cts +0 -527
- package/dist/studioPlugin-C3C7VjMy.d.ts +0 -847
- package/dist/studioPlugin-Cf3OBNUv.d.cts +0 -847
- package/dist/types-BzJRV6UI.d.cts +0 -845
- package/dist/types-BzJRV6UI.d.ts +0 -845
- package/dist/zoneForm-CdYNtnnA.d.cts +0 -320
- package/dist/zoneForm-mG85yt5e.d.ts +0 -320
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,22 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
export { S as SEARCH_TAB_ID } from '../tabs-B2nRO4p_.js';
|
|
11
|
-
import 'zod';
|
|
12
|
-
import '@mountaya/client';
|
|
13
|
-
import '@mountaya/elements/camera';
|
|
14
|
-
import '@mountaya/elements/map-client';
|
|
15
|
-
import '@mountaya/elements/seams';
|
|
16
|
-
import 'geojson';
|
|
17
|
-
import '@mountaya/elements/data';
|
|
18
|
-
import '@mountaya/elements/errors';
|
|
19
|
-
|
|
1
|
+
import { U as UiState, a as StudioToolContext, io as StudioToolInputs } from "../chunk-BP4uy7E1.js";
|
|
2
|
+
import { t as ToolBus } from "../chunk-CQCJnT2i.js";
|
|
3
|
+
import { Bt as TabSurface } from "../chunk-DbK5PhpJ.js";
|
|
4
|
+
import { a as StudioIds } from "../chunk-DkwDzwvu.js";
|
|
5
|
+
import { t as StudioStrings } from "../chunk-IaIDQflj.js";
|
|
6
|
+
import { t as SEARCH_TAB_ID } from "../chunk-DThaaNeb.js";
|
|
7
|
+
import { i as VideoDirectorStoreApi, n as VideoDirectorState } from "../chunk-DUQzjUJy.js";
|
|
8
|
+
import { AgentEngineState, AgentErrorCopy, ConversationState, PendingConfirmation, QuestionOption, SuggestionCardCandidate, ToolActivityOutcome, ToolDispatcher, TranscriptEntry } from "@mountaya/elements/agent";
|
|
9
|
+
import { AgentTransport } from "@mountaya/client/events";
|
|
20
10
|
/**
|
|
21
11
|
* RouterState is the slice of the studio snapshot the router reads. It is
|
|
22
12
|
* deliberately narrow and structural rather than the whole snapshot: the router
|
|
@@ -29,22 +19,22 @@ import '@mountaya/elements/errors';
|
|
|
29
19
|
* pays to assemble and never consults.
|
|
30
20
|
*/
|
|
31
21
|
interface RouterState {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
22
|
+
/** The kind of edit session currently armed, if any. */
|
|
23
|
+
editSession?: "segment" | "waypoint" | "zone" | null | undefined;
|
|
24
|
+
/** Whether an import draft is open. */
|
|
25
|
+
importDraft?: boolean | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* The kind of resource the editor currently holds open, if any. It is distinct
|
|
28
|
+
* from `editSession`, which reports only an ARMED geometry engine: a computed
|
|
29
|
+
* zone is open without arming one (reshaping it by hand would replace the query
|
|
30
|
+
* it is generated from), so a run about the zone the user is looking at has no
|
|
31
|
+
* armed session to be recognised by.
|
|
32
|
+
*/
|
|
33
|
+
openResource?: "itinerary" | "zone" | null | undefined;
|
|
34
|
+
/** Whether a route-suggestion draft is open. */
|
|
35
|
+
suggestDraft?: boolean | undefined;
|
|
36
|
+
/** Whether the video wizard is open. */
|
|
37
|
+
videoOpen?: boolean | undefined;
|
|
48
38
|
}
|
|
49
39
|
/**
|
|
50
40
|
* RouterDecision is the routed surface set plus why it was chosen. The reason is
|
|
@@ -53,19 +43,18 @@ interface RouterState {
|
|
|
53
43
|
* the surfaces a run actually used.
|
|
54
44
|
*/
|
|
55
45
|
interface RouterDecision {
|
|
56
|
-
|
|
57
|
-
|
|
46
|
+
reason: "lock" | "skill" | "intent" | "sticky" | "wide";
|
|
47
|
+
surfaces: readonly string[];
|
|
58
48
|
}
|
|
59
|
-
|
|
60
49
|
/**
|
|
61
50
|
* recoveryFor returns what to do about a specific failure of a specific tool, or undefined when
|
|
62
51
|
* the playbook has nothing for that pair.
|
|
63
52
|
*/
|
|
64
|
-
declare const recoveryFor: (tool: string, code: string | undefined) => string | undefined;
|
|
53
|
+
export declare const recoveryFor: (tool: string, code: string | undefined) => string | undefined;
|
|
65
54
|
/** selectSurfaces chooses the surfaces a turn's manifest is built from. */
|
|
66
|
-
declare const selectSurfaces: (message: string, state?: RouterState, previous?: readonly string[]) => RouterDecision;
|
|
55
|
+
export declare const selectSurfaces: (message: string, state?: RouterState, previous?: readonly string[]) => RouterDecision;
|
|
67
56
|
/** surfaceTools resolves a surface set to the tool names it permits. */
|
|
68
|
-
declare const surfaceTools: (surfaces: readonly string[]) => ReadonlySet<string>;
|
|
57
|
+
export declare const surfaceTools: (surfaces: readonly string[]) => ReadonlySet<string>;
|
|
69
58
|
/**
|
|
70
59
|
* RecoveryAddendum is a host's own remedy for a failed call, which the model reads after the
|
|
71
60
|
* playbook's recovery for that call.
|
|
@@ -91,7 +80,6 @@ declare const surfaceTools: (surfaces: readonly string[]) => ReadonlySet<string>
|
|
|
91
80
|
* ```
|
|
92
81
|
*/
|
|
93
82
|
type RecoveryAddendum = (tool: string, code: string) => string | undefined;
|
|
94
|
-
|
|
95
83
|
/**
|
|
96
84
|
* The co-pilot's slice of the URL: which conversations are open, and which run each one waits
|
|
97
85
|
* on.
|
|
@@ -106,8 +94,8 @@ type RecoveryAddendum = (tool: string, code: string) => string | undefined;
|
|
|
106
94
|
* run it is waiting on.
|
|
107
95
|
*/
|
|
108
96
|
interface AgentThreadMirror {
|
|
109
|
-
|
|
110
|
-
|
|
97
|
+
id: string;
|
|
98
|
+
runId: string | null;
|
|
111
99
|
}
|
|
112
100
|
/**
|
|
113
101
|
* AgentThreadsUrlSeam is how a host lets the co-pilot survive a reload.
|
|
@@ -132,16 +120,15 @@ interface AgentThreadMirror {
|
|
|
132
120
|
* a fresh conversation, which is exactly right for an embed or a render-free test.
|
|
133
121
|
*/
|
|
134
122
|
interface AgentThreadsUrlSeam {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
123
|
+
readOnce: () => {
|
|
124
|
+
activeThreadId?: string | undefined;
|
|
125
|
+
threads?: readonly AgentThreadMirror[] | undefined;
|
|
126
|
+
};
|
|
127
|
+
write: (next: {
|
|
128
|
+
activeThreadId: string | null;
|
|
129
|
+
threads: readonly AgentThreadMirror[];
|
|
130
|
+
}) => void;
|
|
143
131
|
}
|
|
144
|
-
|
|
145
132
|
/**
|
|
146
133
|
* WITHHELD_TAB_ID is the reserved id of the co-pilot tab a viewer without the `copilot`
|
|
147
134
|
* entitlement lands on. It is never a conversation's id (those come from the ids seam) and never
|
|
@@ -155,7 +142,7 @@ interface AgentThreadsUrlSeam {
|
|
|
155
142
|
* front of a licensee's users. It is a URL value too (a reload restores the tab it names), which
|
|
156
143
|
* is why it is published rather than private.
|
|
157
144
|
*/
|
|
158
|
-
declare const WITHHELD_TAB_ID = "withheld";
|
|
145
|
+
export declare const WITHHELD_TAB_ID = "withheld";
|
|
159
146
|
/**
|
|
160
147
|
* ThreadState is one chat's reactive state: its run id (null until a run opens),
|
|
161
148
|
* the run lifecycle the panel renders against, the role-structured transcript
|
|
@@ -166,7 +153,7 @@ declare const WITHHELD_TAB_ID = "withheld";
|
|
|
166
153
|
* map/itinerary.
|
|
167
154
|
*/
|
|
168
155
|
interface ThreadState extends ConversationState<TranscriptEntry> {
|
|
169
|
-
|
|
156
|
+
pendingConfirmation: PendingConfirmation | null;
|
|
170
157
|
}
|
|
171
158
|
/**
|
|
172
159
|
* AgentThreadsState is the studio's whole set of chats: the ordered thread ids
|
|
@@ -184,10 +171,10 @@ interface ThreadState extends ConversationState<TranscriptEntry> {
|
|
|
184
171
|
* re-points activeTabId to activeId.
|
|
185
172
|
*/
|
|
186
173
|
interface AgentThreadsState {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
174
|
+
activeId: string | null;
|
|
175
|
+
activeTabId: string | null;
|
|
176
|
+
order: string[];
|
|
177
|
+
threads: Record<string, ThreadState>;
|
|
191
178
|
}
|
|
192
179
|
/**
|
|
193
180
|
* AgentThreadsActions mutate the chat set. The engine (the only writer)
|
|
@@ -215,38 +202,38 @@ interface AgentThreadsState {
|
|
|
215
202
|
* card too, since the run may be about to regenerate.
|
|
216
203
|
*/
|
|
217
204
|
interface AgentThreadsActions {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
205
|
+
addCopilotTab: (threadId: string) => void;
|
|
206
|
+
answerQuestion: (threadId: string, entryId: string, label: string) => void;
|
|
207
|
+
appendAssistantDelta: (threadId: string, delta: string) => void;
|
|
208
|
+
appendChecksUnmet: (threadId: string, unmet: readonly string[]) => void;
|
|
209
|
+
appendError: (threadId: string, message: string) => void;
|
|
210
|
+
appendQuestion: (threadId: string, question: {
|
|
211
|
+
options: readonly QuestionOption[];
|
|
212
|
+
question: string;
|
|
213
|
+
toolCallId: string;
|
|
214
|
+
}) => void;
|
|
215
|
+
appendSuggestions: (threadId: string, suggestions: {
|
|
216
|
+
candidates: readonly SuggestionCardCandidate[];
|
|
217
|
+
entryId: string;
|
|
218
|
+
}) => void;
|
|
219
|
+
appendToolActivity: (threadId: string, activity: {
|
|
220
|
+
input: string | null;
|
|
221
|
+
name: string;
|
|
222
|
+
toolCallId: string;
|
|
223
|
+
}) => void;
|
|
224
|
+
appendUserMessage: (threadId: string, content: string) => void;
|
|
225
|
+
chooseSuggestion: (threadId: string, entryId: string, seed: number) => void;
|
|
226
|
+
clearPendingConfirmation: (threadId: string) => void;
|
|
227
|
+
closeCopilotTab: (threadId: string) => void;
|
|
228
|
+
closeThread: (threadId: string) => void;
|
|
229
|
+
createThread: (threadId: string, runId?: string | null) => void;
|
|
230
|
+
setActive: (threadId: string) => void;
|
|
231
|
+
setActiveTab: (tabId: string) => void;
|
|
232
|
+
setAssistantMessage: (threadId: string, content: string, messageIndex?: number) => void;
|
|
233
|
+
setPendingConfirmation: (threadId: string, confirmation: PendingConfirmation) => void;
|
|
234
|
+
setRunId: (threadId: string, runId: string | null) => void;
|
|
235
|
+
setSessionState: (threadId: string, state: AgentEngineState) => void;
|
|
236
|
+
settleToolActivity: (threadId: string, toolCallId: string, outcome: ToolActivityOutcome) => void;
|
|
250
237
|
}
|
|
251
238
|
/** AgentThreadsStore is the store's whole value: the {@link AgentThreadsState} and its actions. */
|
|
252
239
|
type AgentThreadsStore = AgentThreadsActions & AgentThreadsState;
|
|
@@ -266,7 +253,7 @@ type AgentThreadsStoreApi = ReturnType<typeof createAgentThreadsStore>;
|
|
|
266
253
|
* this closure holds, each a few lines that name a transcript rule, so a split
|
|
267
254
|
* by concern would pass `set` between modules and move no decision out.
|
|
268
255
|
*/
|
|
269
|
-
declare const createAgentThreadsStore: () =>
|
|
256
|
+
export declare const createAgentThreadsStore: () => import("zustand/vanilla").StoreApi<AgentThreadsStore>;
|
|
270
257
|
/**
|
|
271
258
|
* selectAgentDriving is true while any conversation reads `running`: from the
|
|
272
259
|
* moment its message is sent, which is before a first message's run exists,
|
|
@@ -277,8 +264,7 @@ declare const createAgentThreadsStore: () => zustand_vanilla.StoreApi<AgentThrea
|
|
|
277
264
|
* layer keyed off this run state. Reads the order array once and
|
|
278
265
|
* short-circuits on the first running thread.
|
|
279
266
|
*/
|
|
280
|
-
declare const selectAgentDriving: (state: AgentThreadsState) => boolean;
|
|
281
|
-
|
|
267
|
+
export declare const selectAgentDriving: (state: AgentThreadsState) => boolean;
|
|
282
268
|
/**
|
|
283
269
|
* AgentThreadsTabsSeam is where an {@link AgentThreadsEngine} publishes its tab strip, so a
|
|
284
270
|
* studio verb dispatched from outside the co-pilot (`studio.tabs.create` from an editor's
|
|
@@ -290,10 +276,10 @@ declare const selectAgentDriving: (state: AgentThreadsState) => boolean;
|
|
|
290
276
|
* `tabs` through a late-bound getter answers both members with the slot that getter reads.
|
|
291
277
|
*/
|
|
292
278
|
interface AgentThreadsTabsSeam {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
279
|
+
/** Publishes the engine's tab surface. */
|
|
280
|
+
readonly register: (surface: TabSurface) => void;
|
|
281
|
+
/** Withdraws it, after which a tab verb answers a structured failure. */
|
|
282
|
+
readonly unregister: () => void;
|
|
297
283
|
}
|
|
298
284
|
/**
|
|
299
285
|
* AgentThreadsConfig is what the co-pilot's conversations run against, all of it replaceable
|
|
@@ -304,103 +290,103 @@ interface AgentThreadsTabsSeam {
|
|
|
304
290
|
* after a locale change reads the new words.
|
|
305
291
|
*/
|
|
306
292
|
interface AgentThreadsConfig {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
293
|
+
/**
|
|
294
|
+
* The studio's bus, whole. A run reads the manifest it advertises for the context's
|
|
295
|
+
* capabilities and dispatches with the model as its origin, and the engine dispatches the tab,
|
|
296
|
+
* framing and suggestion verbs through it.
|
|
297
|
+
*/
|
|
298
|
+
readonly bus: ToolBus<StudioToolContext, StudioToolInputs>;
|
|
299
|
+
/**
|
|
300
|
+
* The studio's tool context, which every conversation drives. A run's dispatches layer the
|
|
301
|
+
* in-chat confirmation and the agent origin over it with `layerToolContext`, so its late-bound
|
|
302
|
+
* getters (the map, the tabs, the collaboration session) stay live.
|
|
303
|
+
*/
|
|
304
|
+
readonly context: StudioToolContext;
|
|
305
|
+
/**
|
|
306
|
+
* The localized copy a terminal run error resolves onto, the same object the video director
|
|
307
|
+
* reads, so the two surfaces phrase a budget ceiling or a rate limit identically.
|
|
308
|
+
*/
|
|
309
|
+
readonly errorCopy: AgentErrorCopy;
|
|
310
|
+
/**
|
|
311
|
+
* Marks an organization's AI configuration stale after a start the gateway refused for want
|
|
312
|
+
* of one. Omitted, the refusal still surfaces its words and the configuration is re-read on
|
|
313
|
+
* the next natural fetch, the defined answer for a host with no cache of its own.
|
|
314
|
+
*/
|
|
315
|
+
readonly invalidateAiConfig?: ((organizationId: string) => void) | undefined;
|
|
316
|
+
/**
|
|
317
|
+
* Marks the viewer's memberships stale after the gateway refused or ended a run for want of
|
|
318
|
+
* access: a start or its stream answered 402, 403 or 404, a follow-up found its run gone, or a
|
|
319
|
+
* run ended `access-revoked` because its member may not run it there any more (no write role in
|
|
320
|
+
* its organization, or an agreement that does not include Map Studio). The co-pilot's gate reads
|
|
321
|
+
* the memberships, so the notice that follows the refresh says why the co-pilot is withheld.
|
|
322
|
+
* Omitted, the refusal still surfaces its words and the memberships are re-read on the next
|
|
323
|
+
* natural fetch.
|
|
324
|
+
*/
|
|
325
|
+
readonly invalidateMemberships?: (() => void) | undefined;
|
|
326
|
+
/**
|
|
327
|
+
* Tells the host the API refused the credential a run rides on: its start, its stream (a
|
|
328
|
+
* restored run's included) or a message into it answered 401. Under the browser's own session
|
|
329
|
+
* that is a sign-in the API no longer accepts, after a sign-out or a revoked session, so the
|
|
330
|
+
* host asks whether the person is still signed in and, when nobody is, sends them to sign in.
|
|
331
|
+
* Called once per refusal, once the fault is written. A 401 says nothing of the viewer's
|
|
332
|
+
* access, so the memberships are not read again for it.
|
|
333
|
+
*
|
|
334
|
+
* Pass it where the runs ride the browser's own session. Under a publishable key a 401 refuses
|
|
335
|
+
* the key or the session token beside it, which is no sign-in a host can ask about. Omitted, a
|
|
336
|
+
* refusal still surfaces its words.
|
|
337
|
+
*/
|
|
338
|
+
readonly onSignInRefused?: (() => void) | undefined;
|
|
339
|
+
/**
|
|
340
|
+
* The host's own remedy for a failed call, appended to the playbook's recovery the model reads
|
|
341
|
+
* with it. Omitted, the model reads the playbook's recovery alone.
|
|
342
|
+
*/
|
|
343
|
+
readonly recoveryAddendum?: RecoveryAddendum | undefined;
|
|
344
|
+
/**
|
|
345
|
+
* Whether a run names the server tools its model sees, from the tools the conversation's
|
|
346
|
+
* surfaces route to: a run's start and each routing update then carry the routed set.
|
|
347
|
+
*
|
|
348
|
+
* Off by default, and to stay off under a publishable key, the credential a studio embedded in
|
|
349
|
+
* a product runs under: a run under a key calls no server tool, and the API refuses a start or
|
|
350
|
+
* an update that names any. Off, a run names none and keeps every server tool its credential
|
|
351
|
+
* reaches. A host on the browser's own session turns it on to narrow them.
|
|
352
|
+
*
|
|
353
|
+
* @default false
|
|
354
|
+
*/
|
|
355
|
+
readonly routesServerTools?: boolean | undefined;
|
|
356
|
+
/** The words the conversations write: fault lines, confirmation cards, the staging error. */
|
|
357
|
+
readonly strings: Pick<StudioStrings, "confirm" | "copilot" | "editing" | "editor" | "prompt" | "share">;
|
|
358
|
+
/**
|
|
359
|
+
* How the open conversations survive a reload. Its `readOnce` is read by the constructor
|
|
360
|
+
* alone, from the options; replacing the seam later changes where `write` mirrors to.
|
|
361
|
+
* Omitted, nothing is restored and nothing is mirrored.
|
|
362
|
+
*/
|
|
363
|
+
readonly threadsUrl?: AgentThreadsUrlSeam | undefined;
|
|
364
|
+
/** The event transport every run is started, sent into and read over. */
|
|
365
|
+
readonly transport: AgentTransport;
|
|
380
366
|
}
|
|
381
367
|
/**
|
|
382
368
|
* AgentThreadsEngineOptions is the {@link AgentThreadsConfig} an engine starts with, plus the
|
|
383
369
|
* settings fixed for its life.
|
|
384
370
|
*/
|
|
385
371
|
interface AgentThreadsEngineOptions extends AgentThreadsConfig {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
372
|
+
/**
|
|
373
|
+
* Where a new conversation's id comes from. Pass the host's `ids` seam, or
|
|
374
|
+
* `sequentialStudioIds()` where the ids must be a function of the input.
|
|
375
|
+
*/
|
|
376
|
+
readonly ids: StudioIds;
|
|
377
|
+
/**
|
|
378
|
+
* The store the conversations are written into, for a host that reads it with narrow
|
|
379
|
+
* selectors of its own. It is seeded by the constructor, so it starts empty.
|
|
380
|
+
*
|
|
381
|
+
* @default a new `createAgentThreadsStore()`
|
|
382
|
+
*/
|
|
383
|
+
readonly store?: AgentThreadsStoreApi | undefined;
|
|
384
|
+
/**
|
|
385
|
+
* Where the tab strip is published while the engine runs. Omitted, a tab verb dispatched
|
|
386
|
+
* from outside the co-pilot answers a structured failure, and the engine's own tab commands
|
|
387
|
+
* still work.
|
|
388
|
+
*/
|
|
389
|
+
readonly tabs?: AgentThreadsTabsSeam | undefined;
|
|
404
390
|
}
|
|
405
391
|
/**
|
|
406
392
|
* AgentThreadsEngine runs the studio co-pilot's concurrent conversations: one `AgentEngine`
|
|
@@ -503,463 +489,462 @@ interface AgentThreadsEngineOptions extends AgentThreadsConfig {
|
|
|
503
489
|
* release();
|
|
504
490
|
* ```
|
|
505
491
|
*/
|
|
506
|
-
declare class AgentThreadsEngine {
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
492
|
+
export declare class AgentThreadsEngine {
|
|
493
|
+
private config;
|
|
494
|
+
private readonly ids;
|
|
495
|
+
private readonly store;
|
|
496
|
+
private readonly tabs;
|
|
497
|
+
private readonly subscriptions;
|
|
498
|
+
/** The store subscription the listeners are notified through, while the engine runs. */
|
|
499
|
+
private releaseStore;
|
|
500
|
+
/** The UI store the driving flag is mirrored into, while the engine runs. */
|
|
501
|
+
private mirrored;
|
|
502
|
+
/**
|
|
503
|
+
* What the URL named at construction, kept while the viewer the seed read is withheld the
|
|
504
|
+
* co-pilot and restored for that viewer once entitled. Null for a seed that read an entitled
|
|
505
|
+
* viewer, and once restored.
|
|
506
|
+
*/
|
|
507
|
+
private unrestored;
|
|
508
|
+
/** The viewer seam the engine hears a change of the entitlement from, while it runs. */
|
|
509
|
+
private heard;
|
|
510
|
+
/** One host per thread: its session and its started guard. */
|
|
511
|
+
private readonly hosts;
|
|
512
|
+
/** The resolver of each thread's parked confirmation. */
|
|
513
|
+
private readonly confirmations;
|
|
514
|
+
/** The surfaces each thread's run is routed to; a thread with none offers every tool. */
|
|
515
|
+
private readonly surfaces;
|
|
516
|
+
/** The last message each thread routed on, replayed by a re-route from state. */
|
|
517
|
+
private readonly lastRouted;
|
|
518
|
+
/** The generate call that owns the workspace's one suggest session, and its thread. */
|
|
519
|
+
private suggestBatchOwner;
|
|
520
|
+
/** The suggestions cards whose pick is still applying, by entry id. */
|
|
521
|
+
private readonly stagingPicks;
|
|
522
|
+
/**
|
|
523
|
+
* The threads whose last message is out and whose turn the session has not picked up. While
|
|
524
|
+
* a thread is here, its session's `awaiting_input` is the run being readied and never the
|
|
525
|
+
* turn settling.
|
|
526
|
+
*/
|
|
527
|
+
private readonly awaitingTurn;
|
|
528
|
+
/**
|
|
529
|
+
* The state each thread's session last reported, and no entry for one that has reported none,
|
|
530
|
+
* which reads `awaiting_input`. It says whether a message is sent into a turn under way, which
|
|
531
|
+
* the session answers with no report of `running`.
|
|
532
|
+
*/
|
|
533
|
+
private readonly sessionStates;
|
|
534
|
+
/** Whether nobody is watching. A parked engine opens nothing and answers no command. */
|
|
535
|
+
private parked;
|
|
536
|
+
private disposed;
|
|
537
|
+
/**
|
|
538
|
+
* The tab strip the studio's tab verbs mutate through. Every member but the two reads,
|
|
539
|
+
* `countOpen` and `hasTab`, does nothing while the engine is parked, and an opening member
|
|
540
|
+
* then answers the tab already shown.
|
|
541
|
+
*/
|
|
542
|
+
private readonly tabSurface;
|
|
543
|
+
/**
|
|
544
|
+
* Constructing one seeds the store and does nothing else: it reads the URL seam once and the
|
|
545
|
+
* viewer's entitlement as it stands, builds no host, opens no run and writes no URL. A React
|
|
546
|
+
* binding constructs during a render React is free to throw away, and a constructor with a side
|
|
547
|
+
* effect outside its own store would leave the discarded copy acting.
|
|
548
|
+
*/
|
|
549
|
+
constructor(options: AgentThreadsEngineOptions);
|
|
550
|
+
/** getSnapshot returns the conversations' state, by reference and stable between changes. */
|
|
551
|
+
getSnapshot(): AgentThreadsState;
|
|
552
|
+
/**
|
|
553
|
+
* subscribe registers a listener for every change of the snapshot, and returns its own
|
|
554
|
+
* unsubscribe, which is idempotent.
|
|
555
|
+
*
|
|
556
|
+
* The first listener resumes the engine and the last one leaving parks it, which is the whole
|
|
557
|
+
* lifecycle a component can express correctly: React tears an effect down and sets it up
|
|
558
|
+
* again with the same object under StrictMode, so a latch here would leave a live surface
|
|
559
|
+
* bound to a dead engine. Each call is its own subscription, so two owners subscribing one
|
|
560
|
+
* shared function each hold the engine until they release it.
|
|
561
|
+
*/
|
|
562
|
+
subscribe(listener: () => void): () => void;
|
|
563
|
+
/**
|
|
564
|
+
* configure replaces the configuration. Nothing is asked and no session is rebuilt: every
|
|
565
|
+
* member is read when it is used, so a binding may call this on every render and an unchanged
|
|
566
|
+
* configuration costs an assignment. Two things move with the context: the driving flag's
|
|
567
|
+
* mirror, when it carries a different UI store (the store it leaves is reset, and the new one is
|
|
568
|
+
* brought in line with the conversations), and the subscription to the viewer, when it carries
|
|
569
|
+
* a different viewer.
|
|
570
|
+
*/
|
|
571
|
+
configure(config: AgentThreadsConfig): void;
|
|
572
|
+
/**
|
|
573
|
+
* dispose parks the engine and drops every listener, for good.
|
|
574
|
+
*
|
|
575
|
+
* Idempotent, and every call after it is a no-op rather than an error, a subscription
|
|
576
|
+
* included: an owner torn down mid-run should not have to guard the calls it already queued.
|
|
577
|
+
*/
|
|
578
|
+
dispose(): void;
|
|
579
|
+
/**
|
|
580
|
+
* answerQuestion settles the active conversation's question card with the picked option, then
|
|
581
|
+
* sends its label as the next message. Settling first is what makes the send's sweep of open
|
|
582
|
+
* cards leave the pick marked.
|
|
583
|
+
*
|
|
584
|
+
* It does nothing unless `entryId` names a question card of the conversation that is still
|
|
585
|
+
* open: a second answer to one card, and an answer to a card a typed reply already settled,
|
|
586
|
+
* send no message, since the run is waiting on neither.
|
|
587
|
+
*/
|
|
588
|
+
answerQuestion(entryId: string, label: string): void;
|
|
589
|
+
/**
|
|
590
|
+
* chooseSuggestion applies one suggested route from a suggestions card, settles the card, and
|
|
591
|
+
* sends the pick's label as the next message.
|
|
592
|
+
*
|
|
593
|
+
* The pick is applied client-side through `studio.itinerary.suggest.applyCandidate`, which
|
|
594
|
+
* reshapes the segment the batch was generated for or appends the route as a new one, so the
|
|
595
|
+
* route is on the map before the model reads the reply. It applies to the open itinerary and
|
|
596
|
+
* never creates one. A second pick on a card whose apply is still out does nothing, since two
|
|
597
|
+
* appends would put the route in the itinerary twice. A failed apply leaves the card open and
|
|
598
|
+
* writes the staging error, so the user can pick again; an apply a host's bus rejects, or
|
|
599
|
+
* answers with no result, is a failed one. A pick whose confirmation was withheld (the user
|
|
600
|
+
* kept a staged draft the apply would drop, or left the prompt to expire) leaves the card open
|
|
601
|
+
* and writes nothing. A pick whose apply lands after the engine parked, or after its
|
|
602
|
+
* conversation closed, writes nothing and opens no run.
|
|
603
|
+
*/
|
|
604
|
+
chooseSuggestion(entryId: string, seed: number, label: string): void;
|
|
605
|
+
/** closeAiTab closes one conversation through `studio.tabs.close`. */
|
|
606
|
+
closeAiTab(tabId: string): void;
|
|
607
|
+
/** newAiTab opens a conversation through `studio.tabs.create`. */
|
|
608
|
+
newAiTab(): void;
|
|
609
|
+
/**
|
|
610
|
+
* previewCandidate paints one staged suggestion on the map through
|
|
611
|
+
* `studio.itinerary.suggest.select`, the call the suggestions panel's own rows make, so
|
|
612
|
+
* hovering a card option and hovering a panel row cannot diverge.
|
|
613
|
+
*/
|
|
614
|
+
previewCandidate(seed: number): void;
|
|
615
|
+
/**
|
|
616
|
+
* resolveConfirmation settles the active conversation's confirmation card with the user's
|
|
617
|
+
* decision and clears the card. With nothing pending (a stale click after a stop already
|
|
618
|
+
* settled it) it does nothing.
|
|
619
|
+
*/
|
|
620
|
+
resolveConfirmation(approved: boolean): void;
|
|
621
|
+
/**
|
|
622
|
+
* stopActive ends the active conversation's run: it denies a pending confirmation, asks the
|
|
623
|
+
* gateway to close the run (a run the session gave up reading included), swaps a fresh session
|
|
624
|
+
* in under the same thread so the next message opens a clean run, drops the run id and parks
|
|
625
|
+
* the thread on `awaiting_input`. The close is what stops the run spending model budget: a
|
|
626
|
+
* session torn down without it leaves the run going until the gateway's own timeout. The
|
|
627
|
+
* transcript stays, since a stop is the user's choice rather than a failure.
|
|
628
|
+
*/
|
|
629
|
+
stopActive(): void;
|
|
630
|
+
/**
|
|
631
|
+
* submit sends a message into the active conversation: the first one opens a run scoped to
|
|
632
|
+
* the organization of the resource the co-pilot is open on, with the studio snapshot as its
|
|
633
|
+
* context, and a later one is delivered into the open run.
|
|
634
|
+
*
|
|
635
|
+
* The conversation reads `running` from the submit, so the workspace locks and a surface
|
|
636
|
+
* offers its Stop before the run's context is captured and its start is made. It returns to
|
|
637
|
+
* `awaiting_input` when the turn settles, and at once when there is no organization to scope
|
|
638
|
+
* a run to or the gateway refuses the start.
|
|
639
|
+
*/
|
|
640
|
+
submit(message: string): void;
|
|
641
|
+
/** switchTab shows another tab, a conversation or a pseudo-tab, through `studio.tabs.switch`. */
|
|
642
|
+
switchTab(tabId: string): void;
|
|
643
|
+
/**
|
|
644
|
+
* live reports whether something watches the engine, which is when it acts. Every command asks
|
|
645
|
+
* it first, so a live engine restores the URL's conversations for a viewer entitled since the
|
|
646
|
+
* seed (see {@link restoreForEntitled}) ahead of the act: a host whose viewer tells no change
|
|
647
|
+
* still meets them there.
|
|
648
|
+
*/
|
|
649
|
+
private live;
|
|
650
|
+
/**
|
|
651
|
+
* isOpen reports whether an answer for a conversation still has somewhere to land: the engine
|
|
652
|
+
* is live and the conversation has not closed. An answer that arrives after either belongs to
|
|
653
|
+
* nobody.
|
|
654
|
+
*/
|
|
655
|
+
private isOpen;
|
|
656
|
+
/** activeThread is the conversation a command acts on, or null while the engine is not live. */
|
|
657
|
+
private activeThread;
|
|
658
|
+
/** shownTab is the tab the strip shows, what an opening tab verb answers while parked. */
|
|
659
|
+
private shownTab;
|
|
660
|
+
/**
|
|
661
|
+
* withheld reads whether the viewer is withheld the co-pilot, from the viewer seam as it
|
|
662
|
+
* answers now. A membership resolves after a host has mounted and an entitlement can lapse
|
|
663
|
+
* mid-session, so the answer is never held: each decision that turns on it asks again.
|
|
664
|
+
*/
|
|
665
|
+
private withheld;
|
|
666
|
+
/**
|
|
667
|
+
* seed writes the conversations a mount opens with, from the URL and the entitlement.
|
|
668
|
+
*
|
|
669
|
+
* A viewer withheld the co-pilot is restored none, whatever the URL names: their one way into
|
|
670
|
+
* the co-pilot is the withheld tab. What the URL named is kept for them, and
|
|
671
|
+
* {@link restoreForEntitled} restores it once they are entitled.
|
|
672
|
+
*/
|
|
673
|
+
private seed;
|
|
674
|
+
/**
|
|
675
|
+
* restore writes the conversations of an entitled viewer, from what the URL names, and answers
|
|
676
|
+
* the ids it created.
|
|
677
|
+
*
|
|
678
|
+
* The URL's list passes through {@link restorableThreads} first, and a conversation already
|
|
679
|
+
* open keeps its place. With none to restore, a viewer holding no conversation is opened a
|
|
680
|
+
* fresh one, and the panel lands on Search. Otherwise it lands on the tab the URL names when
|
|
681
|
+
* that tab is now open, and on Search when it is not: the withheld tab is never an entitled
|
|
682
|
+
* viewer's.
|
|
683
|
+
*/
|
|
684
|
+
private restore;
|
|
685
|
+
/**
|
|
686
|
+
* restoreForEntitled restores what the URL named at construction for a viewer the seed read as
|
|
687
|
+
* withheld and the viewer seam now answers as entitled. It runs once: a viewer who loses the
|
|
688
|
+
* entitlement afterwards and regains it is not restored a second time. A live engine connects
|
|
689
|
+
* each conversation it restores, so one carrying a run id reconnects to its run; a parked one
|
|
690
|
+
* leaves that to the next resume. The URL is written with what the restore holds: a withheld
|
|
691
|
+
* viewer's reveal may have mirrored the withheld tab over the conversations it named.
|
|
692
|
+
*/
|
|
693
|
+
private restoreForEntitled;
|
|
694
|
+
/**
|
|
695
|
+
* hearViewer subscribes to a viewer seam's changes, releasing the one heard before, so a
|
|
696
|
+
* viewer entitled while the engine runs is restored the URL's conversations as the seam tells.
|
|
697
|
+
*/
|
|
698
|
+
private hearViewer;
|
|
699
|
+
/**
|
|
700
|
+
* connect builds a thread's host and resumes its session, reconnecting to the run the thread
|
|
701
|
+
* carries. A resume that faults drops the stale run id, mirrors the drop and leaves the
|
|
702
|
+
* conversation usable, through the thread's faults, which also tell the host a reconnect
|
|
703
|
+
* refused 401.
|
|
704
|
+
*/
|
|
705
|
+
private connect;
|
|
706
|
+
/** resume starts the engine for its first subscriber. */
|
|
707
|
+
private resume;
|
|
708
|
+
/** park stops the engine when its last subscriber leaves. */
|
|
709
|
+
private park;
|
|
710
|
+
/**
|
|
711
|
+
* tellSeam calls one of the host's seams the engine writes to on its own paths: the URL
|
|
712
|
+
* mirror and the tab strip's slot. A seam that throws stops neither the resume, the park nor
|
|
713
|
+
* the command that reached it, and its fault is surfaced apart, as a listener's is.
|
|
714
|
+
*/
|
|
715
|
+
private tellSeam;
|
|
716
|
+
/**
|
|
717
|
+
* send hands a message to a thread's host, with the conversation on `running` from this
|
|
718
|
+
* moment: the workspace is the model's from the submit, across the capture of the run's
|
|
719
|
+
* context, its start and the opening of its stream.
|
|
720
|
+
*
|
|
721
|
+
* Written before the host is called, so a submit the host answers at once (no organization
|
|
722
|
+
* to scope a run to) returns the conversation to `awaiting_input` through its fault.
|
|
723
|
+
*/
|
|
724
|
+
private send;
|
|
725
|
+
/**
|
|
726
|
+
* settle returns a conversation to `awaiting_input`: its turn settled, its run faulted or was
|
|
727
|
+
* stopped. It ends the wait for a turn, so the next report of its session is read as it is.
|
|
728
|
+
*/
|
|
729
|
+
private settle;
|
|
730
|
+
/**
|
|
731
|
+
* reportSessionState writes the lifecycle state a thread's session reports, while the engine
|
|
732
|
+
* is live.
|
|
733
|
+
*
|
|
734
|
+
* A session reports `ended` as it is disposed, and the park disposes every one of them. The
|
|
735
|
+
* park ends no conversation, so what its teardown reports is not written: a conversation that
|
|
736
|
+
* never ran keeps reading `awaiting_input`, and a host reading the store sees no state the
|
|
737
|
+
* park passed through.
|
|
738
|
+
*
|
|
739
|
+
* While a thread waits on its turn, its session's `awaiting_input` is not written either: a
|
|
740
|
+
* session that read a run before reports it as it readies the next one, which would lower the
|
|
741
|
+
* lock between the submit and the turn. The wait ends when the session reports `running`,
|
|
742
|
+
* which it does from the message it takes, and its reports are the conversation's from
|
|
743
|
+
* there: the turn's settle is one of them, whether or not the turn carried a frame of its own.
|
|
744
|
+
*/
|
|
745
|
+
private reportSessionState;
|
|
746
|
+
/** writeSessionState writes a thread's state when it differs from the one it reads. */
|
|
747
|
+
private writeSessionState;
|
|
748
|
+
/** hasOpenQuestion reports whether `entryId` is a question card the thread has not settled. */
|
|
749
|
+
private hasOpenQuestion;
|
|
750
|
+
/**
|
|
751
|
+
* settleStreamingThreads returns every conversation that reads `running` to `awaiting_input`
|
|
752
|
+
* once the park has disposed its session.
|
|
753
|
+
*
|
|
754
|
+
* No session streams the turn any more, and the session the next resume builds starts on
|
|
755
|
+
* `awaiting_input` and reports a change only. A conversation left on `running` would raise
|
|
756
|
+
* the driving lock at that resume with nothing to lower it. Its run id stays, so the resume
|
|
757
|
+
* reconnects the run and the turn's frames report `running` again.
|
|
758
|
+
*/
|
|
759
|
+
private settleStreamingThreads;
|
|
760
|
+
/** mirrorInto starts mirroring the driving flag into `ui`, brought in line at once. */
|
|
761
|
+
private mirrorInto;
|
|
762
|
+
/**
|
|
763
|
+
* releaseMirror stops mirroring, leaving the UI store with no driving flag, no edit lock and
|
|
764
|
+
* no hand-off: a studio the co-pilot left is never stranded inert.
|
|
765
|
+
*/
|
|
766
|
+
private releaseMirror;
|
|
767
|
+
/**
|
|
768
|
+
* syncDriving writes the driving flag through to the UI store on a real flip only, so a token
|
|
769
|
+
* stream does not churn it.
|
|
770
|
+
*
|
|
771
|
+
* When the runs yield the workspace, the entities they locked are released, except the one a
|
|
772
|
+
* run left in an open edit session for the user to adjust and save: that draft outlives the
|
|
773
|
+
* run, and so does the co-pilot's authorship of it.
|
|
774
|
+
*/
|
|
775
|
+
private syncDriving;
|
|
776
|
+
/** syncUrl mirrors the thread ids, their run ids and the active tab through the URL seam. */
|
|
777
|
+
private syncUrl;
|
|
778
|
+
/**
|
|
779
|
+
* tabsContext is the tool context a tab verb is dispatched with: the studio's own, with this
|
|
780
|
+
* engine's tab strip layered over it and every other seam left live.
|
|
781
|
+
*/
|
|
782
|
+
private tabsContext;
|
|
783
|
+
/** ensureHost returns a thread's host, building it on first use. */
|
|
784
|
+
private ensureHost;
|
|
785
|
+
/**
|
|
786
|
+
* hostFor builds one thread's host. The run is scoped to the organization of the resource the
|
|
787
|
+
* co-pilot is open on, read through the rule the panel's gate reads, so a run opens for the
|
|
788
|
+
* organization whose card the panel shows and a personal resource opens none. A snapshot that
|
|
789
|
+
* fails to build opens the run without a context rather than blocking the message.
|
|
790
|
+
*/
|
|
791
|
+
private hostFor;
|
|
792
|
+
/**
|
|
793
|
+
* sessionFor builds one thread's session. Both confirmation gates, the server tool's and the
|
|
794
|
+
* client tool's the bus raises through `ctx.confirm`, park on that thread's in-chat card, and
|
|
795
|
+
* a client tool's card reads its localized body with the request's values, so a merge names
|
|
796
|
+
* the rows it is about to join.
|
|
797
|
+
*/
|
|
798
|
+
private sessionFor;
|
|
799
|
+
/**
|
|
800
|
+
* observerFor maps one thread's session onto its transcript, then layers the co-pilot's own
|
|
801
|
+
* side effects over it: the URL mirror of a new run id, the question card, the suggest
|
|
802
|
+
* session's owner, the edit lock and the hand-off, the suggestions card and the re-route.
|
|
803
|
+
*/
|
|
804
|
+
private observerFor;
|
|
805
|
+
/**
|
|
806
|
+
* appendQuestionCard renders a question call as its own card, parsed with the tool's own
|
|
807
|
+
* schema, and reports whether it did. A malformed input falls through to the ordinary
|
|
808
|
+
* activity row, whose dispatch then settles red, which is the honest rendering of that call.
|
|
809
|
+
*/
|
|
810
|
+
private appendQuestionCard;
|
|
811
|
+
/** isGenerate reports whether a thread recorded `toolCallId` as a generate's activity row. */
|
|
812
|
+
private isGenerate;
|
|
813
|
+
/**
|
|
814
|
+
* appendSuggestionsCard renders the live suggest session's candidates as the thread's
|
|
815
|
+
* suggestions card, keyed off the generating call so a replayed settle appends no duplicate,
|
|
816
|
+
* and frames the batch once while the thread is the tab on screen.
|
|
817
|
+
*
|
|
818
|
+
* It snapshots the SESSION, never the model's echo, so every candidate shows its true colour
|
|
819
|
+
* and metrics. A settle whose call no longer owns the session renders nothing: another thread
|
|
820
|
+
* re-pointed the session, and its candidates belong to that conversation.
|
|
821
|
+
*/
|
|
822
|
+
private appendSuggestionsCard;
|
|
823
|
+
/**
|
|
824
|
+
* stagePick applies one suggested route through the bus, and answers how it ended.
|
|
825
|
+
*
|
|
826
|
+
* A tool bus's dispatch never rejects and always answers a result, and a host's own may do
|
|
827
|
+
* neither: an apply that rejects answers the refusal the bus would have made of the throw, and
|
|
828
|
+
* one whose answer states no outcome is refused as `internal`.
|
|
829
|
+
*/
|
|
830
|
+
private stagePick;
|
|
831
|
+
/**
|
|
832
|
+
* applyPick runs one suggestions-card pick, releasing the card's guard however it ends.
|
|
833
|
+
*
|
|
834
|
+
* The apply asks before it drops a staged draft. A reader who keeps theirs (a confirmation
|
|
835
|
+
* denied or left to expire) refused nothing: the card stays pickable and nothing is written.
|
|
836
|
+
*/
|
|
837
|
+
private applyPick;
|
|
838
|
+
/**
|
|
839
|
+
* requestConfirmation parks a thread's decision on its in-chat card. A decision already parked
|
|
840
|
+
* on the thread is denied first, so no resolver is stranded, and one requested while the
|
|
841
|
+
* engine is parked, or for a conversation that has closed, is denied at once: no card could
|
|
842
|
+
* show it.
|
|
843
|
+
*/
|
|
844
|
+
private requestConfirmation;
|
|
845
|
+
/** denyPendingConfirmation denies a thread's parked decision, if any, and clears its card. */
|
|
846
|
+
private denyPendingConfirmation;
|
|
847
|
+
/**
|
|
848
|
+
* faultsFor binds the shared fault handling to one thread. The missing-organization line
|
|
849
|
+
* depends on why there is none, read when the fault happens: with nothing open it asks for an
|
|
850
|
+
* itinerary or a zone, and with a personal one open it says the co-pilot works on an
|
|
851
|
+
* organization's.
|
|
852
|
+
*/
|
|
853
|
+
private faultsFor;
|
|
854
|
+
/** routeForMessage picks the surfaces a thread's next turn offers, from its message. */
|
|
855
|
+
private routeForMessage;
|
|
856
|
+
/**
|
|
857
|
+
* routeForState re-picks from live state, replaying the thread's last message: its words
|
|
858
|
+
* carry the keyword and skill matches, and dropping them would narrow the manifest at the
|
|
859
|
+
* moment the run needs it wider.
|
|
860
|
+
*/
|
|
861
|
+
private routeForState;
|
|
862
|
+
/** route records a thread's pick, with its previous one as the stickiness input. */
|
|
863
|
+
private route;
|
|
864
|
+
/** openTab opens a conversation, with its host built so the tools and a submit find it. */
|
|
865
|
+
private openTab;
|
|
866
|
+
/**
|
|
867
|
+
* closeTab finishes one conversation's run and disposes its session, and the others run on.
|
|
868
|
+
*
|
|
869
|
+
* A pending confirmation is denied, and the suggest session is discarded when it is headless
|
|
870
|
+
* (no draft, no open panel) and this thread staged it or nobody did: a session the human is
|
|
871
|
+
* using stays, and so does one another conversation owns. Closing the last conversation of an
|
|
872
|
+
* entitled viewer opens a fresh one, so the strip always carries one.
|
|
873
|
+
*/
|
|
874
|
+
private closeTab;
|
|
875
|
+
/**
|
|
876
|
+
* showTab points the panel at a tab and mirrors it. The withheld tab is Search for an entitled
|
|
877
|
+
* viewer, so no caller shows them the host's own content over their conversations.
|
|
878
|
+
*/
|
|
879
|
+
private showTab;
|
|
880
|
+
/**
|
|
881
|
+
* resetThreads clears the co-pilot for a switched-to resource: every conversation closes, so
|
|
882
|
+
* the one about the resource being left cannot leak into the next, and the panel lands on
|
|
883
|
+
* Search behind the fresh conversation the last close opens.
|
|
884
|
+
*/
|
|
885
|
+
private resetThreads;
|
|
886
|
+
/**
|
|
887
|
+
* openOrReveal reveals the co-pilot, focusing a conversation rather than opening a second one:
|
|
888
|
+
* a withheld viewer lands on the withheld tab, an entitled one on their latest
|
|
889
|
+
* conversation, and a new one opens only when there is none.
|
|
890
|
+
*/
|
|
891
|
+
private openOrReveal;
|
|
906
892
|
}
|
|
907
|
-
|
|
908
893
|
/**
|
|
909
894
|
* DirectorChatConfig is what the video director's conversation runs against, all of it
|
|
910
895
|
* replaceable mid-life through {@link DirectorChatEngine.configure}. Every member is read when
|
|
911
896
|
* it is used, so a session built after a change runs on the new values.
|
|
912
897
|
*/
|
|
913
898
|
interface DirectorChatConfig {
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
899
|
+
/**
|
|
900
|
+
* The bus the run advertises and dispatches through: the camera-scoped one
|
|
901
|
+
* `createVideoDirectorBus` builds, so the model is offered the camera verbs and nothing that
|
|
902
|
+
* edits an itinerary or the map.
|
|
903
|
+
*/
|
|
904
|
+
readonly bus: ToolDispatcher<StudioToolContext>;
|
|
905
|
+
/**
|
|
906
|
+
* The studio's tool context. The camera verbs dispatch through it unscoped, so they edit the
|
|
907
|
+
* same camera plan a slider does and keep each handler's own entitlement gate; only the manifest
|
|
908
|
+
* is narrowed, by the bus.
|
|
909
|
+
*/
|
|
910
|
+
readonly context: StudioToolContext;
|
|
911
|
+
/** The localized copy a terminal run error resolves onto, the co-pilot's own object. */
|
|
912
|
+
readonly errorCopy: AgentErrorCopy;
|
|
913
|
+
/**
|
|
914
|
+
* Marks an organization's AI configuration stale after a start the gateway refused for want
|
|
915
|
+
* of one, which turns the wizard's director slot into its setup card. Omitted, the refusal
|
|
916
|
+
* still surfaces its words.
|
|
917
|
+
*/
|
|
918
|
+
readonly invalidateAiConfig?: ((organizationId: string) => void) | undefined;
|
|
919
|
+
/**
|
|
920
|
+
* The organization that owns the wizard's itinerary, or null while its detail loads. It is
|
|
921
|
+
* the wizard's own itinerary rather than the studio's open one, which may be another or none,
|
|
922
|
+
* so a run is never scoped to the wrong organization; a submit before it loads writes the
|
|
923
|
+
* still-loading line instead of opening a run.
|
|
924
|
+
*/
|
|
925
|
+
readonly organizationId: string | null;
|
|
926
|
+
/**
|
|
927
|
+
* The host's own remedy for a failed camera verb, appended to the playbook's recovery the model
|
|
928
|
+
* reads with it. Omitted, the model reads the playbook's recovery alone.
|
|
929
|
+
*/
|
|
930
|
+
readonly recoveryAddendum?: RecoveryAddendum | undefined;
|
|
931
|
+
/** The words the conversation writes: fault lines and the server-tool confirmation prompt. */
|
|
932
|
+
readonly strings: Pick<StudioStrings, "confirm" | "copilot" | "director" | "prompt">;
|
|
933
|
+
/** The event transport the run is started, sent into and read over. */
|
|
934
|
+
readonly transport: AgentTransport;
|
|
950
935
|
}
|
|
951
936
|
/**
|
|
952
937
|
* DirectorChatEngineOptions is the {@link DirectorChatConfig} an engine starts with, plus the
|
|
953
938
|
* store it writes, which is fixed for its life.
|
|
954
939
|
*/
|
|
955
940
|
interface DirectorChatEngineOptions extends DirectorChatConfig {
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
941
|
+
/**
|
|
942
|
+
* The store the conversation is written into, for a host that reads it with narrow selectors
|
|
943
|
+
* of its own.
|
|
944
|
+
*
|
|
945
|
+
* @default a new `createVideoDirectorStore()`
|
|
946
|
+
*/
|
|
947
|
+
readonly store?: VideoDirectorStoreApi | undefined;
|
|
963
948
|
}
|
|
964
949
|
/**
|
|
965
950
|
* DirectorChatEngine runs the video wizard's AI director: one conversation, one `AgentEngine`
|
|
@@ -1029,128 +1014,127 @@ interface DirectorChatEngineOptions extends DirectorChatConfig {
|
|
|
1029
1014
|
* release();
|
|
1030
1015
|
* ```
|
|
1031
1016
|
*/
|
|
1032
|
-
declare class DirectorChatEngine {
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1017
|
+
export declare class DirectorChatEngine {
|
|
1018
|
+
private config;
|
|
1019
|
+
private readonly store;
|
|
1020
|
+
private readonly subscriptions;
|
|
1021
|
+
/** The store subscription the listeners are notified through, while the engine runs. */
|
|
1022
|
+
private releaseStore;
|
|
1023
|
+
/** The conversation's host: its one session and its started guard, built on first use. */
|
|
1024
|
+
private host;
|
|
1025
|
+
/**
|
|
1026
|
+
* Whether the last instruction is out and the session has not picked its turn up. While it
|
|
1027
|
+
* is, the session's `awaiting_input` is the run being readied and never the turn settling.
|
|
1028
|
+
*/
|
|
1029
|
+
private awaitingTurn;
|
|
1030
|
+
/**
|
|
1031
|
+
* The state the conversation's session last reported, `awaiting_input` for one that has
|
|
1032
|
+
* reported none. It says whether an instruction is sent into a turn under way, which the
|
|
1033
|
+
* session answers with no report of `running`.
|
|
1034
|
+
*/
|
|
1035
|
+
private sessionState;
|
|
1036
|
+
/** Whether nobody is watching. A parked engine opens nothing and answers no command. */
|
|
1037
|
+
private parked;
|
|
1038
|
+
private disposed;
|
|
1039
|
+
/**
|
|
1040
|
+
* Constructing one holds the options and does nothing else: no host, no session, no run. A
|
|
1041
|
+
* React binding constructs during a render React is free to throw away.
|
|
1042
|
+
*/
|
|
1043
|
+
constructor(options: DirectorChatEngineOptions);
|
|
1044
|
+
/** getSnapshot returns the conversation's state, by reference and stable between changes. */
|
|
1045
|
+
getSnapshot(): VideoDirectorState;
|
|
1046
|
+
/**
|
|
1047
|
+
* subscribe registers a listener for every change of the snapshot, and returns its own
|
|
1048
|
+
* unsubscribe, which is idempotent. The first listener starts the engine, reconnecting the
|
|
1049
|
+
* run a park left behind, and the last one leaving parks it; each call is its own
|
|
1050
|
+
* subscription.
|
|
1051
|
+
*/
|
|
1052
|
+
subscribe(listener: () => void): () => void;
|
|
1053
|
+
/**
|
|
1054
|
+
* configure replaces the configuration. Nothing is asked and no session is rebuilt, since
|
|
1055
|
+
* every member is read when it is used, so a binding may call this on every render.
|
|
1056
|
+
*/
|
|
1057
|
+
configure(config: DirectorChatConfig): void;
|
|
1058
|
+
/**
|
|
1059
|
+
* dispose parks the engine and drops every listener, for good, and asks the gateway to close
|
|
1060
|
+
* the conversation's run: nothing reads it again, and a run left open spends model budget
|
|
1061
|
+
* until the gateway's own timeout. The conversation is left on `awaiting_input` with no run
|
|
1062
|
+
* id and its transcript intact. Idempotent, and every call after it is a no-op rather than an
|
|
1063
|
+
* error.
|
|
1064
|
+
*/
|
|
1065
|
+
dispose(): void;
|
|
1066
|
+
/**
|
|
1067
|
+
* stop ends the run: the gateway is asked to close it (a run the session gave up reading
|
|
1068
|
+
* included), a fresh session is swapped in so the next instruction opens a clean run, and the
|
|
1069
|
+
* conversation is parked on `awaiting_input`. The close is what stops the run spending model
|
|
1070
|
+
* budget: a session torn down without it leaves the run going until the gateway's own timeout.
|
|
1071
|
+
* The transcript stays, since a stop is the user's choice and nothing the run did may vanish.
|
|
1072
|
+
*/
|
|
1073
|
+
stop(): void;
|
|
1074
|
+
/**
|
|
1075
|
+
* submit sends an instruction: the first one opens a run scoped to the wizard itinerary's
|
|
1076
|
+
* organization, with the camera plan as its context, and a later one is delivered into the
|
|
1077
|
+
* open run.
|
|
1078
|
+
*
|
|
1079
|
+
* The conversation reads `running` from the submit, so a surface offers its Stop before the
|
|
1080
|
+
* run has started. It returns to `awaiting_input` when the turn settles, and at once when the
|
|
1081
|
+
* itinerary's organization is not known yet or the gateway refuses the start.
|
|
1082
|
+
*/
|
|
1083
|
+
submit(message: string): void;
|
|
1084
|
+
/** live reports whether something watches the engine, which is when it acts. */
|
|
1085
|
+
private live;
|
|
1086
|
+
/**
|
|
1087
|
+
* resume starts the engine for its first subscriber, and reconnects the run a park left
|
|
1088
|
+
* behind. A reconnect that faults drops the stale run id and leaves the conversation usable.
|
|
1089
|
+
* With no run to reconnect it builds nothing: the session is built by the first instruction.
|
|
1090
|
+
*/
|
|
1091
|
+
private resume;
|
|
1092
|
+
/**
|
|
1093
|
+
* park stops the engine when its last subscriber leaves: the session is disposed with no
|
|
1094
|
+
* close, so the run goes on at the gateway and the conversation keeps its id for the next
|
|
1095
|
+
* subscriber to reconnect.
|
|
1096
|
+
*
|
|
1097
|
+
* A conversation that read `running` settles on `awaiting_input`: no session streams it any
|
|
1098
|
+
* more, and the session the next resume builds starts on `awaiting_input` and reports a
|
|
1099
|
+
* change only. A conversation at rest is left as it is, so a remount writes nothing.
|
|
1100
|
+
*/
|
|
1101
|
+
private park;
|
|
1102
|
+
/**
|
|
1103
|
+
* closeRun asks the gateway to close the conversation's run, for {@link dispose}.
|
|
1104
|
+
*
|
|
1105
|
+
* While the engine runs, the session holds the run and knows whether a close is still owed,
|
|
1106
|
+
* so the host finishes it. After a park no session holds it: the close is posted through the
|
|
1107
|
+
* transport for the run id the park kept, unless that run had already ended. A close the
|
|
1108
|
+
* gateway refuses is dropped, since the run it names is gone or expires on the gateway's own
|
|
1109
|
+
* timeout, and nothing is left to report it to.
|
|
1110
|
+
*/
|
|
1111
|
+
private closeRun;
|
|
1112
|
+
/**
|
|
1113
|
+
* settle returns the conversation to `awaiting_input`: its turn settled or its run faulted.
|
|
1114
|
+
* It ends the wait for a turn, so the next report of its session is read as it is.
|
|
1115
|
+
*/
|
|
1116
|
+
private settle;
|
|
1117
|
+
/**
|
|
1118
|
+
* reportSessionState writes the lifecycle state the session reports, while the engine is
|
|
1119
|
+
* live: a session reports `ended` as the park disposes it, and the park ends no conversation.
|
|
1120
|
+
* While the conversation waits on its turn, the session's `awaiting_input` is not written
|
|
1121
|
+
* either: it is the run being readied. The wait ends when the session reports `running`,
|
|
1122
|
+
* which it does from the message it takes, and its reports are the conversation's from
|
|
1123
|
+
* there: the turn's settle is one of them, whether or not the turn carried a frame of its own.
|
|
1124
|
+
*/
|
|
1125
|
+
private reportSessionState;
|
|
1126
|
+
/** writeSessionState writes the conversation's state when it differs from the one it reads. */
|
|
1127
|
+
private writeSessionState;
|
|
1128
|
+
/** ensureHost returns the conversation's host, building it on first use. */
|
|
1129
|
+
private ensureHost;
|
|
1130
|
+
/** session builds the conversation's session over the camera-scoped bus. */
|
|
1131
|
+
private session;
|
|
1132
|
+
/**
|
|
1133
|
+
* faults binds the shared fault handling to the conversation. No URL is mirrored, so nothing
|
|
1134
|
+
* follows a fault that dropped the run id.
|
|
1135
|
+
*/
|
|
1136
|
+
private faults;
|
|
1152
1137
|
}
|
|
1153
|
-
|
|
1154
1138
|
/**
|
|
1155
1139
|
* agentErrorCopy builds the localized copy a terminal run error resolves onto, from the studio's
|
|
1156
1140
|
* strings.
|
|
@@ -1177,8 +1161,7 @@ declare class DirectorChatEngine {
|
|
|
1177
1161
|
* const threads = new AgentThreadsEngine({ ...options, errorCopy: agentErrorCopy(strings) });
|
|
1178
1162
|
* ```
|
|
1179
1163
|
*/
|
|
1180
|
-
declare const agentErrorCopy: (strings: Pick<StudioStrings, "copilot" | "prompt">) => AgentErrorCopy;
|
|
1181
|
-
|
|
1164
|
+
export declare const agentErrorCopy: (strings: Pick<StudioStrings, "copilot" | "prompt">) => AgentErrorCopy;
|
|
1182
1165
|
/**
|
|
1183
1166
|
* copilotOrganizationId reads the organization a co-pilot run is scoped to off the open editor
|
|
1184
1167
|
* resource, and tells the two ways of having none apart.
|
|
@@ -1200,8 +1183,7 @@ declare const agentErrorCopy: (strings: Pick<StudioStrings, "copilot" | "prompt"
|
|
|
1200
1183
|
* for. Reading each from here is what keeps the card a reader sees and the run that opens from
|
|
1201
1184
|
* disagreeing about which resource the co-pilot is on.
|
|
1202
1185
|
*/
|
|
1203
|
-
declare const copilotOrganizationId: (state: UiState) => string | null | undefined;
|
|
1204
|
-
|
|
1186
|
+
export declare const copilotOrganizationId: (state: UiState) => string | null | undefined;
|
|
1205
1187
|
/**
|
|
1206
1188
|
* GeneratedPlaybookEntry is one tool's compiled playbook: the description the
|
|
1207
1189
|
* model reads, plus the classification a parity test holds against the live tool
|
|
@@ -1209,49 +1191,47 @@ declare const copilotOrganizationId: (state: UiState) => string | null | undefin
|
|
|
1209
1191
|
* none of it ships to a model, so none of it is here.
|
|
1210
1192
|
*/
|
|
1211
1193
|
interface GeneratedPlaybookEntry {
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1194
|
+
/** Mirrors the tool's capability. Absent for a Data API operation. */
|
|
1195
|
+
capability?: string | undefined;
|
|
1196
|
+
confirms: boolean;
|
|
1197
|
+
description: string;
|
|
1198
|
+
id: string;
|
|
1199
|
+
kind: string;
|
|
1200
|
+
/**
|
|
1201
|
+
* What to do about a specific failure code. Attached to a failing result rather
|
|
1202
|
+
* than stated in the prompt, so it costs nothing for the codes that never fire
|
|
1203
|
+
* and arrives at the moment it is actionable.
|
|
1204
|
+
*/
|
|
1205
|
+
recovery: readonly GeneratedRecovery[];
|
|
1206
|
+
surfaces: readonly string[];
|
|
1225
1207
|
}
|
|
1226
1208
|
/** GeneratedRecovery is the instruction for one failure code. */
|
|
1227
1209
|
interface GeneratedRecovery {
|
|
1228
|
-
|
|
1229
|
-
|
|
1210
|
+
code: string;
|
|
1211
|
+
do: string;
|
|
1230
1212
|
}
|
|
1231
1213
|
/**
|
|
1232
1214
|
* PLAYBOOK is the compiled entry table, sorted by id.
|
|
1233
1215
|
*/
|
|
1234
|
-
declare const PLAYBOOK: readonly GeneratedPlaybookEntry[];
|
|
1235
|
-
|
|
1216
|
+
export declare const PLAYBOOK: readonly GeneratedPlaybookEntry[];
|
|
1236
1217
|
/**
|
|
1237
1218
|
* GeneratedSurface is one semantic tool subset, with the routing hints the
|
|
1238
1219
|
* surface router reads.
|
|
1239
1220
|
*/
|
|
1240
1221
|
interface GeneratedSurface {
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1222
|
+
always: boolean;
|
|
1223
|
+
id: string;
|
|
1224
|
+
keywords: readonly string[];
|
|
1225
|
+
members: readonly string[];
|
|
1226
|
+
purpose: string;
|
|
1227
|
+
title: string;
|
|
1228
|
+
wideFallback: boolean;
|
|
1248
1229
|
}
|
|
1249
1230
|
/**
|
|
1250
1231
|
* SURFACES is the compiled surface table. Membership patterns are expanded at
|
|
1251
1232
|
* generation, so a pattern matching nothing fails the build rather than quietly
|
|
1252
1233
|
* yielding an empty surface.
|
|
1253
1234
|
*/
|
|
1254
|
-
declare const SURFACES: readonly GeneratedSurface[];
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
export type { AgentThreadMirror, AgentThreadsActions, AgentThreadsConfig, AgentThreadsEngineOptions, AgentThreadsState, AgentThreadsStore, AgentThreadsStoreApi, AgentThreadsTabsSeam, AgentThreadsUrlSeam, DirectorChatConfig, DirectorChatEngineOptions, GeneratedPlaybookEntry, GeneratedRecovery, GeneratedSurface, RecoveryAddendum, RouterDecision, RouterState, ThreadState };
|
|
1235
|
+
export declare const SURFACES: readonly GeneratedSurface[];
|
|
1236
|
+
export { type AgentThreadMirror, type AgentThreadsActions, type AgentThreadsConfig, type AgentThreadsEngineOptions, type AgentThreadsState, type AgentThreadsStore, type AgentThreadsStoreApi, type AgentThreadsTabsSeam, type AgentThreadsUrlSeam, type DirectorChatConfig, type DirectorChatEngineOptions, type GeneratedPlaybookEntry, type GeneratedRecovery, type GeneratedSurface, type RecoveryAddendum, type RouterDecision, type RouterState, SEARCH_TAB_ID, type ThreadState };
|
|
1237
|
+
//# sourceMappingURL=index.d.ts.map
|