@chatpanel/sdk 0.27.1 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.generated.d.ts +33 -0
- package/dist/api.generated.js +10 -0
- package/dist/types.generated.d.ts +31 -0
- package/package.json +1 -1
package/dist/api.generated.d.ts
CHANGED
|
@@ -662,6 +662,16 @@ export declare const OPERATIONS: {
|
|
|
662
662
|
readonly pathParams: readonly [];
|
|
663
663
|
readonly queryParams: readonly [];
|
|
664
664
|
};
|
|
665
|
+
readonly "runtime.recipe": {
|
|
666
|
+
readonly id: "runtime.recipe";
|
|
667
|
+
readonly method: "GET";
|
|
668
|
+
readonly path: "/v1/runtime/recipe";
|
|
669
|
+
readonly auth: "token";
|
|
670
|
+
readonly since: "0.122.0";
|
|
671
|
+
readonly stream: null;
|
|
672
|
+
readonly pathParams: readonly [];
|
|
673
|
+
readonly queryParams: readonly ["service", "model"];
|
|
674
|
+
};
|
|
665
675
|
readonly "runtime.plan": {
|
|
666
676
|
readonly id: "runtime.plan";
|
|
667
677
|
readonly method: "GET";
|
|
@@ -1132,6 +1142,16 @@ export declare const OPERATIONS: {
|
|
|
1132
1142
|
readonly pathParams: readonly ["skillId"];
|
|
1133
1143
|
readonly queryParams: readonly ["workdir"];
|
|
1134
1144
|
};
|
|
1145
|
+
readonly "skills.file": {
|
|
1146
|
+
readonly id: "skills.file";
|
|
1147
|
+
readonly method: "GET";
|
|
1148
|
+
readonly path: "/skills/{skillId}/file/{path}";
|
|
1149
|
+
readonly auth: "open";
|
|
1150
|
+
readonly since: "0.11.4";
|
|
1151
|
+
readonly stream: null;
|
|
1152
|
+
readonly pathParams: readonly ["skillId", "path"];
|
|
1153
|
+
readonly queryParams: readonly ["workdir"];
|
|
1154
|
+
};
|
|
1135
1155
|
readonly "fusions.list": {
|
|
1136
1156
|
readonly id: "fusions.list";
|
|
1137
1157
|
readonly method: "GET";
|
|
@@ -1738,6 +1758,11 @@ export declare class RuntimeApi {
|
|
|
1738
1758
|
constructor(rt: Runtime);
|
|
1739
1759
|
/** The runtime — the process sandbox, what is running now, the container engine, the services. One document for Settings › Runtime. `sandbox` is the bridge's own (`/health.sandbox`: enabled, mode `open` | `allowlist` | `none`, the runtime found, the reason when none, the global `extras`, whether a process can get a session of its own, and `refused` — the last hosts any process was refused, names only). `processes` lists every local MCP server running for the user with its sandbox record and the hosts it was refused, and the warm agent processes. `engines` says which container engine exists (`podman` first, `docker`) and whether it can run a container now; when none does, `install` carries the command for this platform — shown to the person, never run by the gateway. `services` is the catalogue: `searxng` with its state (`no-engine` | `engine-stopped` | `absent` | `stopped` | `running`), its loopback URL and whether it answers. — Gateway 0.19.0+. */
|
|
1740
1760
|
status(opts?: RequestOptions): Promise<T.RuntimeDocument>;
|
|
1761
|
+
/** What a GGUF repo runs as on this machine, before anything is downloaded. For llama.cpp: the repo's file list read from Hugging Face, and 64 KB of one weights file's header for its architecture. Answers the quant picked (Q4_K_M when none is named), every quant with its size and whether it fits in about three quarters of the machine's memory, the vision projector and the speculative-decoding draft the repo ships (with the `--spec-type` its name means), and the layout chosen — `alt` when the repo also carries the weights as `.gguf_file` and only that layout is one the installed llama.cpp knows. A repo whose architecture the installed llama.cpp cannot load is a 400 with `code: unsupported_arch`. Nothing is saved; a start pulls the same recipe. — Requires the gateway token. Gateway 0.122.0+. */
|
|
1762
|
+
recipe(query: {
|
|
1763
|
+
service?: string;
|
|
1764
|
+
model: string;
|
|
1765
|
+
}, opts?: RequestOptions): Promise<T.RuntimeRecipe>;
|
|
1741
1766
|
/** Will this local model run now? Weights + the KV cache for the context + 10% headroom, against what is free. Checked against what Heatwatch (an optional macOS tool on `127.0.0.1:7878`) says is reclaimable NOW, with the apps to close when it is short — or, without Heatwatch, against the machine's total memory, and `source` says which (`heatwatch` | `total-memory`). The KV cache is counted from the model's `config.json` when it is in the gateway's model cache (`contextCounted` says whether it was). A model the catalogue does not list needs `need_mb`. A native service's start makes the same check and refuses a model that does not fit what is free, unless the start says `force: true`. `runtime.heatwatch: false` stops the gateway asking Heatwatch. — Gateway 0.74.0+. */
|
|
1742
1767
|
plan(query?: {
|
|
1743
1768
|
service?: string;
|
|
@@ -1889,6 +1914,14 @@ export declare class SkillsApi {
|
|
|
1889
1914
|
}, opts?: RequestOptions): Promise<{
|
|
1890
1915
|
skill: T.Skill | null;
|
|
1891
1916
|
}>;
|
|
1917
|
+
/** One reference file a packaged skill ships — what a model opens when the skill's prompt points at it. — Gateway 0.11.4+. */
|
|
1918
|
+
file(skillId: string, path: string, query?: {
|
|
1919
|
+
workdir?: string;
|
|
1920
|
+
}, opts?: RequestOptions): Promise<{
|
|
1921
|
+
ok: boolean;
|
|
1922
|
+
path?: string;
|
|
1923
|
+
text: string;
|
|
1924
|
+
}>;
|
|
1892
1925
|
}
|
|
1893
1926
|
/** Remote agents reached over the Agent2Agent protocol — discovery, messages, tasks. */
|
|
1894
1927
|
export declare class A2aApi {
|
package/dist/api.generated.js
CHANGED
|
@@ -66,6 +66,7 @@ export const OPERATIONS = {
|
|
|
66
66
|
"agents.rate": { id: "agents.rate", method: "POST", path: "/v1/agents/{agentId}/scorecard", auth: "open", since: "0.6.87", stream: null, pathParams: ["agentId"], queryParams: [] },
|
|
67
67
|
"capabilities.list": { id: "capabilities.list", method: "GET", path: "/v1/capabilities", auth: "open", since: "0.13.0", stream: null, pathParams: [], queryParams: [] },
|
|
68
68
|
"runtime.status": { id: "runtime.status", method: "GET", path: "/v1/runtime", auth: "open", since: "0.19.0", stream: null, pathParams: [], queryParams: [] },
|
|
69
|
+
"runtime.recipe": { id: "runtime.recipe", method: "GET", path: "/v1/runtime/recipe", auth: "token", since: "0.122.0", stream: null, pathParams: [], queryParams: ["service", "model"] },
|
|
69
70
|
"runtime.plan": { id: "runtime.plan", method: "GET", path: "/v1/runtime/plan", auth: "open", since: "0.74.0", stream: null, pathParams: [], queryParams: ["service", "model", "ctx", "need_mb"] },
|
|
70
71
|
"runtime.engine": { id: "runtime.engine", method: "POST", path: "/v1/runtime/engines/{name}", auth: "token", since: "0.19.0", stream: null, pathParams: ["name"], queryParams: [] },
|
|
71
72
|
"runtime.service": { id: "runtime.service", method: "POST", path: "/v1/runtime/services/{id}", auth: "token", since: "0.19.0", stream: null, pathParams: ["id"], queryParams: [] },
|
|
@@ -113,6 +114,7 @@ export const OPERATIONS = {
|
|
|
113
114
|
"agents.exportDef": { id: "agents.exportDef", method: "POST", path: "/agent-defs/export", auth: "token", since: "0.48.0", stream: null, pathParams: [], queryParams: [] },
|
|
114
115
|
"skills.list": { id: "skills.list", method: "GET", path: "/skills", auth: "open", since: "0.6.64", stream: null, pathParams: [], queryParams: ["workdir"] },
|
|
115
116
|
"skills.get": { id: "skills.get", method: "GET", path: "/skills/{skillId}", auth: "open", since: "0.6.67", stream: null, pathParams: ["skillId"], queryParams: ["workdir"] },
|
|
117
|
+
"skills.file": { id: "skills.file", method: "GET", path: "/skills/{skillId}/file/{path}", auth: "open", since: "0.11.4", stream: null, pathParams: ["skillId", "path"], queryParams: ["workdir"] },
|
|
116
118
|
"fusions.list": { id: "fusions.list", method: "GET", path: "/v1/fusions", auth: "open", since: "0.33.0", stream: null, pathParams: [], queryParams: [] },
|
|
117
119
|
"browser.status": { id: "browser.status", method: "GET", path: "/v1/browser", auth: "token", since: "0.59.0", stream: null, pathParams: [], queryParams: [] },
|
|
118
120
|
"browser.call": { id: "browser.call", method: "POST", path: "/v1/browser/call", auth: "token", since: "0.59.0", stream: null, pathParams: [], queryParams: [] },
|
|
@@ -497,6 +499,10 @@ export class RuntimeApi {
|
|
|
497
499
|
status(opts) {
|
|
498
500
|
return this.rt.request(OPERATIONS["runtime.status"], { path: {}, query: undefined, headers: opts?.headers, body: undefined, opts });
|
|
499
501
|
}
|
|
502
|
+
/** What a GGUF repo runs as on this machine, before anything is downloaded. For llama.cpp: the repo's file list read from Hugging Face, and 64 KB of one weights file's header for its architecture. Answers the quant picked (Q4_K_M when none is named), every quant with its size and whether it fits in about three quarters of the machine's memory, the vision projector and the speculative-decoding draft the repo ships (with the `--spec-type` its name means), and the layout chosen — `alt` when the repo also carries the weights as `.gguf_file` and only that layout is one the installed llama.cpp knows. A repo whose architecture the installed llama.cpp cannot load is a 400 with `code: unsupported_arch`. Nothing is saved; a start pulls the same recipe. — Requires the gateway token. Gateway 0.122.0+. */
|
|
503
|
+
recipe(query, opts) {
|
|
504
|
+
return this.rt.request(OPERATIONS["runtime.recipe"], { path: {}, query: query, headers: opts?.headers, body: undefined, opts });
|
|
505
|
+
}
|
|
500
506
|
/** Will this local model run now? Weights + the KV cache for the context + 10% headroom, against what is free. Checked against what Heatwatch (an optional macOS tool on `127.0.0.1:7878`) says is reclaimable NOW, with the apps to close when it is short — or, without Heatwatch, against the machine's total memory, and `source` says which (`heatwatch` | `total-memory`). The KV cache is counted from the model's `config.json` when it is in the gateway's model cache (`contextCounted` says whether it was). A model the catalogue does not list needs `need_mb`. A native service's start makes the same check and refuses a model that does not fit what is free, unless the start says `force: true`. `runtime.heatwatch: false` stops the gateway asking Heatwatch. — Gateway 0.74.0+. */
|
|
501
507
|
plan(query, opts) {
|
|
502
508
|
return this.rt.request(OPERATIONS["runtime.plan"], { path: {}, query: query, headers: opts?.headers, body: undefined, opts });
|
|
@@ -653,6 +659,10 @@ export class SkillsApi {
|
|
|
653
659
|
get(skillId, query, opts) {
|
|
654
660
|
return this.rt.request(OPERATIONS["skills.get"], { path: { skillId }, query: query, headers: opts?.headers, body: undefined, opts });
|
|
655
661
|
}
|
|
662
|
+
/** One reference file a packaged skill ships — what a model opens when the skill's prompt points at it. — Gateway 0.11.4+. */
|
|
663
|
+
file(skillId, path, query, opts) {
|
|
664
|
+
return this.rt.request(OPERATIONS["skills.file"], { path: { skillId, path }, query: query, headers: opts?.headers, body: undefined, opts });
|
|
665
|
+
}
|
|
656
666
|
}
|
|
657
667
|
/** Remote agents reached over the Agent2Agent protocol — discovery, messages, tasks. */
|
|
658
668
|
export class A2aApi {
|
|
@@ -175,6 +175,37 @@ export interface RuntimeActionResult {
|
|
|
175
175
|
note?: string;
|
|
176
176
|
plan?: RuntimePlan;
|
|
177
177
|
}
|
|
178
|
+
export interface RuntimeRecipe {
|
|
179
|
+
ok: boolean;
|
|
180
|
+
/** owner/name:QUANT — what to pass as the service's model. */
|
|
181
|
+
model: string;
|
|
182
|
+
quant: string;
|
|
183
|
+
/** The weights' general.architecture; null when the header could not be read. */
|
|
184
|
+
arch?: string | null;
|
|
185
|
+
layout?: "main" | "alt";
|
|
186
|
+
/** The weights file in the repo (the first shard of a split model). */
|
|
187
|
+
main?: string;
|
|
188
|
+
/** Bytes of the weights for this quant. */
|
|
189
|
+
size?: number;
|
|
190
|
+
/** Weights + projector + draft against about three quarters of the memory; null when the memory is unknown. */
|
|
191
|
+
fits?: boolean | null;
|
|
192
|
+
ramGB?: number;
|
|
193
|
+
quants: Array<{
|
|
194
|
+
quant: string;
|
|
195
|
+
size: number;
|
|
196
|
+
fits?: boolean | null;
|
|
197
|
+
}>;
|
|
198
|
+
projector?: null | {
|
|
199
|
+
path: string;
|
|
200
|
+
size?: number;
|
|
201
|
+
};
|
|
202
|
+
draft?: null | {
|
|
203
|
+
path: string;
|
|
204
|
+
size?: number;
|
|
205
|
+
/** llama-server --spec-type: draft-dspark, draft-mtp, draft-eagle3, draft-dflash or draft-simple. */
|
|
206
|
+
spec: string;
|
|
207
|
+
};
|
|
208
|
+
}
|
|
178
209
|
/** Whether a local model fits in memory (gateway 0.74+) — `GET /v1/runtime/plan`, and on a start the live-memory check refused. */
|
|
179
210
|
export interface RuntimePlan {
|
|
180
211
|
ok: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chatpanel/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
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",
|