@openbkn/bkn-sdk 0.1.1-alpha.14 → 0.1.1-alpha.16

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/index.d.ts CHANGED
@@ -59,8 +59,8 @@ interface RawCallResult {
59
59
  }
60
60
 
61
61
  /**
62
- * Admin (operator) client — user-management + authorization. Mirrors
63
- * kweaver-admin. Reads and writes (org/user create/update/delete +
62
+ * Admin (operator) client — user-management + authorization.
63
+ * Reads and writes (org/user create/update/delete +
64
64
  * reset-password) implemented; org/user detail and writes go through ISFWeb
65
65
  * thrift where the REST routes are RegisterPrivate. Passed through as JSON.
66
66
  */
@@ -197,8 +197,8 @@ interface SendChatOptions {
197
197
  }
198
198
 
199
199
  /**
200
- * Agent client (agent-factory v3). Read side + published listing, mirroring
201
- * kweaver-sdk api/agent-list.ts. Responses passed through as parsed JSON.
200
+ * Agent client (agent-factory v3). Read side + published listing.
201
+ * Responses passed through as parsed JSON.
202
202
  * @deprecated The Decision Agent (agent-factory) surface is being phased out and
203
203
  * may be removed in a future release. Avoid building new integrations on it.
204
204
  */
@@ -311,7 +311,7 @@ declare function appKeys(ctx: RequestContext): {
311
311
 
312
312
  /**
313
313
  * Context-loader client over the agent-retrieval MCP endpoint (JSON-RPC).
314
- * Reimplemented slim from kweaver-sdk: initialize → session id →
314
+ * Slim implementation: initialize → session id →
315
315
  * notifications/initialized, then tools/call. Handles plain-JSON and
316
316
  * SSE (`data:`) response bodies. Per-process session cache (5 min TTL).
317
317
  */
@@ -320,6 +320,8 @@ interface SearchSchemaOptions {
320
320
  searchScope?: string[];
321
321
  maxConcepts?: number;
322
322
  }
323
+ /** Progressive KN-detail disclosure level: `summary` (skeleton + property names) | `full`. */
324
+ type DetailLevel = "summary" | "full";
323
325
 
324
326
  /** Context-loader resource surface (MCP over agent-retrieval). */
325
327
 
@@ -327,6 +329,9 @@ declare function context(ctx: RequestContext): {
327
329
  searchSchema: (knId: string, query: string, opts?: SearchSchemaOptions) => Promise<unknown>;
328
330
  queryObjectInstance: (knId: string, args: Record<string, unknown>) => Promise<unknown>;
329
331
  findSkills: (knId: string, objectTypeId: string, topK?: number) => Promise<unknown>;
332
+ knDetail: (knId: string, detailLevel?: DetailLevel) => Promise<unknown>;
333
+ objectTypes: (knId: string, ids: string[]) => Promise<unknown>;
334
+ relationTypes: (knId: string, ids: string[]) => Promise<unknown>;
330
335
  info: () => Promise<unknown>;
331
336
  tools: (knId: string) => Promise<unknown>;
332
337
  toolCall: (knId: string, name: string, args: Record<string, unknown>) => Promise<unknown>;
@@ -352,7 +357,7 @@ interface TemplateArg {
352
357
 
353
358
  /**
354
359
  * Dataflow backend client (automation v2). Read endpoints (list/runs/logs) are
355
- * implemented from kweaver-sdk; trigger/create bodies are deferred until the
360
+ * implemented; trigger/create bodies are deferred until the
356
361
  * contract is verified on a live env. Responses passed through as parsed JSON.
357
362
  */
358
363
 
@@ -384,7 +389,7 @@ declare function dataflows(ctx: RequestContext): {
384
389
 
385
390
  /**
386
391
  * Knowledge-network backend client (ontology-manager + agent-retrieval).
387
- * Endpoints mirror kweaver-sdk; responses are passed through as parsed JSON
392
+ * Responses are passed through as parsed JSON
388
393
  * (shapes vary by backend version — validate at higher layers as needed).
389
394
  */
390
395
 
@@ -578,8 +583,8 @@ declare function models(ctx: RequestContext): {
578
583
  };
579
584
 
580
585
  /**
581
- * Vega-backend resource client (list/find/get/query/delete). Endpoints mirror
582
- * kweaver-sdk `api/resources.ts`. Responses passed through as parsed JSON.
586
+ * Vega-backend resource client (list/find/get/query/delete).
587
+ * Responses passed through as parsed JSON.
583
588
  */
584
589
 
585
590
  interface ListResourcesOptions {
@@ -739,8 +744,8 @@ interface DiagnoseReport {
739
744
  * agent, fetches the resulting trace, and checks each assertion. Deterministic
740
745
  * assertion kinds (contains, regex, tool-call count/order, latency) need no LLM;
741
746
  * `semantic_match` reuses the local-claude judge. Builder lifts cases from a
742
- * queries file (JSON). The diagnosis-report lift + YAML shards + redaction from
743
- * kweaver-sdk are deferred — see tech-debt.
747
+ * queries file (JSON). The diagnosis-report lift + YAML shards + redaction
748
+ * are deferred — see tech-debt.
744
749
  */
745
750
 
746
751
  type AssertionType = "contains" | "not_contains" | "regex" | "tool_call_count" | "tool_call_order" | "latency_ms" | "semantic_match";
package/dist/index.js CHANGED
@@ -19,7 +19,7 @@ import {
19
19
  toolboxes,
20
20
  trace,
21
21
  vega
22
- } from "./chunk-2GNQU4XH.js";
22
+ } from "./chunk-SH2KLES5.js";
23
23
  export {
24
24
  DEFAULT_BUSINESS_DOMAIN,
25
25
  DEFAULT_LIST_LIMIT,
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@openbkn/bkn-sdk",
3
- "version": "0.1.1-alpha.14",
3
+ "version": "0.1.1-alpha.16",
4
4
  "description": "Unified TypeScript SDK + CLI for the BKN (Business Knowledge Network) platform.",
5
5
  "type": "module",
6
- "license": "Apache-2.0",
6
+ "license": "SEE LICENSE IN LICENSE",
7
7
  "engines": {
8
8
  "node": ">=18"
9
9
  },
@@ -18,7 +18,7 @@
18
18
  "import": "./dist/index.js"
19
19
  }
20
20
  },
21
- "files": ["dist", "README.md", "README.zh.md", "LICENSE"],
21
+ "files": ["dist", "README.md", "README.zh.md", "LICENSE", "NOTICE"],
22
22
  "publishConfig": {
23
23
  "access": "public"
24
24
  },