@chatpanel/sdk 0.38.0 → 0.39.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 +18 -0
- package/dist/api.generated.js +5 -0
- package/dist/types.generated.d.ts +19 -0
- package/package.json +1 -1
package/dist/api.generated.d.ts
CHANGED
|
@@ -1402,6 +1402,16 @@ export declare const OPERATIONS: {
|
|
|
1402
1402
|
readonly pathParams: readonly ["contextId"];
|
|
1403
1403
|
readonly queryParams: readonly [];
|
|
1404
1404
|
};
|
|
1405
|
+
readonly "contexts.turn": {
|
|
1406
|
+
readonly id: "contexts.turn";
|
|
1407
|
+
readonly method: "GET";
|
|
1408
|
+
readonly path: "/v1/contexts/turn";
|
|
1409
|
+
readonly auth: "token";
|
|
1410
|
+
readonly since: "0.162.0";
|
|
1411
|
+
readonly stream: null;
|
|
1412
|
+
readonly pathParams: readonly [];
|
|
1413
|
+
readonly queryParams: readonly ["chat", "named"];
|
|
1414
|
+
};
|
|
1405
1415
|
readonly "contexts.resources": {
|
|
1406
1416
|
readonly id: "contexts.resources";
|
|
1407
1417
|
readonly method: "POST";
|
|
@@ -2409,6 +2419,14 @@ export declare class ContextsApi {
|
|
|
2409
2419
|
ok: boolean;
|
|
2410
2420
|
context: T.Context;
|
|
2411
2421
|
}>;
|
|
2422
|
+
/** What a chat turn inside its binders is given — the members to search first and only, a hint line, the binders' instructions, the knowledge bases its refs bring, the tools it narrows to. For a client that holds no records of its own (a CLI, a phone, an eval): the binders `chat` is filed in and those `named`, only the ones the caller may use. `turn` is null when the chat is in none. — Requires the gateway token. Gateway 0.162.0+. */
|
|
2423
|
+
turn(query: {
|
|
2424
|
+
chat: string;
|
|
2425
|
+
named?: string;
|
|
2426
|
+
}, opts?: RequestOptions): Promise<{
|
|
2427
|
+
ok: boolean;
|
|
2428
|
+
turn: T.ContextTurn;
|
|
2429
|
+
}>;
|
|
2412
2430
|
/** Add or take out members and refs in one typed list — the industry's `resources` (a Copilot Space's, an Anthropic session's). A string `chat:`/`note:`/`meeting:`/`brief:` is a member; `kb:`, `folder:`, `gw:`, `copilot-space:`, `vector-store:`, `file-search-store:`, `notebook:`, `bedrock:` or `mcp-resource:` is a ref, by reference — or `{ type, id, name, noAccess }`. Needs the edit role. Each item keeps its own clock, so two devices editing at once both count. — Requires the gateway token. Gateway 0.156.0+. */
|
|
2413
2431
|
resources(contextId: string, body: {
|
|
2414
2432
|
add?: Array<string | T.ContextRef>;
|
package/dist/api.generated.js
CHANGED
|
@@ -140,6 +140,7 @@ export const OPERATIONS = {
|
|
|
140
140
|
"contexts.remove": { id: "contexts.remove", method: "DELETE", path: "/v1/contexts/{contextId}", auth: "token", since: "0.141.0", stream: null, pathParams: ["contextId"], queryParams: [] },
|
|
141
141
|
"contexts.edit": { id: "contexts.edit", method: "PATCH", path: "/v1/contexts/{contextId}", auth: "token", since: "0.141.0", stream: null, pathParams: ["contextId"], queryParams: [] },
|
|
142
142
|
"contexts.items": { id: "contexts.items", method: "POST", path: "/v1/contexts/{contextId}/items", auth: "token", since: "0.141.0", stream: null, pathParams: ["contextId"], queryParams: [] },
|
|
143
|
+
"contexts.turn": { id: "contexts.turn", method: "GET", path: "/v1/contexts/turn", auth: "token", since: "0.162.0", stream: null, pathParams: [], queryParams: ["chat", "named"] },
|
|
143
144
|
"contexts.resources": { id: "contexts.resources", method: "POST", path: "/v1/contexts/{contextId}/resources", auth: "token", since: "0.156.0", stream: null, pathParams: ["contextId"], queryParams: [] },
|
|
144
145
|
"contexts.people": { id: "contexts.people", method: "POST", path: "/v1/contexts/{contextId}/people", auth: "token", since: "0.156.0", stream: null, pathParams: ["contextId"], queryParams: [] },
|
|
145
146
|
"contexts.scope": { id: "contexts.scope", method: "GET", path: "/v1/contexts/{contextId}/scope", auth: "token", since: "0.141.0", stream: null, pathParams: ["contextId"], queryParams: [] },
|
|
@@ -831,6 +832,10 @@ export class ContextsApi {
|
|
|
831
832
|
items(contextId, body, opts) {
|
|
832
833
|
return this.rt.request(OPERATIONS["contexts.items"], { path: { contextId }, query: undefined, headers: opts?.headers, body: body, opts });
|
|
833
834
|
}
|
|
835
|
+
/** What a chat turn inside its binders is given — the members to search first and only, a hint line, the binders' instructions, the knowledge bases its refs bring, the tools it narrows to. For a client that holds no records of its own (a CLI, a phone, an eval): the binders `chat` is filed in and those `named`, only the ones the caller may use. `turn` is null when the chat is in none. — Requires the gateway token. Gateway 0.162.0+. */
|
|
836
|
+
turn(query, opts) {
|
|
837
|
+
return this.rt.request(OPERATIONS["contexts.turn"], { path: {}, query: query, headers: opts?.headers, body: undefined, opts });
|
|
838
|
+
}
|
|
834
839
|
/** Add or take out members and refs in one typed list — the industry's `resources` (a Copilot Space's, an Anthropic session's). A string `chat:`/`note:`/`meeting:`/`brief:` is a member; `kb:`, `folder:`, `gw:`, `copilot-space:`, `vector-store:`, `file-search-store:`, `notebook:`, `bedrock:` or `mcp-resource:` is a ref, by reference — or `{ type, id, name, noAccess }`. Needs the edit role. Each item keeps its own clock, so two devices editing at once both count. — Requires the gateway token. Gateway 0.156.0+. */
|
|
835
840
|
resources(contextId, body, opts) {
|
|
836
841
|
return this.rt.request(OPERATIONS["contexts.resources"], { path: { contextId }, query: undefined, headers: opts?.headers, body: body, opts });
|
|
@@ -23,6 +23,25 @@ export interface Context {
|
|
|
23
23
|
skills?: Array<string> | null;
|
|
24
24
|
access?: ContextAccess;
|
|
25
25
|
}
|
|
26
|
+
export type ContextTurn = {
|
|
27
|
+
/** The binders' members — searched first and only. */
|
|
28
|
+
ids?: Array<string>;
|
|
29
|
+
/** One line for the hint on the last user message. */
|
|
30
|
+
line?: string;
|
|
31
|
+
/** The binders' instructions */
|
|
32
|
+
instructions?: string;
|
|
33
|
+
bases?: Array<{
|
|
34
|
+
id?: string;
|
|
35
|
+
title?: string;
|
|
36
|
+
folder?: boolean;
|
|
37
|
+
}>;
|
|
38
|
+
tools?: {
|
|
39
|
+
mcp_servers?: Array<string> | null;
|
|
40
|
+
skills?: Array<string> | null;
|
|
41
|
+
};
|
|
42
|
+
names?: Array<string>;
|
|
43
|
+
contextIds?: Array<string>;
|
|
44
|
+
} | null;
|
|
26
45
|
export interface ContextRef {
|
|
27
46
|
/** `<type>:<id>`. */
|
|
28
47
|
key: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chatpanel/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.39.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",
|