@chatpanel/sdk 0.36.0 → 0.38.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.
@@ -972,6 +972,26 @@ export declare const OPERATIONS: {
972
972
  readonly pathParams: readonly ["id"];
973
973
  readonly queryParams: readonly [];
974
974
  };
975
+ readonly "knowledge.instructions": {
976
+ readonly id: "knowledge.instructions";
977
+ readonly method: "GET";
978
+ readonly path: "/v1/kb/{id}/instructions";
979
+ readonly auth: "open";
980
+ readonly since: "0.155.0";
981
+ readonly stream: null;
982
+ readonly pathParams: readonly ["id"];
983
+ readonly queryParams: readonly [];
984
+ };
985
+ readonly "knowledge.setInstructions": {
986
+ readonly id: "knowledge.setInstructions";
987
+ readonly method: "POST";
988
+ readonly path: "/v1/kb/{id}/instructions";
989
+ readonly auth: "token";
990
+ readonly since: "0.155.0";
991
+ readonly stream: null;
992
+ readonly pathParams: readonly ["id"];
993
+ readonly queryParams: readonly [];
994
+ };
975
995
  readonly "knowledge.embed": {
976
996
  readonly id: "knowledge.embed";
977
997
  readonly method: "POST";
@@ -1316,7 +1336,7 @@ export declare const OPERATIONS: {
1316
1336
  readonly id: "contexts.list";
1317
1337
  readonly method: "GET";
1318
1338
  readonly path: "/v1/contexts";
1319
- readonly auth: "open";
1339
+ readonly auth: "token";
1320
1340
  readonly since: "0.141.0";
1321
1341
  readonly stream: null;
1322
1342
  readonly pathParams: readonly [];
@@ -1336,7 +1356,7 @@ export declare const OPERATIONS: {
1336
1356
  readonly id: "contexts.suggest";
1337
1357
  readonly method: "POST";
1338
1358
  readonly path: "/v1/contexts/suggest";
1339
- readonly auth: "open";
1359
+ readonly auth: "token";
1340
1360
  readonly since: "0.141.0";
1341
1361
  readonly stream: null;
1342
1362
  readonly pathParams: readonly [];
@@ -1346,7 +1366,7 @@ export declare const OPERATIONS: {
1346
1366
  readonly id: "contexts.get";
1347
1367
  readonly method: "GET";
1348
1368
  readonly path: "/v1/contexts/{contextId}";
1349
- readonly auth: "open";
1369
+ readonly auth: "token";
1350
1370
  readonly since: "0.141.0";
1351
1371
  readonly stream: null;
1352
1372
  readonly pathParams: readonly ["contextId"];
@@ -1382,11 +1402,31 @@ export declare const OPERATIONS: {
1382
1402
  readonly pathParams: readonly ["contextId"];
1383
1403
  readonly queryParams: readonly [];
1384
1404
  };
1405
+ readonly "contexts.resources": {
1406
+ readonly id: "contexts.resources";
1407
+ readonly method: "POST";
1408
+ readonly path: "/v1/contexts/{contextId}/resources";
1409
+ readonly auth: "token";
1410
+ readonly since: "0.156.0";
1411
+ readonly stream: null;
1412
+ readonly pathParams: readonly ["contextId"];
1413
+ readonly queryParams: readonly [];
1414
+ };
1415
+ readonly "contexts.people": {
1416
+ readonly id: "contexts.people";
1417
+ readonly method: "POST";
1418
+ readonly path: "/v1/contexts/{contextId}/people";
1419
+ readonly auth: "token";
1420
+ readonly since: "0.156.0";
1421
+ readonly stream: null;
1422
+ readonly pathParams: readonly ["contextId"];
1423
+ readonly queryParams: readonly [];
1424
+ };
1385
1425
  readonly "contexts.scope": {
1386
1426
  readonly id: "contexts.scope";
1387
1427
  readonly method: "GET";
1388
1428
  readonly path: "/v1/contexts/{contextId}/scope";
1389
- readonly auth: "open";
1429
+ readonly auth: "token";
1390
1430
  readonly since: "0.141.0";
1391
1431
  readonly stream: null;
1392
1432
  readonly pathParams: readonly ["contextId"];
@@ -2116,6 +2156,10 @@ export declare class KnowledgeApi {
2116
2156
  access(id: string, opts?: RequestOptions): Promise<T.KbAccessResponse>;
2117
2157
  /** Grant a base to every agent or to the ones named — the owner's act. Grants (docs/knowledge-base.md §3, "knowledge is granted like skills"): a caller with the token or the extension's origin is the owner and reaches every base; any other caller names itself (`X-ChatPanel-Agent: claude`, or `?agent=`) — the gateway's own MCP server sends the connected client's name — and reaches the bases whose `access.agents` is `all` (the default) or names it. `GET /v1/kb` lists only those; a base not granted reads as 404 to that caller. — Requires the gateway token. Gateway 0.101.1+. */
2118
2158
  setAccess(id: string, body: T.KbAccessRequest, opts?: RequestOptions): Promise<T.KbAccessResponse>;
2159
+ /** How a model should answer from a base — its administrator's instructions, or null. Anyone the base is granted to reads them; they also come with the base's status (`kb.instructions`) and every search answer (`instructions`), so a client that only attaches the base gets them. A person's own instructions for a base live in their settings (`ui.kbPrompts`) and are layered after these, unless `personal` is `off`. — Gateway 0.155.0+. */
2160
+ instructions(id: string, opts?: RequestOptions): Promise<T.KbInstructionsResponse>;
2161
+ /** Set a base's instructions — the administrator's act (this gateway's token). Either part may be sent alone: `text` ('' clears it, at most 4000 characters) and `personal` (`allow`, the default, or `off` — a person's own instructions are then not sent with this base). A member of a hosted gateway cannot change them. A team base copied from its bucket answers 409 `read_only`: its builder sets them. — Requires the gateway token. Gateway 0.155.0+. */
2162
+ setInstructions(id: string, body: T.KbInstructionsRequest, opts?: RequestOptions): Promise<T.KbInstructionsResponse>;
2119
2163
  /** Embed every passage that has no vector yet, and say where the embedder stands. — Gateway 0.101.0+. */
2120
2164
  embed(id: string, body: Record<string, never>, opts?: RequestOptions): Promise<T.KbEmbedResponse>;
2121
2165
  /** Keep a folder in a base — read only what is new or changed, drop what is gone. A folder becomes a SOURCE of its base (events kb-folder-sync.js). The first sync makes the base when it does not exist (named after the folder) and reads every file once; each later sync lists the folder — sizes and times, nothing opened — and reads only new and changed files, a changed file REPLACING its document (its id is fixed by its path), a deleted one leaving the base. The walk refuses what a first add refuses: credential stores named as withheld, links out of the folder, the size and count limits. A path is a read on this machine, so this is the owner's only. — Requires the gateway token. Gateway 0.142.0+. */
@@ -2312,7 +2356,7 @@ export declare class A2aApi {
2312
2356
  export declare class ContextsApi {
2313
2357
  private readonly rt;
2314
2358
  constructor(rt: Runtime);
2315
- /** The person's contexts — what their chats, notes and meetings are about — with what each holds. A context groups chats, notes and meetings across kinds ("Product launch", "Kitchen remodel"). It is a record in the library every client syncs, so one made here appears in the panel, the desktop and the phones on their next pull. Busiest first. — Gateway 0.141.0+. */
2359
+ /** The person's contexts — what their chats, notes and meetings are about — with what each holds. A context groups chats, notes and meetings across kinds ("Product launch", "Kitchen remodel"). It is a record in the library every client syncs, so one made here appears in the panel, the desktop and the phones on their next pull. Busiest first. — Requires the gateway token. Gateway 0.141.0+. */
2316
2360
  list(opts?: RequestOptions): Promise<{
2317
2361
  ok: boolean;
2318
2362
  contexts: Array<T.Context>;
@@ -2322,7 +2366,7 @@ export declare class ContextsApi {
2322
2366
  ok: boolean;
2323
2367
  context: T.Context;
2324
2368
  }>;
2325
- /** Which contexts a chat, note or meeting probably belongs to — a suggestion, never filed by itself. By words — the item's title and text against each context's name, keywords and what it already holds. Pass an item's `id`, or a `title` and `text` for something not saved yet. — Gateway 0.141.0+. */
2369
+ /** Which contexts a chat, note or meeting probably belongs to — a suggestion, never filed by itself. By words — the item's title and text against each context's name, keywords and what it already holds. Pass an item's `id`, or a `title` and `text` for something not saved yet. — Requires the gateway token. Gateway 0.141.0+. */
2326
2370
  suggest(body: {
2327
2371
  id?: string;
2328
2372
  title?: string;
@@ -2337,7 +2381,7 @@ export declare class ContextsApi {
2337
2381
  why: string;
2338
2382
  }>;
2339
2383
  }>;
2340
- /** A context and what it holds — each item by id, kind and title, never its body. — Gateway 0.141.0+. */
2384
+ /** A context and what it holds — each item by id, kind and title, never its body. — Requires the gateway token. Gateway 0.141.0+. */
2341
2385
  get(contextId: string, opts?: RequestOptions): Promise<{
2342
2386
  ok: boolean;
2343
2387
  context: T.Context;
@@ -2365,7 +2409,22 @@ export declare class ContextsApi {
2365
2409
  ok: boolean;
2366
2410
  context: T.Context;
2367
2411
  }>;
2368
- /** What a turn inside a context searches (its item ids) and the one line it is told. — Gateway 0.141.0+. */
2412
+ /** 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
+ resources(contextId: string, body: {
2414
+ add?: Array<string | T.ContextRef>;
2415
+ remove?: Array<string | T.ContextRef>;
2416
+ }, opts?: RequestOptions): Promise<{
2417
+ ok: boolean;
2418
+ context: T.Context;
2419
+ }>;
2420
+ /** Share a context with people or groups by role, or take them off (null). Needs the manage role. — Requires the gateway token. Gateway 0.156.0+. */
2421
+ people(contextId: string, body: {
2422
+ [key: string]: "viewer" | "editor" | "manager" | null;
2423
+ }, opts?: RequestOptions): Promise<{
2424
+ ok: boolean;
2425
+ context: T.Context;
2426
+ }>;
2427
+ /** What a turn inside a context searches (its item ids) and the one line it is told. — Requires the gateway token. Gateway 0.141.0+. */
2369
2428
  scope(contextId: string, opts?: RequestOptions): Promise<{
2370
2429
  ok: boolean;
2371
2430
  ids: Array<string>;
@@ -97,6 +97,8 @@ export const OPERATIONS = {
97
97
  "knowledge.noteStatus": { id: "knowledge.noteStatus", method: "POST", path: "/v1/kb/{id}/notes/{note}", auth: "token", since: "0.101.0", stream: null, pathParams: ["id", "note"], queryParams: [] },
98
98
  "knowledge.access": { id: "knowledge.access", method: "GET", path: "/v1/kb/{id}/access", auth: "open", since: "0.101.1", stream: null, pathParams: ["id"], queryParams: [] },
99
99
  "knowledge.setAccess": { id: "knowledge.setAccess", method: "POST", path: "/v1/kb/{id}/access", auth: "token", since: "0.101.1", stream: null, pathParams: ["id"], queryParams: [] },
100
+ "knowledge.instructions": { id: "knowledge.instructions", method: "GET", path: "/v1/kb/{id}/instructions", auth: "open", since: "0.155.0", stream: null, pathParams: ["id"], queryParams: [] },
101
+ "knowledge.setInstructions": { id: "knowledge.setInstructions", method: "POST", path: "/v1/kb/{id}/instructions", auth: "token", since: "0.155.0", stream: null, pathParams: ["id"], queryParams: [] },
100
102
  "knowledge.embed": { id: "knowledge.embed", method: "POST", path: "/v1/kb/{id}/embed", auth: "open", since: "0.101.0", stream: null, pathParams: ["id"], queryParams: [] },
101
103
  "knowledge.sync": { id: "knowledge.sync", method: "POST", path: "/v1/kb/{id}/sync", auth: "token", since: "0.142.0", stream: null, pathParams: ["id"], queryParams: [] },
102
104
  "knowledge.pages": { id: "knowledge.pages", method: "GET", path: "/v1/kb/{id}/pages", auth: "open", since: "0.147.0", stream: null, pathParams: ["id"], queryParams: ["doc"] },
@@ -131,14 +133,16 @@ export const OPERATIONS = {
131
133
  "skills.list": { id: "skills.list", method: "GET", path: "/skills", auth: "open", since: "0.6.64", stream: null, pathParams: [], queryParams: ["workdir"] },
132
134
  "skills.get": { id: "skills.get", method: "GET", path: "/skills/{skillId}", auth: "open", since: "0.6.67", stream: null, pathParams: ["skillId"], queryParams: ["workdir"] },
133
135
  "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"] },
134
- "contexts.list": { id: "contexts.list", method: "GET", path: "/v1/contexts", auth: "open", since: "0.141.0", stream: null, pathParams: [], queryParams: [] },
136
+ "contexts.list": { id: "contexts.list", method: "GET", path: "/v1/contexts", auth: "token", since: "0.141.0", stream: null, pathParams: [], queryParams: [] },
135
137
  "contexts.create": { id: "contexts.create", method: "POST", path: "/v1/contexts", auth: "token", since: "0.141.0", stream: null, pathParams: [], queryParams: [] },
136
- "contexts.suggest": { id: "contexts.suggest", method: "POST", path: "/v1/contexts/suggest", auth: "open", since: "0.141.0", stream: null, pathParams: [], queryParams: [] },
137
- "contexts.get": { id: "contexts.get", method: "GET", path: "/v1/contexts/{contextId}", auth: "open", since: "0.141.0", stream: null, pathParams: ["contextId"], queryParams: [] },
138
+ "contexts.suggest": { id: "contexts.suggest", method: "POST", path: "/v1/contexts/suggest", auth: "token", since: "0.141.0", stream: null, pathParams: [], queryParams: [] },
139
+ "contexts.get": { id: "contexts.get", method: "GET", path: "/v1/contexts/{contextId}", auth: "token", since: "0.141.0", stream: null, pathParams: ["contextId"], queryParams: [] },
138
140
  "contexts.remove": { id: "contexts.remove", method: "DELETE", path: "/v1/contexts/{contextId}", auth: "token", since: "0.141.0", stream: null, pathParams: ["contextId"], queryParams: [] },
139
141
  "contexts.edit": { id: "contexts.edit", method: "PATCH", path: "/v1/contexts/{contextId}", auth: "token", since: "0.141.0", stream: null, pathParams: ["contextId"], queryParams: [] },
140
142
  "contexts.items": { id: "contexts.items", method: "POST", path: "/v1/contexts/{contextId}/items", auth: "token", since: "0.141.0", stream: null, pathParams: ["contextId"], queryParams: [] },
141
- "contexts.scope": { id: "contexts.scope", method: "GET", path: "/v1/contexts/{contextId}/scope", auth: "open", since: "0.141.0", stream: null, pathParams: ["contextId"], queryParams: [] },
143
+ "contexts.resources": { id: "contexts.resources", method: "POST", path: "/v1/contexts/{contextId}/resources", auth: "token", since: "0.156.0", stream: null, pathParams: ["contextId"], queryParams: [] },
144
+ "contexts.people": { id: "contexts.people", method: "POST", path: "/v1/contexts/{contextId}/people", auth: "token", since: "0.156.0", stream: null, pathParams: ["contextId"], queryParams: [] },
145
+ "contexts.scope": { id: "contexts.scope", method: "GET", path: "/v1/contexts/{contextId}/scope", auth: "token", since: "0.141.0", stream: null, pathParams: ["contextId"], queryParams: [] },
142
146
  "fusions.list": { id: "fusions.list", method: "GET", path: "/v1/fusions", auth: "open", since: "0.33.0", stream: null, pathParams: [], queryParams: [] },
143
147
  "browser.status": { id: "browser.status", method: "GET", path: "/v1/browser", auth: "token", since: "0.59.0", stream: null, pathParams: [], queryParams: [] },
144
148
  "browser.call": { id: "browser.call", method: "POST", path: "/v1/browser/call", auth: "token", since: "0.59.0", stream: null, pathParams: [], queryParams: [] },
@@ -649,6 +653,14 @@ export class KnowledgeApi {
649
653
  setAccess(id, body, opts) {
650
654
  return this.rt.request(OPERATIONS["knowledge.setAccess"], { path: { id }, query: undefined, headers: opts?.headers, body: body, opts });
651
655
  }
656
+ /** How a model should answer from a base — its administrator's instructions, or null. Anyone the base is granted to reads them; they also come with the base's status (`kb.instructions`) and every search answer (`instructions`), so a client that only attaches the base gets them. A person's own instructions for a base live in their settings (`ui.kbPrompts`) and are layered after these, unless `personal` is `off`. — Gateway 0.155.0+. */
657
+ instructions(id, opts) {
658
+ return this.rt.request(OPERATIONS["knowledge.instructions"], { path: { id }, query: undefined, headers: opts?.headers, body: undefined, opts });
659
+ }
660
+ /** Set a base's instructions — the administrator's act (this gateway's token). Either part may be sent alone: `text` ('' clears it, at most 4000 characters) and `personal` (`allow`, the default, or `off` — a person's own instructions are then not sent with this base). A member of a hosted gateway cannot change them. A team base copied from its bucket answers 409 `read_only`: its builder sets them. — Requires the gateway token. Gateway 0.155.0+. */
661
+ setInstructions(id, body, opts) {
662
+ return this.rt.request(OPERATIONS["knowledge.setInstructions"], { path: { id }, query: undefined, headers: opts?.headers, body: body, opts });
663
+ }
652
664
  /** Embed every passage that has no vector yet, and say where the embedder stands. — Gateway 0.101.0+. */
653
665
  embed(id, body, opts) {
654
666
  return this.rt.request(OPERATIONS["knowledge.embed"], { path: { id }, query: undefined, headers: opts?.headers, body: body, opts });
@@ -791,7 +803,7 @@ export class A2aApi {
791
803
  export class ContextsApi {
792
804
  rt;
793
805
  constructor(rt) { this.rt = rt; }
794
- /** The person's contexts — what their chats, notes and meetings are about — with what each holds. A context groups chats, notes and meetings across kinds ("Product launch", "Kitchen remodel"). It is a record in the library every client syncs, so one made here appears in the panel, the desktop and the phones on their next pull. Busiest first. — Gateway 0.141.0+. */
806
+ /** The person's contexts — what their chats, notes and meetings are about — with what each holds. A context groups chats, notes and meetings across kinds ("Product launch", "Kitchen remodel"). It is a record in the library every client syncs, so one made here appears in the panel, the desktop and the phones on their next pull. Busiest first. — Requires the gateway token. Gateway 0.141.0+. */
795
807
  list(opts) {
796
808
  return this.rt.request(OPERATIONS["contexts.list"], { path: {}, query: undefined, headers: opts?.headers, body: undefined, opts });
797
809
  }
@@ -799,11 +811,11 @@ export class ContextsApi {
799
811
  create(body, opts) {
800
812
  return this.rt.request(OPERATIONS["contexts.create"], { path: {}, query: undefined, headers: opts?.headers, body: body, opts });
801
813
  }
802
- /** Which contexts a chat, note or meeting probably belongs to — a suggestion, never filed by itself. By words — the item's title and text against each context's name, keywords and what it already holds. Pass an item's `id`, or a `title` and `text` for something not saved yet. — Gateway 0.141.0+. */
814
+ /** Which contexts a chat, note or meeting probably belongs to — a suggestion, never filed by itself. By words — the item's title and text against each context's name, keywords and what it already holds. Pass an item's `id`, or a `title` and `text` for something not saved yet. — Requires the gateway token. Gateway 0.141.0+. */
803
815
  suggest(body, opts) {
804
816
  return this.rt.request(OPERATIONS["contexts.suggest"], { path: {}, query: undefined, headers: opts?.headers, body: body, opts });
805
817
  }
806
- /** A context and what it holds — each item by id, kind and title, never its body. — Gateway 0.141.0+. */
818
+ /** A context and what it holds — each item by id, kind and title, never its body. — Requires the gateway token. Gateway 0.141.0+. */
807
819
  get(contextId, opts) {
808
820
  return this.rt.request(OPERATIONS["contexts.get"], { path: { contextId }, query: undefined, headers: opts?.headers, body: undefined, opts });
809
821
  }
@@ -819,7 +831,15 @@ export class ContextsApi {
819
831
  items(contextId, body, opts) {
820
832
  return this.rt.request(OPERATIONS["contexts.items"], { path: { contextId }, query: undefined, headers: opts?.headers, body: body, opts });
821
833
  }
822
- /** What a turn inside a context searches (its item ids) and the one line it is told. — Gateway 0.141.0+. */
834
+ /** 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
+ resources(contextId, body, opts) {
836
+ return this.rt.request(OPERATIONS["contexts.resources"], { path: { contextId }, query: undefined, headers: opts?.headers, body: body, opts });
837
+ }
838
+ /** Share a context with people or groups by role, or take them off (null). Needs the manage role. — Requires the gateway token. Gateway 0.156.0+. */
839
+ people(contextId, body, opts) {
840
+ return this.rt.request(OPERATIONS["contexts.people"], { path: { contextId }, query: undefined, headers: opts?.headers, body: body, opts });
841
+ }
842
+ /** What a turn inside a context searches (its item ids) and the one line it is told. — Requires the gateway token. Gateway 0.141.0+. */
823
843
  scope(contextId, opts) {
824
844
  return this.rt.request(OPERATIONS["contexts.scope"], { path: { contextId }, query: undefined, headers: opts?.headers, body: undefined, opts });
825
845
  }
@@ -13,12 +13,52 @@ export interface Context {
13
13
  /** The newest item's time (ms). */
14
14
  last?: number;
15
15
  updatedAt: number;
16
+ /** How Chap answers inside it (v2, 0.156.0) — empty for a caller without read. */
17
+ instructions?: string;
18
+ /** What it points at, by reference (v2). A ref the caller cannot open in its own system is `locked` (name only) or absent (hidden), as the context's creator chose. */
19
+ refs?: Array<ContextRef>;
20
+ /** The MCP servers a turn inside it may find; null = every one (v2). */
21
+ mcp_servers?: Array<string> | null;
22
+ /** The skills a turn inside it may find; null = every one (v2). */
23
+ skills?: Array<string> | null;
24
+ access?: ContextAccess;
25
+ }
26
+ export interface ContextRef {
27
+ /** `<type>:<id>`. */
28
+ key: string;
29
+ type: "kb" | "folder" | "gw" | "bedrock" | "copilot-space" | "vector-store" | "file-search-store" | "notebook" | "mcp-resource";
30
+ id?: string;
31
+ name?: string;
32
+ provider?: string;
33
+ /** Overrides the context's choice for this ref. */
34
+ noAccess?: "locked" | "hidden";
35
+ /** The caller cannot open it in its own system; only its name is shown. */
36
+ locked?: boolean;
37
+ at?: number;
38
+ }
39
+ /** Who may reach the context — shown to its owner and managers only (v2, 0.156.0). */
40
+ export interface ContextAccess {
41
+ /** Agents that may find and use it, by name; null = none. */
42
+ agents?: Array<string> | null;
43
+ /** A person's id or `group:<id>` → role. */
44
+ people?: {
45
+ [key: string]: "viewer" | "editor" | "manager";
46
+ };
47
+ /** What a viewer sees of a ref they cannot open in its own system. */
48
+ noAccess?: "locked" | "hidden";
16
49
  }
17
50
  export interface ContextEdit {
18
51
  name?: string;
19
52
  color?: "blue" | "orange" | "green" | "purple" | "pink" | "teal" | "gray";
20
53
  about?: string;
21
54
  keywords?: Array<string>;
55
+ instructions?: string;
56
+ mcp_servers?: Array<string> | null;
57
+ skills?: Array<string> | null;
58
+ /** Needs the manage role. */
59
+ noAccess?: "locked" | "hidden";
60
+ /** Needs the manage role. */
61
+ agents?: Array<string> | null;
22
62
  }
23
63
  /** A domain object whose shape is owned by `@chatpanel/events`; the SDK carries it as-is. */
24
64
  export interface AnyObject {
@@ -607,6 +647,24 @@ export interface KbAccessRequest {
607
647
  export interface KbAccessResponse {
608
648
  access: KbAccess;
609
649
  }
650
+ /** A base's own instructions for the model that answers from it, set by its administrator. */
651
+ export interface KbInstructions {
652
+ text: string;
653
+ /** `off`: a person's own instructions are not sent with this base. */
654
+ personal: "allow" | "off";
655
+ /** When they were last set (ms since the epoch). */
656
+ at?: number;
657
+ }
658
+ export interface KbInstructionsRequest {
659
+ /** '' clears them. */
660
+ text?: string;
661
+ personal?: "allow" | "off";
662
+ }
663
+ export interface KbInstructionsResponse {
664
+ instructions: KbInstructions;
665
+ /** May this caller set them — the gateway's token, not a team copy. A client draws one box for a person's own base, the administrator's read-only beside the person's own otherwise. */
666
+ canInstruct?: boolean;
667
+ }
610
668
  export interface KbOkResponse {
611
669
  ok: boolean;
612
670
  }
@@ -926,6 +984,9 @@ export interface KbStatus {
926
984
  /** The tightest provenance of its documents (`internal`, `web`, or empty). */
927
985
  reach?: string;
928
986
  access?: KbAccess;
987
+ instructions?: KbInstructions;
988
+ /** May this caller set the base's instructions (GET /v1/kb/{id} only). */
989
+ canInstruct?: boolean;
929
990
  documents: Array<KbDocument>;
930
991
  /** On disk. */
931
992
  bytes?: number;
@@ -1036,6 +1097,7 @@ export interface KbSearchRequest {
1036
1097
  }
1037
1098
  export interface KbSearchResponse {
1038
1099
  results: Array<KbPassage>;
1100
+ instructions?: KbInstructions;
1039
1101
  /** How many candidates each lane found. */
1040
1102
  lanes: {
1041
1103
  text?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chatpanel/sdk",
3
- "version": "0.36.0",
3
+ "version": "0.38.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",