@blod-nm/1kuan-act-01-cli 0.2.1 → 0.2.2
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/package.json +1 -1
- package/src/mcp.js +3 -2
- package/src/version.js +1 -1
package/package.json
CHANGED
package/src/mcp.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
import { VERSION } from './version.js'
|
|
15
15
|
import { loadConfig } from './store.js'
|
|
16
|
-
import { resolveApikey, execPgsql, gatewayBase } from './tcb.js'
|
|
16
|
+
import { ACCOUNT_SQL, resolveApikey, execPgsql, gatewayBase } from './tcb.js'
|
|
17
17
|
import { normalizeCreateRedpacket, buildCreateSql, claimTarget } from './redpacket.js'
|
|
18
18
|
|
|
19
19
|
const SERVER_INFO = { name: 'act-01', version: VERSION }
|
|
@@ -96,7 +96,8 @@ function withClaimTarget(raw) {
|
|
|
96
96
|
return packetNo ? { ...result, qr: { content: claimTarget(packetNo) } } : result
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
/** 导出仅为测试:mock tcb 后可以直接断言工具返回形状 */
|
|
100
|
+
export async function callTool(name, args) {
|
|
100
101
|
if (name === 'redpacket_create' || name === 'redpacket_check') {
|
|
101
102
|
const checkOnly = name === 'redpacket_check'
|
|
102
103
|
const input = normalizeCreateRedpacket(args) // 校验失败抛 ValidationError
|
package/src/version.js
CHANGED