@chatpanel/sdk 0.13.0 → 0.14.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 +12 -0
- package/dist/api.generated.js +5 -0
- package/dist/types.generated.d.ts +11 -0
- package/package.json +1 -1
package/dist/api.generated.d.ts
CHANGED
|
@@ -342,6 +342,16 @@ export declare const OPERATIONS: {
|
|
|
342
342
|
readonly pathParams: readonly [];
|
|
343
343
|
readonly queryParams: readonly [];
|
|
344
344
|
};
|
|
345
|
+
readonly "teams.stream": {
|
|
346
|
+
readonly id: "teams.stream";
|
|
347
|
+
readonly method: "GET";
|
|
348
|
+
readonly path: "/v1/teams/stream";
|
|
349
|
+
readonly auth: "token";
|
|
350
|
+
readonly since: "0.55.0";
|
|
351
|
+
readonly stream: "sse";
|
|
352
|
+
readonly pathParams: readonly [];
|
|
353
|
+
readonly queryParams: readonly [];
|
|
354
|
+
};
|
|
345
355
|
readonly "teams.getRun": {
|
|
346
356
|
readonly id: "teams.getRun";
|
|
347
357
|
readonly method: "GET";
|
|
@@ -1070,6 +1080,8 @@ export declare class TeamsApi {
|
|
|
1070
1080
|
ok: boolean;
|
|
1071
1081
|
run: T.TeamRun;
|
|
1072
1082
|
}>;
|
|
1083
|
+
/** Run changes, pushed — `hello` once, then a `run` notice whenever a run is created, moves or is removed. A Runs or Board view listens here and re-reads a run (`GET /v1/teams/runs/{runId}`) or the list only when a notice names one, instead of polling. Facts only — a task's streamed text never produces a notice. Staleness is judged by the clock, not by an event, so a view keeps a slow re-read beside the stream. — Requires the gateway token. Gateway 0.55.0+. */
|
|
1084
|
+
stream(opts?: RequestOptions): AsyncIterable<SseFrame<T.TeamsStreamEvent>>;
|
|
1073
1085
|
/** One run, optionally with its events. — Gateway 0.6.78+. */
|
|
1074
1086
|
getRun(runId: string, query?: {
|
|
1075
1087
|
events?: boolean;
|
package/dist/api.generated.js
CHANGED
|
@@ -34,6 +34,7 @@ export const OPERATIONS = {
|
|
|
34
34
|
"prefs.events": { id: "prefs.events", method: "GET", path: "/v1/prefs/events", auth: "open", since: "0.6.77", stream: "sse", pathParams: [], queryParams: [] },
|
|
35
35
|
"teams.listRuns": { id: "teams.listRuns", method: "GET", path: "/v1/teams/runs", auth: "open", since: "0.6.78", stream: null, pathParams: [], queryParams: ["limit", "team"] },
|
|
36
36
|
"teams.createRun": { id: "teams.createRun", method: "POST", path: "/v1/teams/runs", auth: "open", since: "0.6.78", stream: null, pathParams: [], queryParams: [] },
|
|
37
|
+
"teams.stream": { id: "teams.stream", method: "GET", path: "/v1/teams/stream", auth: "token", since: "0.55.0", stream: "sse", pathParams: [], queryParams: [] },
|
|
37
38
|
"teams.getRun": { id: "teams.getRun", method: "GET", path: "/v1/teams/runs/{runId}", auth: "open", since: "0.6.78", stream: null, pathParams: ["runId"], queryParams: ["events"] },
|
|
38
39
|
"teams.deleteRun": { id: "teams.deleteRun", method: "DELETE", path: "/v1/teams/runs/{runId}", auth: "open", since: "0.6.110", stream: null, pathParams: ["runId"], queryParams: [] },
|
|
39
40
|
"teams.runEvents": { id: "teams.runEvents", method: "GET", path: "/v1/teams/runs/{runId}/events", auth: "open", since: "0.6.78", stream: "sse", pathParams: ["runId"], queryParams: ["after"] },
|
|
@@ -273,6 +274,10 @@ export class TeamsApi {
|
|
|
273
274
|
createRun(body, opts) {
|
|
274
275
|
return this.rt.request(OPERATIONS["teams.createRun"], { path: {}, query: undefined, headers: opts?.headers, body: body, opts });
|
|
275
276
|
}
|
|
277
|
+
/** Run changes, pushed — `hello` once, then a `run` notice whenever a run is created, moves or is removed. A Runs or Board view listens here and re-reads a run (`GET /v1/teams/runs/{runId}`) or the list only when a notice names one, instead of polling. Facts only — a task's streamed text never produces a notice. Staleness is judged by the clock, not by an event, so a view keeps a slow re-read beside the stream. — Requires the gateway token. Gateway 0.55.0+. */
|
|
278
|
+
stream(opts) {
|
|
279
|
+
return this.rt.stream(OPERATIONS["teams.stream"], { path: {}, query: undefined, headers: opts?.headers, opts });
|
|
280
|
+
}
|
|
276
281
|
/** One run, optionally with its events. — Gateway 0.6.78+. */
|
|
277
282
|
getRun(runId, query, opts) {
|
|
278
283
|
return this.rt.request(OPERATIONS["teams.getRun"], { path: { runId }, query: query, headers: opts?.headers, body: undefined, opts });
|
|
@@ -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;
|
|
@@ -712,6 +714,15 @@ export interface HistoryStreamEvent {
|
|
|
712
714
|
ids?: Array<string>;
|
|
713
715
|
at?: number;
|
|
714
716
|
}
|
|
717
|
+
export interface TeamsStreamEvent {
|
|
718
|
+
type: "hello" | "run";
|
|
719
|
+
/** On `hello`. */
|
|
720
|
+
at?: number;
|
|
721
|
+
/** The run that changed. */
|
|
722
|
+
id?: string;
|
|
723
|
+
/** True when the run left the store. */
|
|
724
|
+
removed?: boolean;
|
|
725
|
+
}
|
|
715
726
|
export interface PrefsEvent {
|
|
716
727
|
type: "hello" | "changed";
|
|
717
728
|
revision?: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chatpanel/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.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",
|