@openbkn/bkn-sdk 0.1.3 → 0.1.4

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/README.md CHANGED
@@ -20,7 +20,7 @@ npm install -g @openbkn/bkn-sdk # CLI: `openbkn`
20
20
  npm install @openbkn/bkn-sdk
21
21
  ```
22
22
 
23
- Requires Node ≥ 22.19.
23
+ Requires Node ≥ 24.19.0.
24
24
 
25
25
  ## CLI
26
26
 
@@ -38,7 +38,6 @@ openbkn bkn object-type list <kn-id>
38
38
  # Data platform
39
39
  openbkn resource list --type table
40
40
  openbkn vega catalog list
41
- openbkn dataflow list
42
41
  openbkn model llm list
43
42
 
44
43
  # Agents
@@ -54,9 +53,16 @@ openbkn call /api/ontology-manager/v1/knowledge-networks
54
53
 
55
54
  # Global flags: --base-url, --token, --user, --json/--compact, -bd/--biz-domain, -k/--insecure,
56
55
  # --conversation-id/--interaction-id (BKN Trace correlation; also BKN_CONVERSATION_ID/BKN_INTERACTION_ID)
56
+ # --new-conversation (ignore the remembered conversation for this command)
57
57
  openbkn --help # grouped command map
58
58
  ```
59
59
 
60
+ On a `managed-v2` deploy, commands continue the conversation the previous one
61
+ opened, so work spanning several commands lands in one thread. `openbkn context conversation` shows which
62
+ is in force and where it came from; `--forget` drops it. An explicit `--token` /
63
+ `BKN_TOKEN` opts out (identity there is the token, not the stored user) — use
64
+ `BKN_CONVERSATION_ID` to thread such a script's commands together.
65
+
60
66
  Tokens are stored per platform/user under `~/.bkn/` (override: `BKN_CONFIG_DIR`).
61
67
 
62
68
  ## SDK
@@ -73,6 +79,10 @@ const raw = await bkn.call("/api/...", { method: "GET" });
73
79
 
74
80
  Importing the package has no side effects; `createClient` resolves config explicitly.
75
81
 
82
+ Dynamic-data responses (including Vega and ontology queries) may contain native
83
+ `bigint` values for integers outside JavaScript's safe range. Serialize such a result with the exported
84
+ `stringifyBigIntJSON()` helper instead of native `JSON.stringify()`.
85
+
76
86
  ## Develop
77
87
 
78
88
  ```bash
@@ -94,7 +104,7 @@ lists its flags and arguments, so the tree is discoverable end to end.
94
104
  ecosystem) that lets an AI drive the `openbkn` CLI from natural language. It
95
105
  ships a `SKILL.md` (trigger intents, `allowed-tools: Bash(openbkn *)`, a
96
106
  command-group map, examples, and cautions) plus per-domain cheat sheets under
97
- `references/` (auth, bkn, agent, model, vega, resource, dataflow, context,
107
+ `references/` (auth, bkn, agent, model, vega, resource, context,
98
108
  skill, toolbox, trace, admin, call) and two how-tos (build-a-KN, troubleshooting).
99
109
 
100
110
  A second skill, `skills/create-bkn/`, guides an AI through **authoring** a BKN
package/README.zh.md CHANGED
@@ -15,7 +15,7 @@ npm install -g @openbkn/bkn-sdk # CLI:openbkn
15
15
  npm install @openbkn/bkn-sdk
16
16
  ```
17
17
 
18
- 需要 Node ≥ 22.19。
18
+ 需要 Node ≥ 24.19.0
19
19
 
20
20
  ## CLI
21
21
 
@@ -32,7 +32,6 @@ openbkn bkn object-type list <kn-id>
32
32
  # 数据平台
33
33
  openbkn resource list --type table
34
34
  openbkn vega catalog list
35
- openbkn dataflow list
36
35
  openbkn model llm list
37
36
 
38
37
  # 智能体
@@ -48,9 +47,15 @@ openbkn call /api/ontology-manager/v1/knowledge-networks
48
47
 
49
48
  # 全局参数:--base-url --token --user --json/--compact -bd/--biz-domain -k/--insecure
50
49
  # --conversation-id/--interaction-id(BKN Trace 关联,等价 env:BKN_CONVERSATION_ID/BKN_INTERACTION_ID)
50
+ # --new-conversation(这条命令不沿用记住的 conversation)
51
51
  openbkn --help # 分组命令树
52
52
  ```
53
53
 
54
+ `managed-v2` 部署上,命令会接着上一条开的 conversation,跨命令的一件事因此落在同一个线程里。
55
+ `openbkn context conversation` 显示当前生效的是哪个、来自哪一层;`--forget` 丢掉它。
56
+ 显式 `--token` / `BKN_TOKEN` 不参与(那里的身份是 token 本身,不是存下来的用户)——
57
+ 这类脚本用 `BKN_CONVERSATION_ID` 把多条命令串起来。
58
+
54
59
  Token 按平台/用户存于 `~/.bkn/`(可用 `BKN_CONFIG_DIR` 覆盖)。
55
60
 
56
61
  ## SDK
@@ -67,6 +72,10 @@ const raw = await bkn.call("/api/...", { method: "GET" });
67
72
 
68
73
  import 本包无副作用;`createClient` 显式解析配置。
69
74
 
75
+ Vega 和本体查询等动态数据响应中,超出 JavaScript 安全整数范围的值可能是原生 `bigint`。
76
+ 序列化这类结果时,请使用导出的 `stringifyBigIntJSON()`,不要使用原生
77
+ `JSON.stringify()`。
78
+
70
79
  ## 开发
71
80
 
72
81
  ```bash