@openbkn/bkn-sdk 0.1.1-alpha.13 → 0.1.1-alpha.15
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/LICENSE +132 -201
- package/README.md +34 -24
- package/README.zh.md +11 -10
- package/dist/{chunk-RSX5YMFM.js → chunk-KF3J46WL.js} +26 -3
- package/dist/chunk-KF3J46WL.js.map +1 -0
- package/dist/cli.js +48 -10
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +17 -11
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-RSX5YMFM.js.map +0 -1
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.
|
|
63
|
-
*
|
|
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
|
|
201
|
-
*
|
|
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
|
-
*
|
|
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
|
*/
|
|
@@ -352,7 +352,7 @@ interface TemplateArg {
|
|
|
352
352
|
|
|
353
353
|
/**
|
|
354
354
|
* Dataflow backend client (automation v2). Read endpoints (list/runs/logs) are
|
|
355
|
-
* implemented
|
|
355
|
+
* implemented; trigger/create bodies are deferred until the
|
|
356
356
|
* contract is verified on a live env. Responses passed through as parsed JSON.
|
|
357
357
|
*/
|
|
358
358
|
|
|
@@ -384,7 +384,7 @@ declare function dataflows(ctx: RequestContext): {
|
|
|
384
384
|
|
|
385
385
|
/**
|
|
386
386
|
* Knowledge-network backend client (ontology-manager + agent-retrieval).
|
|
387
|
-
*
|
|
387
|
+
* Responses are passed through as parsed JSON
|
|
388
388
|
* (shapes vary by backend version — validate at higher layers as needed).
|
|
389
389
|
*/
|
|
390
390
|
|
|
@@ -558,6 +558,8 @@ declare function models(ctx: RequestContext): {
|
|
|
558
558
|
edit: (body: unknown) => Promise<unknown>;
|
|
559
559
|
delete: (modelIds: string[]) => Promise<unknown>;
|
|
560
560
|
test: (body: unknown) => Promise<unknown>;
|
|
561
|
+
/** Set (or clear) the system default LLM. */
|
|
562
|
+
setDefault: (modelId: string, isDefault?: boolean) => Promise<unknown>;
|
|
561
563
|
};
|
|
562
564
|
small: {
|
|
563
565
|
list: (opts?: ListModelsOptions) => Promise<unknown>;
|
|
@@ -568,12 +570,16 @@ declare function models(ctx: RequestContext): {
|
|
|
568
570
|
edit: (body: unknown) => Promise<unknown>;
|
|
569
571
|
delete: (modelIds: string[]) => Promise<unknown>;
|
|
570
572
|
test: (body: unknown) => Promise<unknown>;
|
|
573
|
+
/** Set (or clear) the system default small model (type inferred from the model). */
|
|
574
|
+
setDefault: (modelId: string, isDefault?: boolean) => Promise<unknown>;
|
|
575
|
+
/** Get the system default small model for a type (default "embedding"). */
|
|
576
|
+
getDefault: (modelType?: string) => Promise<unknown>;
|
|
571
577
|
};
|
|
572
578
|
};
|
|
573
579
|
|
|
574
580
|
/**
|
|
575
|
-
* Vega-backend resource client (list/find/get/query/delete).
|
|
576
|
-
*
|
|
581
|
+
* Vega-backend resource client (list/find/get/query/delete).
|
|
582
|
+
* Responses passed through as parsed JSON.
|
|
577
583
|
*/
|
|
578
584
|
|
|
579
585
|
interface ListResourcesOptions {
|
|
@@ -733,8 +739,8 @@ interface DiagnoseReport {
|
|
|
733
739
|
* agent, fetches the resulting trace, and checks each assertion. Deterministic
|
|
734
740
|
* assertion kinds (contains, regex, tool-call count/order, latency) need no LLM;
|
|
735
741
|
* `semantic_match` reuses the local-claude judge. Builder lifts cases from a
|
|
736
|
-
* queries file (JSON). The diagnosis-report lift + YAML shards + redaction
|
|
737
|
-
*
|
|
742
|
+
* queries file (JSON). The diagnosis-report lift + YAML shards + redaction
|
|
743
|
+
* are deferred — see tech-debt.
|
|
738
744
|
*/
|
|
739
745
|
|
|
740
746
|
type AssertionType = "contains" | "not_contains" | "regex" | "tool_call_count" | "tool_call_order" | "latency_ms" | "semantic_match";
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openbkn/bkn-sdk",
|
|
3
|
-
"version": "0.1.1-alpha.
|
|
3
|
+
"version": "0.1.1-alpha.15",
|
|
4
4
|
"description": "Unified TypeScript SDK + CLI for the BKN (Business Knowledge Network) platform.",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"license": "
|
|
6
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=18"
|
|
9
9
|
},
|