@chatpanel/sdk 0.14.0 → 0.16.1
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/api.generated.d.ts +82 -0
- package/dist/api.generated.js +36 -0
- package/dist/types.generated.d.ts +162 -0
- package/package.json +1 -1
package/dist/api.generated.d.ts
CHANGED
|
@@ -102,6 +102,16 @@ export declare const OPERATIONS: {
|
|
|
102
102
|
readonly pathParams: readonly [];
|
|
103
103
|
readonly queryParams: readonly [];
|
|
104
104
|
};
|
|
105
|
+
readonly "history.research": {
|
|
106
|
+
readonly id: "history.research";
|
|
107
|
+
readonly method: "POST";
|
|
108
|
+
readonly path: "/v1/research";
|
|
109
|
+
readonly auth: "open";
|
|
110
|
+
readonly since: "0.58.0";
|
|
111
|
+
readonly stream: null;
|
|
112
|
+
readonly pathParams: readonly [];
|
|
113
|
+
readonly queryParams: readonly [];
|
|
114
|
+
};
|
|
105
115
|
readonly "history.related": {
|
|
106
116
|
readonly id: "history.related";
|
|
107
117
|
readonly method: "GET";
|
|
@@ -892,6 +902,56 @@ export declare const OPERATIONS: {
|
|
|
892
902
|
readonly pathParams: readonly [];
|
|
893
903
|
readonly queryParams: readonly [];
|
|
894
904
|
};
|
|
905
|
+
readonly "browser.status": {
|
|
906
|
+
readonly id: "browser.status";
|
|
907
|
+
readonly method: "GET";
|
|
908
|
+
readonly path: "/v1/browser";
|
|
909
|
+
readonly auth: "token";
|
|
910
|
+
readonly since: "0.59.0";
|
|
911
|
+
readonly stream: null;
|
|
912
|
+
readonly pathParams: readonly [];
|
|
913
|
+
readonly queryParams: readonly [];
|
|
914
|
+
};
|
|
915
|
+
readonly "browser.call": {
|
|
916
|
+
readonly id: "browser.call";
|
|
917
|
+
readonly method: "POST";
|
|
918
|
+
readonly path: "/v1/browser/call";
|
|
919
|
+
readonly auth: "token";
|
|
920
|
+
readonly since: "0.59.0";
|
|
921
|
+
readonly stream: null;
|
|
922
|
+
readonly pathParams: readonly [];
|
|
923
|
+
readonly queryParams: readonly [];
|
|
924
|
+
};
|
|
925
|
+
readonly "browser.stream": {
|
|
926
|
+
readonly id: "browser.stream";
|
|
927
|
+
readonly method: "GET";
|
|
928
|
+
readonly path: "/v1/browser/stream";
|
|
929
|
+
readonly auth: "token";
|
|
930
|
+
readonly since: "0.59.0";
|
|
931
|
+
readonly stream: "sse";
|
|
932
|
+
readonly pathParams: readonly [];
|
|
933
|
+
readonly queryParams: readonly [];
|
|
934
|
+
};
|
|
935
|
+
readonly "browser.announce": {
|
|
936
|
+
readonly id: "browser.announce";
|
|
937
|
+
readonly method: "POST";
|
|
938
|
+
readonly path: "/v1/browser/announce";
|
|
939
|
+
readonly auth: "token";
|
|
940
|
+
readonly since: "0.59.0";
|
|
941
|
+
readonly stream: null;
|
|
942
|
+
readonly pathParams: readonly [];
|
|
943
|
+
readonly queryParams: readonly [];
|
|
944
|
+
};
|
|
945
|
+
readonly "browser.result": {
|
|
946
|
+
readonly id: "browser.result";
|
|
947
|
+
readonly method: "POST";
|
|
948
|
+
readonly path: "/v1/browser/result";
|
|
949
|
+
readonly auth: "token";
|
|
950
|
+
readonly since: "0.59.0";
|
|
951
|
+
readonly stream: null;
|
|
952
|
+
readonly pathParams: readonly [];
|
|
953
|
+
readonly queryParams: readonly [];
|
|
954
|
+
};
|
|
895
955
|
};
|
|
896
956
|
export type OperationId = keyof typeof OPERATIONS;
|
|
897
957
|
/** Liveness, identity and pairing. */
|
|
@@ -955,6 +1015,8 @@ export declare class HistoryApi {
|
|
|
955
1015
|
search(body: T.SearchRequest, opts?: RequestOptions): Promise<T.SearchResponse>;
|
|
956
1016
|
/** Several phrasings at once, rank-fused; briefs lead. */
|
|
957
1017
|
smartSearch(body: T.SmartSearchRequest, opts?: RequestOptions): Promise<T.SmartSearchResponse>;
|
|
1018
|
+
/** A question about the person's own data, researched over the whole store. The shared bounded loop over the warm store: the question is framed (kind of record, people named, dates, the latest or the first, a count, counts per person or per month/week/day), every matching record is queried — sorted by date when it asks for the last one, counted when it asks how many — the top records are read in full, and the result carries what was searched, found and read, plus `attachment`: one block to hand a model, with record ids to cite. Pass `next` back as `previous` to continue the question ("no, even later", "what was it about"). Open like the other history reads; naming a `model` (to condense long records and check the evidence) runs a model on the caller's behalf and needs the gateway token. — Gateway 0.58.0+. */
|
|
1019
|
+
research(body: T.ResearchRequest, opts?: RequestOptions): Promise<T.ResearchResponse>;
|
|
958
1020
|
/** The records most connected to one record. */
|
|
959
1021
|
related(query: {
|
|
960
1022
|
id: string;
|
|
@@ -1463,6 +1525,25 @@ export declare class FusionsApi {
|
|
|
1463
1525
|
/** Several models as one — the fusions this gateway has. Derived from state (the entity detector's union once a companion is ready, an engine drafting with a second model) and composed by the user (`POST /config { fusions }`, a chat fallback in order). A chat turn names a fallback as `model: "fusion:<id>"` and is routed to the first member that is up; `x-chatpanel-fusion` on the response says which. — Gateway 0.33.0+. */
|
|
1464
1526
|
list(opts?: RequestOptions): Promise<T.FusionList>;
|
|
1465
1527
|
}
|
|
1528
|
+
/** A local client using the person's own browser through the ChatPanel extension — the browser holds a stream, a client's page-tool call is carried to it and its result back. Every action still passes the extension's site grant, its commit confirmation and its bot-check hand-off. */
|
|
1529
|
+
export declare class BrowserApi {
|
|
1530
|
+
private readonly rt;
|
|
1531
|
+
constructor(rt: Runtime);
|
|
1532
|
+
/** Is a browser connected, which one, and the page tool it offers. The spec and guidance are the extension's own — a client hands them to its model as they are. — Requires the gateway token. Gateway 0.59.0+. */
|
|
1533
|
+
status(opts?: RequestOptions): Promise<T.BrowserStatus>;
|
|
1534
|
+
/** Run one page action in the person's browser and wait for its result. Carried to the connected browser, which runs it on the task's own tab through the same guards as its own page actions — the first call of a panel session asks the person, and anything that submits, pays or books is confirmed by them. Waits up to `timeoutMs` (default 120 s) because a confirmation is a person deciding. — Requires the gateway token. Gateway 0.59.0+. */
|
|
1535
|
+
call(body: T.BrowserCall, opts?: RequestOptions): Promise<T.BrowserCallResult>;
|
|
1536
|
+
/** The browser's end — `hello` with its session, then a `call` frame per action to run. — Requires the gateway token. Gateway 0.59.0+. */
|
|
1537
|
+
stream(opts?: RequestOptions): AsyncIterable<SseFrame<T.BrowserStreamEvent>>;
|
|
1538
|
+
/** The browser says what it offers — its page tool spec and guidance. — Requires the gateway token. Gateway 0.59.0+. */
|
|
1539
|
+
announce(body: T.BrowserAnnounce, opts?: RequestOptions): Promise<{
|
|
1540
|
+
ok: boolean;
|
|
1541
|
+
}>;
|
|
1542
|
+
/** The browser answers a call it ran. Only the session the call went to may answer it. — Requires the gateway token. Gateway 0.59.0+. */
|
|
1543
|
+
result(body: T.BrowserResult, opts?: RequestOptions): Promise<{
|
|
1544
|
+
ok: boolean;
|
|
1545
|
+
}>;
|
|
1546
|
+
}
|
|
1466
1547
|
/** The namespaces a client exposes, built on one runtime. */
|
|
1467
1548
|
export declare function buildApi(rt: Runtime): {
|
|
1468
1549
|
gateway: GatewayApi;
|
|
@@ -1483,4 +1564,5 @@ export declare function buildApi(rt: Runtime): {
|
|
|
1483
1564
|
skills: SkillsApi;
|
|
1484
1565
|
a2a: A2aApi;
|
|
1485
1566
|
fusions: FusionsApi;
|
|
1567
|
+
browser: BrowserApi;
|
|
1486
1568
|
};
|
package/dist/api.generated.js
CHANGED
|
@@ -10,6 +10,7 @@ export const OPERATIONS = {
|
|
|
10
10
|
"redaction.preview": { id: "redaction.preview", method: "POST", path: "/redact", auth: "open", since: "0.6.62", stream: null, pathParams: [], queryParams: [] },
|
|
11
11
|
"history.search": { id: "history.search", method: "POST", path: "/v1/history/search", auth: "open", since: null, stream: null, pathParams: [], queryParams: [] },
|
|
12
12
|
"history.smartSearch": { id: "history.smartSearch", method: "POST", path: "/v1/history/smart-search", auth: "open", since: null, stream: null, pathParams: [], queryParams: [] },
|
|
13
|
+
"history.research": { id: "history.research", method: "POST", path: "/v1/research", auth: "open", since: "0.58.0", stream: null, pathParams: [], queryParams: [] },
|
|
13
14
|
"history.related": { id: "history.related", method: "GET", path: "/v1/history/related", auth: "open", since: null, stream: null, pathParams: [], queryParams: ["id", "limit"] },
|
|
14
15
|
"history.status": { id: "history.status", method: "GET", path: "/v1/history/status", auth: "open", since: null, stream: null, pathParams: [], queryParams: [] },
|
|
15
16
|
"history.list": { id: "history.list", method: "GET", path: "/v1/history/list", auth: "open", since: null, stream: null, pathParams: [], queryParams: ["limit", "offset", "type"] },
|
|
@@ -89,6 +90,11 @@ export const OPERATIONS = {
|
|
|
89
90
|
"skills.list": { id: "skills.list", method: "GET", path: "/skills", auth: "open", since: "0.6.64", stream: null, pathParams: [], queryParams: ["workdir"] },
|
|
90
91
|
"skills.get": { id: "skills.get", method: "GET", path: "/skills/{skillId}", auth: "open", since: "0.6.67", stream: null, pathParams: ["skillId"], queryParams: ["workdir"] },
|
|
91
92
|
"fusions.list": { id: "fusions.list", method: "GET", path: "/v1/fusions", auth: "open", since: "0.33.0", stream: null, pathParams: [], queryParams: [] },
|
|
93
|
+
"browser.status": { id: "browser.status", method: "GET", path: "/v1/browser", auth: "token", since: "0.59.0", stream: null, pathParams: [], queryParams: [] },
|
|
94
|
+
"browser.call": { id: "browser.call", method: "POST", path: "/v1/browser/call", auth: "token", since: "0.59.0", stream: null, pathParams: [], queryParams: [] },
|
|
95
|
+
"browser.stream": { id: "browser.stream", method: "GET", path: "/v1/browser/stream", auth: "token", since: "0.59.0", stream: "sse", pathParams: [], queryParams: [] },
|
|
96
|
+
"browser.announce": { id: "browser.announce", method: "POST", path: "/v1/browser/announce", auth: "token", since: "0.59.0", stream: null, pathParams: [], queryParams: [] },
|
|
97
|
+
"browser.result": { id: "browser.result", method: "POST", path: "/v1/browser/result", auth: "token", since: "0.59.0", stream: null, pathParams: [], queryParams: [] },
|
|
92
98
|
};
|
|
93
99
|
/** Liveness, identity and pairing. */
|
|
94
100
|
export class GatewayApi {
|
|
@@ -158,6 +164,10 @@ export class HistoryApi {
|
|
|
158
164
|
smartSearch(body, opts) {
|
|
159
165
|
return this.rt.request(OPERATIONS["history.smartSearch"], { path: {}, query: undefined, headers: opts?.headers, body: body, opts });
|
|
160
166
|
}
|
|
167
|
+
/** A question about the person's own data, researched over the whole store. The shared bounded loop over the warm store: the question is framed (kind of record, people named, dates, the latest or the first, a count, counts per person or per month/week/day), every matching record is queried — sorted by date when it asks for the last one, counted when it asks how many — the top records are read in full, and the result carries what was searched, found and read, plus `attachment`: one block to hand a model, with record ids to cite. Pass `next` back as `previous` to continue the question ("no, even later", "what was it about"). Open like the other history reads; naming a `model` (to condense long records and check the evidence) runs a model on the caller's behalf and needs the gateway token. — Gateway 0.58.0+. */
|
|
168
|
+
research(body, opts) {
|
|
169
|
+
return this.rt.request(OPERATIONS["history.research"], { path: {}, query: undefined, headers: opts?.headers, body: body, opts });
|
|
170
|
+
}
|
|
161
171
|
/** The records most connected to one record. */
|
|
162
172
|
related(query, opts) {
|
|
163
173
|
return this.rt.request(OPERATIONS["history.related"], { path: {}, query: query, headers: opts?.headers, body: undefined, opts });
|
|
@@ -540,6 +550,31 @@ export class FusionsApi {
|
|
|
540
550
|
return this.rt.request(OPERATIONS["fusions.list"], { path: {}, query: undefined, headers: opts?.headers, body: undefined, opts });
|
|
541
551
|
}
|
|
542
552
|
}
|
|
553
|
+
/** A local client using the person's own browser through the ChatPanel extension — the browser holds a stream, a client's page-tool call is carried to it and its result back. Every action still passes the extension's site grant, its commit confirmation and its bot-check hand-off. */
|
|
554
|
+
export class BrowserApi {
|
|
555
|
+
rt;
|
|
556
|
+
constructor(rt) { this.rt = rt; }
|
|
557
|
+
/** Is a browser connected, which one, and the page tool it offers. The spec and guidance are the extension's own — a client hands them to its model as they are. — Requires the gateway token. Gateway 0.59.0+. */
|
|
558
|
+
status(opts) {
|
|
559
|
+
return this.rt.request(OPERATIONS["browser.status"], { path: {}, query: undefined, headers: opts?.headers, body: undefined, opts });
|
|
560
|
+
}
|
|
561
|
+
/** Run one page action in the person's browser and wait for its result. Carried to the connected browser, which runs it on the task's own tab through the same guards as its own page actions — the first call of a panel session asks the person, and anything that submits, pays or books is confirmed by them. Waits up to `timeoutMs` (default 120 s) because a confirmation is a person deciding. — Requires the gateway token. Gateway 0.59.0+. */
|
|
562
|
+
call(body, opts) {
|
|
563
|
+
return this.rt.request(OPERATIONS["browser.call"], { path: {}, query: undefined, headers: opts?.headers, body: body, opts });
|
|
564
|
+
}
|
|
565
|
+
/** The browser's end — `hello` with its session, then a `call` frame per action to run. — Requires the gateway token. Gateway 0.59.0+. */
|
|
566
|
+
stream(opts) {
|
|
567
|
+
return this.rt.stream(OPERATIONS["browser.stream"], { path: {}, query: undefined, headers: opts?.headers, opts });
|
|
568
|
+
}
|
|
569
|
+
/** The browser says what it offers — its page tool spec and guidance. — Requires the gateway token. Gateway 0.59.0+. */
|
|
570
|
+
announce(body, opts) {
|
|
571
|
+
return this.rt.request(OPERATIONS["browser.announce"], { path: {}, query: undefined, headers: opts?.headers, body: body, opts });
|
|
572
|
+
}
|
|
573
|
+
/** The browser answers a call it ran. Only the session the call went to may answer it. — Requires the gateway token. Gateway 0.59.0+. */
|
|
574
|
+
result(body, opts) {
|
|
575
|
+
return this.rt.request(OPERATIONS["browser.result"], { path: {}, query: undefined, headers: opts?.headers, body: body, opts });
|
|
576
|
+
}
|
|
577
|
+
}
|
|
543
578
|
/** The namespaces a client exposes, built on one runtime. */
|
|
544
579
|
export function buildApi(rt) {
|
|
545
580
|
return {
|
|
@@ -561,5 +596,6 @@ export function buildApi(rt) {
|
|
|
561
596
|
skills: new SkillsApi(rt),
|
|
562
597
|
a2a: new A2aApi(rt),
|
|
563
598
|
fusions: new FusionsApi(rt),
|
|
599
|
+
browser: new BrowserApi(rt),
|
|
564
600
|
};
|
|
565
601
|
}
|
|
@@ -155,6 +155,8 @@ export interface RuntimeDocument {
|
|
|
155
155
|
engines?: AnyObject;
|
|
156
156
|
/** Per catalogue service (searxng · reranker · opendecision): { id, label, image, container, port, blurb, provides, engine, state, url, configured, answering } — a capability container also { model, default, models: [{ id, label, lang, tier, approxMB, ramMB, licence, recommended, installed, note, unavailable?, ramNote? }], machine: { engineRamMB } } (gateway 0.22+). */
|
|
157
157
|
services?: AnyObject;
|
|
158
|
+
/** rerank and decide answered by the gateway itself, the default since gateway 0.57.0 (a container service above is the alternative): per capability { provider (embedded | container | remote | none — who serves it now), model (when embedded), models: [{ id, label, mb, languages, note }] (the curated list a person may pick; the first is the default), threads, state (idle | downloading | loading | ready | down), progress?, error? }. Pick one with POST /config capabilities.<id> { provider: 'embedded', model } or turn it off with { provider: 'none' }. */
|
|
159
|
+
inProcess?: AnyObject;
|
|
158
160
|
}
|
|
159
161
|
export interface RuntimeActionResult {
|
|
160
162
|
ok: boolean;
|
|
@@ -468,6 +470,88 @@ export type SmartSearchRequest = (SearchFilters) & ({
|
|
|
468
470
|
queries?: Array<string>;
|
|
469
471
|
maxQueries?: number;
|
|
470
472
|
});
|
|
473
|
+
/** How the question was framed — the typed plan the store was queried with. */
|
|
474
|
+
export interface ResearchPlan {
|
|
475
|
+
intent?: "find" | "latest" | "earliest" | "count" | "group" | "people" | "list" | "detail";
|
|
476
|
+
/** meeting, note, chat — or empty for every kind. */
|
|
477
|
+
kind?: string;
|
|
478
|
+
names?: Array<string>;
|
|
479
|
+
terms?: Array<string>;
|
|
480
|
+
sort?: "relevance" | "newest" | "oldest";
|
|
481
|
+
limit?: number;
|
|
482
|
+
since?: number;
|
|
483
|
+
after?: number;
|
|
484
|
+
before?: number;
|
|
485
|
+
/** person, month, week, day — or empty. */
|
|
486
|
+
group?: string;
|
|
487
|
+
readFull?: boolean;
|
|
488
|
+
followUp?: boolean;
|
|
489
|
+
target?: string | null;
|
|
490
|
+
[key: string]: unknown;
|
|
491
|
+
}
|
|
492
|
+
/** What a follow-up continues — the `next` of the previous answer, passed back as `previous`. */
|
|
493
|
+
export interface ResearchFollowUp {
|
|
494
|
+
plan: ResearchPlan;
|
|
495
|
+
/** The record the answer pointed at. */
|
|
496
|
+
top?: string | null;
|
|
497
|
+
/** What the answer said (a date in it bounds "even later"). */
|
|
498
|
+
answer?: string;
|
|
499
|
+
}
|
|
500
|
+
export interface ResearchRequest {
|
|
501
|
+
/** The person's question, in their words. */
|
|
502
|
+
question: string;
|
|
503
|
+
previous?: ResearchFollowUp;
|
|
504
|
+
/** A model id to read with (condense long records, check the evidence). Needs the gateway token; without one the parts are quoted as they are. */
|
|
505
|
+
model?: string;
|
|
506
|
+
/** A record that is not evidence — the conversation asking. */
|
|
507
|
+
excludeId?: string;
|
|
508
|
+
}
|
|
509
|
+
export interface ResearchResponse {
|
|
510
|
+
ok: boolean;
|
|
511
|
+
question?: string;
|
|
512
|
+
plan: ResearchPlan;
|
|
513
|
+
/** How the store was searched, in words. */
|
|
514
|
+
how: string;
|
|
515
|
+
framedBy?: "rules" | "model";
|
|
516
|
+
/** Every match in the store, not the rows returned. */
|
|
517
|
+
count?: number | null;
|
|
518
|
+
rows: Array<{
|
|
519
|
+
id: string;
|
|
520
|
+
kind?: string;
|
|
521
|
+
title?: string;
|
|
522
|
+
date?: number;
|
|
523
|
+
snippet?: string;
|
|
524
|
+
[key: string]: unknown;
|
|
525
|
+
}>;
|
|
526
|
+
groups?: Array<{
|
|
527
|
+
key: string;
|
|
528
|
+
count: number;
|
|
529
|
+
}> | null;
|
|
530
|
+
read: Array<{
|
|
531
|
+
id: string;
|
|
532
|
+
title?: string;
|
|
533
|
+
date?: number;
|
|
534
|
+
parts?: number;
|
|
535
|
+
of?: number;
|
|
536
|
+
speakers?: Array<{
|
|
537
|
+
name?: string;
|
|
538
|
+
lines?: number;
|
|
539
|
+
}>;
|
|
540
|
+
notes?: Array<string>;
|
|
541
|
+
}>;
|
|
542
|
+
memory?: Array<string>;
|
|
543
|
+
rounds?: number;
|
|
544
|
+
verdict?: string | null;
|
|
545
|
+
ms?: number;
|
|
546
|
+
next: ResearchFollowUp;
|
|
547
|
+
/** The block to hand a model — null when nothing was found anywhere. */
|
|
548
|
+
attachment?: {
|
|
549
|
+
title: string;
|
|
550
|
+
text: string;
|
|
551
|
+
} | null;
|
|
552
|
+
size?: number;
|
|
553
|
+
newest?: number | null;
|
|
554
|
+
}
|
|
471
555
|
export interface SearchHit {
|
|
472
556
|
id: string;
|
|
473
557
|
score?: number;
|
|
@@ -977,3 +1061,81 @@ export interface FusionList {
|
|
|
977
1061
|
describe?: string;
|
|
978
1062
|
}>;
|
|
979
1063
|
}
|
|
1064
|
+
export interface BrowserInfo {
|
|
1065
|
+
kind: "chrome" | "edge" | "firefox" | "brave" | "opera" | "chromium" | "other";
|
|
1066
|
+
version?: string;
|
|
1067
|
+
}
|
|
1068
|
+
export interface BrowserStatus {
|
|
1069
|
+
connected: boolean;
|
|
1070
|
+
/** Calls waiting on the browser. */
|
|
1071
|
+
pending: number;
|
|
1072
|
+
/** A browser holds the stream but has not announced yet. */
|
|
1073
|
+
waiting?: boolean;
|
|
1074
|
+
browser?: BrowserInfo;
|
|
1075
|
+
/** The extension's version. */
|
|
1076
|
+
extension?: string;
|
|
1077
|
+
/** The page tool: { name, description, parameters } — hand it to a model as it is. */
|
|
1078
|
+
spec?: {
|
|
1079
|
+
[key: string]: unknown;
|
|
1080
|
+
};
|
|
1081
|
+
/** The guidance that goes with the tool. */
|
|
1082
|
+
system?: string;
|
|
1083
|
+
/** The full specs behind the dispatcher (gateway 0.59.1+) — a hub lists each action with its own arguments. */
|
|
1084
|
+
actions?: Array<{
|
|
1085
|
+
[key: string]: unknown;
|
|
1086
|
+
}>;
|
|
1087
|
+
}
|
|
1088
|
+
export interface BrowserCall {
|
|
1089
|
+
/** A page action: open_tab, navigate, read_page, inspect_page, fill_form, click_by_text, screenshot, describe… */
|
|
1090
|
+
action: string;
|
|
1091
|
+
args?: {
|
|
1092
|
+
[key: string]: unknown;
|
|
1093
|
+
};
|
|
1094
|
+
/** What the person asked for — shown to them when the browser asks to be used. */
|
|
1095
|
+
task?: string;
|
|
1096
|
+
timeoutMs?: number;
|
|
1097
|
+
}
|
|
1098
|
+
export interface BrowserCallResult {
|
|
1099
|
+
ok: boolean;
|
|
1100
|
+
/** The page action's result — its text, or text with a screenshot. */
|
|
1101
|
+
result: string | {
|
|
1102
|
+
text: string;
|
|
1103
|
+
/** A data URL. */
|
|
1104
|
+
image?: string;
|
|
1105
|
+
};
|
|
1106
|
+
}
|
|
1107
|
+
export interface BrowserStreamEvent {
|
|
1108
|
+
event: "hello" | "call" | "cancel" | "replaced";
|
|
1109
|
+
/** On `hello`. */
|
|
1110
|
+
session?: string;
|
|
1111
|
+
/** On `hello` — the gateway's. */
|
|
1112
|
+
version?: string;
|
|
1113
|
+
/** On `call` and `cancel`. */
|
|
1114
|
+
id?: string;
|
|
1115
|
+
action?: string;
|
|
1116
|
+
args?: {
|
|
1117
|
+
[key: string]: unknown;
|
|
1118
|
+
};
|
|
1119
|
+
task?: string;
|
|
1120
|
+
}
|
|
1121
|
+
export interface BrowserAnnounce {
|
|
1122
|
+
session: string;
|
|
1123
|
+
browser?: BrowserInfo;
|
|
1124
|
+
extension?: string;
|
|
1125
|
+
spec: {
|
|
1126
|
+
[key: string]: unknown;
|
|
1127
|
+
};
|
|
1128
|
+
system?: string;
|
|
1129
|
+
/** Optional — the full specs behind the dispatcher. */
|
|
1130
|
+
actions?: Array<{
|
|
1131
|
+
[key: string]: unknown;
|
|
1132
|
+
}>;
|
|
1133
|
+
}
|
|
1134
|
+
export interface BrowserResult {
|
|
1135
|
+
session: string;
|
|
1136
|
+
id: string;
|
|
1137
|
+
result: string | {
|
|
1138
|
+
text: string;
|
|
1139
|
+
image?: string;
|
|
1140
|
+
};
|
|
1141
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chatpanel/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"description": "Typed client for the local ChatPanel gateway — chat through the privacy proxy, search the user's history, read and write memory, follow team runs. Zero dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|