@bolloon/bolloon-agent 0.5.5 → 0.6.1
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/agents/execution-entry.js +10 -0
- package/dist/agents/goal-flywheel/wiring/seams.js +5 -1
- package/dist/agents/parse-tool-call.js +6 -1
- package/dist/agents/pi-sdk-session-factory.js +36 -3
- package/dist/agents/pi-sdk-tools.js +18 -8
- package/dist/agents/pi-sdk.js +749 -1390
- package/dist/agents/run-context.js +20 -0
- package/dist/agents/runner-resolver.js +3 -1
- package/dist/agents/tool-capability/index.js +51 -0
- package/dist/agents/workflow-pivot-loop.js +31 -10
- package/dist/agents/write-verify.js +60 -0
- package/dist/bollharness-integration/integration.js +8 -0
- package/dist/bollharness-integration/skill-adapter.js +32 -3
- package/dist/electron-build/agents/goal-flywheel/wiring/seams.js +5 -1
- package/dist/electron-build/agents/goal-flywheel/wiring/seams.js.map +1 -1
- package/dist/electron-build/agents/parse-tool-call.js +6 -1
- package/dist/electron-build/agents/parse-tool-call.js.map +1 -1
- package/dist/electron-build/agents/pi-sdk-session-factory.js +36 -3
- package/dist/electron-build/agents/pi-sdk-session-factory.js.map +1 -1
- package/dist/electron-build/agents/pi-sdk-tools.js +21 -11
- package/dist/electron-build/agents/pi-sdk-tools.js.map +1 -1
- package/dist/electron-build/agents/pi-sdk-types.js.map +1 -1
- package/dist/electron-build/agents/pi-sdk.js +750 -1389
- package/dist/electron-build/agents/pi-sdk.js.map +1 -1
- package/dist/electron-build/agents/run-context.js +24 -0
- package/dist/electron-build/agents/run-context.js.map +1 -0
- package/dist/electron-build/agents/runner-resolver.js +3 -1
- package/dist/electron-build/agents/runner-resolver.js.map +1 -1
- package/dist/electron-build/agents/tool-capability/index.js +90 -0
- package/dist/electron-build/agents/tool-capability/index.js.map +1 -0
- package/dist/electron-build/agents/workflow-pivot-loop.js +31 -10
- package/dist/electron-build/agents/workflow-pivot-loop.js.map +1 -1
- package/dist/electron-build/agents/write-verify.js +99 -0
- package/dist/electron-build/agents/write-verify.js.map +1 -0
- package/dist/electron-build/bollharness-integration/integration.js +8 -0
- package/dist/electron-build/bollharness-integration/integration.js.map +1 -1
- package/dist/electron-build/bollharness-integration/skill-adapter.js +32 -3
- package/dist/electron-build/bollharness-integration/skill-adapter.js.map +1 -1
- package/dist/electron-build/kernel/channel-actor.js +339 -0
- package/dist/electron-build/kernel/channel-actor.js.map +1 -0
- package/dist/electron-build/kernel/control.js +102 -0
- package/dist/electron-build/kernel/control.js.map +1 -0
- package/dist/electron-build/kernel/model-runtime.js +508 -0
- package/dist/electron-build/kernel/model-runtime.js.map +1 -0
- package/dist/electron-build/kernel/run-lifecycle.js +146 -0
- package/dist/electron-build/kernel/run-lifecycle.js.map +1 -0
- package/dist/electron-build/kernel/transport.js +119 -0
- package/dist/electron-build/kernel/transport.js.map +1 -0
- package/dist/electron-build/llm/native-adapter.js +122 -0
- package/dist/electron-build/llm/native-adapter.js.map +1 -0
- package/dist/index.js +43 -19
- package/dist/ios/bolloon-web.json +3 -3
- package/dist/ios/client.js +13 -7
- package/dist/ios/mobile-core.js +7762 -6289
- package/dist/ios/mobile.js +64 -0
- package/dist/ios/routes-mobile-tasks.js +2 -1
- package/dist/ios/routes-tasks.js +16 -1
- package/dist/ios/routes-x402-info.js +28 -1
- package/dist/ios/server-storage.js +26 -5
- package/dist/ios/server.js +840 -862
- package/dist/ios/sw.js +1 -1
- package/dist/ios/ui/message-renderer.js +473 -29
- package/dist/ios/ui/step-timeline.js +13 -12
- package/dist/kernel/channel-actor.js +321 -0
- package/dist/kernel/control.js +95 -0
- package/dist/kernel/gate-scan.js +1350 -0
- package/dist/kernel/model-runtime.js +494 -0
- package/dist/kernel/plan-channel-actor.js +305 -0
- package/dist/kernel/plan-communication.js +163 -0
- package/dist/kernel/plan-constraint.js +152 -0
- package/dist/kernel/plan-deletion.js +32 -0
- package/dist/kernel/plan-harness.js +78 -0
- package/dist/kernel/plan-modelruntime.js +60 -0
- package/dist/kernel/plan-runcontext.js +163 -0
- package/dist/kernel/plan.js +149 -0
- package/dist/kernel/roster.js +244 -0
- package/dist/kernel/run-lifecycle.js +138 -0
- package/dist/kernel/transport.js +111 -0
- package/dist/llm/native-adapter.js +117 -0
- package/dist/web/bolloon-web.json +3 -3
- package/dist/web/client.js +12 -7
- package/dist/web/routes-tasks.js +16 -1
- package/dist/web/server.js +838 -862
- package/dist/web/sw.js +1 -1
- package/dist/web/ui/message-renderer.js +473 -29
- package/dist/web/ui/step-timeline.js +13 -12
- package/package.json +1 -1
- package/scripts/build-web.ts +74 -1
- package/dist/constraint-runtime/_archive_helper.d.ts +0 -1
- package/dist/constraint-runtime/_archive_helper.js +0 -9
- package/dist/constraint-runtime/assistant/index.d.ts +0 -11
- package/dist/constraint-runtime/assistant/index.js +0 -12
- package/dist/constraint-runtime/bootstrap/index.d.ts +0 -11
- package/dist/constraint-runtime/bootstrap/index.js +0 -12
- package/dist/constraint-runtime/bridge/index.d.ts +0 -11
- package/dist/constraint-runtime/bridge/index.js +0 -12
- package/dist/constraint-runtime/buddy/index.d.ts +0 -11
- package/dist/constraint-runtime/buddy/index.js +0 -12
- package/dist/constraint-runtime/cli/index.d.ts +0 -11
- package/dist/constraint-runtime/cli/index.js +0 -12
- package/dist/constraint-runtime/components/index.d.ts +0 -11
- package/dist/constraint-runtime/components/index.js +0 -12
- package/dist/constraint-runtime/constants/index.d.ts +0 -11
- package/dist/constraint-runtime/constants/index.js +0 -12
- package/dist/constraint-runtime/coordinator/index.d.ts +0 -11
- package/dist/constraint-runtime/coordinator/index.js +0 -12
- package/dist/constraint-runtime/cost_hook.d.ts +0 -2
- package/dist/constraint-runtime/cost_hook.js +0 -4
- package/dist/constraint-runtime/entrypoints/index.d.ts +0 -11
- package/dist/constraint-runtime/entrypoints/index.js +0 -12
- package/dist/constraint-runtime/execution_registry.d.ts +0 -20
- package/dist/constraint-runtime/execution_registry.js +0 -44
- package/dist/constraint-runtime/hooks/index.d.ts +0 -11
- package/dist/constraint-runtime/hooks/index.js +0 -12
- package/dist/constraint-runtime/ink.d.ts +0 -1
- package/dist/constraint-runtime/ink.js +0 -4
- package/dist/constraint-runtime/keybindings/index.d.ts +0 -11
- package/dist/constraint-runtime/keybindings/index.js +0 -12
- package/dist/constraint-runtime/memdir/index.d.ts +0 -11
- package/dist/constraint-runtime/memdir/index.js +0 -12
- package/dist/constraint-runtime/migrations/index.d.ts +0 -11
- package/dist/constraint-runtime/migrations/index.js +0 -12
- package/dist/constraint-runtime/moreright/index.d.ts +0 -11
- package/dist/constraint-runtime/moreright/index.js +0 -12
- package/dist/constraint-runtime/native_ts/index.d.ts +0 -11
- package/dist/constraint-runtime/native_ts/index.js +0 -12
- package/dist/constraint-runtime/output_styles/index.d.ts +0 -11
- package/dist/constraint-runtime/output_styles/index.js +0 -12
- package/dist/constraint-runtime/plugins/index.d.ts +0 -11
- package/dist/constraint-runtime/plugins/index.js +0 -12
- package/dist/constraint-runtime/port_manifest.d.ts +0 -7
- package/dist/constraint-runtime/port_manifest.js +0 -11
- package/dist/constraint-runtime/query.d.ts +0 -6
- package/dist/constraint-runtime/query.js +0 -1
- package/dist/constraint-runtime/remote/index.d.ts +0 -11
- package/dist/constraint-runtime/remote/index.js +0 -12
- package/dist/constraint-runtime/schemas/index.d.ts +0 -11
- package/dist/constraint-runtime/schemas/index.js +0 -12
- package/dist/constraint-runtime/screens/index.d.ts +0 -11
- package/dist/constraint-runtime/screens/index.js +0 -12
- package/dist/constraint-runtime/server/index.d.ts +0 -11
- package/dist/constraint-runtime/server/index.js +0 -12
- package/dist/constraint-runtime/services/index.d.ts +0 -11
- package/dist/constraint-runtime/services/index.js +0 -12
- package/dist/constraint-runtime/state/index.d.ts +0 -11
- package/dist/constraint-runtime/state/index.js +0 -12
- package/dist/constraint-runtime/system_init.d.ts +0 -1
- package/dist/constraint-runtime/system_init.js +0 -20
- package/dist/constraint-runtime/types/index.d.ts +0 -11
- package/dist/constraint-runtime/types/index.js +0 -12
- package/dist/constraint-runtime/upstream_proxy/index.d.ts +0 -11
- package/dist/constraint-runtime/upstream_proxy/index.js +0 -12
- package/dist/constraint-runtime/utils/index.d.ts +0 -11
- package/dist/constraint-runtime/utils/index.js +0 -12
- package/dist/constraint-runtime/vim/index.d.ts +0 -11
- package/dist/constraint-runtime/vim/index.js +0 -12
- package/dist/constraint-runtime/voice/index.d.ts +0 -11
- package/dist/constraint-runtime/voice/index.js +0 -12
|
@@ -43,7 +43,9 @@ exports.kuboApi = kuboApi;
|
|
|
43
43
|
exports.registerWalletTools = registerWalletTools;
|
|
44
44
|
exports.setupInboxListener = setupInboxListener;
|
|
45
45
|
const fs = __importStar(require("fs/promises"));
|
|
46
|
+
const index_js_1 = require("./tool-capability/index.js"); // K1 ④: 领域能力唯一入口
|
|
46
47
|
const wallet_tools_js_1 = require("./wallet-tools.js");
|
|
48
|
+
const write_verify_js_1 = require("./write-verify.js"); // K10 ⑦: 写类工具成功后拼读回事实
|
|
47
49
|
const fsSync = __importStar(require("fs"));
|
|
48
50
|
const path = __importStar(require("path"));
|
|
49
51
|
const os = __importStar(require("os"));
|
|
@@ -54,7 +56,7 @@ const shell_tool_js_1 = require("./shell-tool.js");
|
|
|
54
56
|
const shell_guard_js_1 = require("./shell-guard.js");
|
|
55
57
|
const p2p_document_tools_js_1 = require("./p2p-document-tools.js");
|
|
56
58
|
const pi_sdk_session_factory_js_1 = require("./pi-sdk-session-factory.js");
|
|
57
|
-
const
|
|
59
|
+
const index_js_2 = require("../constraints/index.js");
|
|
58
60
|
const delegate_js_1 = require("../external-engines/delegate.js");
|
|
59
61
|
const process_runner_js_1 = require("./process-runner.js");
|
|
60
62
|
const background_notices_js_1 = require("./background-notices.js");
|
|
@@ -262,7 +264,7 @@ function registerBuiltinTools(ctx) {
|
|
|
262
264
|
}
|
|
263
265
|
// summarizeDocument 走 PiAgentSession.summarizeDocument, 这里通过 tools 反向调用不好处理
|
|
264
266
|
// 简化: 让 LLM 自己直接走 shell_exec / use_skill 路径
|
|
265
|
-
const llm = (0,
|
|
267
|
+
const llm = (0, index_js_2.getMinimax)();
|
|
266
268
|
const content = await reader_js_1.documentReader.read(path);
|
|
267
269
|
const r = await llm.summarize(content.text, args.context);
|
|
268
270
|
return {
|
|
@@ -290,7 +292,7 @@ function registerBuiltinTools(ctx) {
|
|
|
290
292
|
if (!ctx.minimaxAvailable) {
|
|
291
293
|
return { success: false, error: 'LLM未初始化,请设置 MINIMAX_API_KEY' };
|
|
292
294
|
}
|
|
293
|
-
const llm = (0,
|
|
295
|
+
const llm = (0, index_js_2.getMinimax)();
|
|
294
296
|
const content = await reader_js_1.documentReader.read(path);
|
|
295
297
|
const improved = await llm.summarize(content.text + '\n\n改进要求: ' + requirements, undefined);
|
|
296
298
|
return {
|
|
@@ -1096,7 +1098,11 @@ function registerBuiltinTools(ctx) {
|
|
|
1096
1098
|
await stageWrite(relPath, before, content, action, ctx.cwd).catch(() => { });
|
|
1097
1099
|
await fs.mkdir(path.dirname(absPath), { recursive: true });
|
|
1098
1100
|
await fs.writeFile(absPath, content, 'utf-8');
|
|
1099
|
-
|
|
1101
|
+
// K10 ⑦: 写成功 ≠ 任务成功 —— 拼上读回事实 (`[已核对] …` / `[未核对] …`)
|
|
1102
|
+
return (0, write_verify_js_1.withWriteVerified)('write_file', { path: relPath }, ctx.cwd, {
|
|
1103
|
+
success: true,
|
|
1104
|
+
output: `✅ wrote ${relPath} (${content.length} bytes)`,
|
|
1105
|
+
});
|
|
1100
1106
|
}
|
|
1101
1107
|
catch (e) {
|
|
1102
1108
|
return { success: false, error: `写文件失败: ${String(e)}` };
|
|
@@ -1130,7 +1136,11 @@ function registerBuiltinTools(ctx) {
|
|
|
1130
1136
|
const { stageWrite } = await Promise.resolve().then(() => __importStar(require('./write-staging.js')));
|
|
1131
1137
|
await stageWrite(relPath, original, updated, 'edit', ctx.cwd).catch(() => { });
|
|
1132
1138
|
await fs.writeFile(absPath, updated, 'utf-8');
|
|
1133
|
-
|
|
1139
|
+
// K10 ⑦: 同上, 编辑也读回自证
|
|
1140
|
+
return (0, write_verify_js_1.withWriteVerified)('edit_file', { path: relPath }, ctx.cwd, {
|
|
1141
|
+
success: true,
|
|
1142
|
+
output: `✅ edited ${relPath} (${oldText.length} → ${newText.length} 字节)`,
|
|
1143
|
+
});
|
|
1134
1144
|
}
|
|
1135
1145
|
catch (e) {
|
|
1136
1146
|
return { success: false, error: `编辑文件失败: ${String(e)}` };
|
|
@@ -3872,7 +3882,7 @@ function registerWalletTools(ctx) {
|
|
|
3872
3882
|
parameters: { limit: '可选 数量 (默认 50)', offset: '可选 偏移', closed: '可选 是否只显示已关闭' },
|
|
3873
3883
|
execute: async (args) => {
|
|
3874
3884
|
try {
|
|
3875
|
-
const { listMarkets } = await
|
|
3885
|
+
const { listMarkets } = await (0, index_js_1.loadDomainModule)('PolymarketSDK/listMarkets');
|
|
3876
3886
|
const markets = await listMarkets({
|
|
3877
3887
|
limit: args.limit ? Number(args.limit) : 50,
|
|
3878
3888
|
offset: args.offset ? Number(args.offset) : 0,
|
|
@@ -3895,7 +3905,7 @@ function registerWalletTools(ctx) {
|
|
|
3895
3905
|
parameters: { marketId: '市场 ID (必填)' },
|
|
3896
3906
|
execute: async (args) => {
|
|
3897
3907
|
try {
|
|
3898
|
-
const mod = await
|
|
3908
|
+
const mod = await (0, index_js_1.loadDomainModule)('PolymarketSDK/getMarket');
|
|
3899
3909
|
const fn = mod.getMarket || mod.default;
|
|
3900
3910
|
const m = await fn(String(args.marketId));
|
|
3901
3911
|
if (!m)
|
|
@@ -3920,7 +3930,7 @@ function registerWalletTools(ctx) {
|
|
|
3920
3930
|
},
|
|
3921
3931
|
execute: async (args) => {
|
|
3922
3932
|
try {
|
|
3923
|
-
const { getOrders } = await
|
|
3933
|
+
const { getOrders } = await (0, index_js_1.loadDomainModule)('PolymarketSDK/getOrders');
|
|
3924
3934
|
const orders = await getOrders({
|
|
3925
3935
|
privateKey: String(args.privateKey),
|
|
3926
3936
|
marketId: args.marketId ? String(args.marketId) : undefined,
|
|
@@ -3955,7 +3965,7 @@ function registerWalletTools(ctx) {
|
|
|
3955
3965
|
},
|
|
3956
3966
|
execute: async (args) => {
|
|
3957
3967
|
try {
|
|
3958
|
-
const { createOrder } = await
|
|
3968
|
+
const { createOrder } = await (0, index_js_1.loadDomainModule)('PolymarketSDK/createOrder');
|
|
3959
3969
|
const r = await createOrder({
|
|
3960
3970
|
privateKey: String(args.privateKey),
|
|
3961
3971
|
marketId: String(args.marketId),
|
|
@@ -3992,7 +4002,7 @@ function registerWalletTools(ctx) {
|
|
|
3992
4002
|
},
|
|
3993
4003
|
execute: async (args) => {
|
|
3994
4004
|
try {
|
|
3995
|
-
const { cancelOrder } = await
|
|
4005
|
+
const { cancelOrder } = await (0, index_js_1.loadDomainModule)('PolymarketSDK/cancelOrder');
|
|
3996
4006
|
const r = await cancelOrder({
|
|
3997
4007
|
privateKey: String(args.privateKey),
|
|
3998
4008
|
orderId: String(args.orderId),
|
|
@@ -4166,7 +4176,7 @@ function registerWalletTools(ctx) {
|
|
|
4166
4176
|
parameters: { owners: 'JSON 数组 owner 地址 (必填)', threshold: '需要几个签名 (必填)' },
|
|
4167
4177
|
execute: async (args) => {
|
|
4168
4178
|
try {
|
|
4169
|
-
const { deploySafe } = await
|
|
4179
|
+
const { deploySafe } = await (0, index_js_1.loadDomainModule)('SafeSDK/deploySafe');
|
|
4170
4180
|
const owners = Array.isArray(args.owners) ? args.owners : JSON.parse(String(args.owners));
|
|
4171
4181
|
const r = await deploySafe({ owners, threshold: Number(args.threshold) });
|
|
4172
4182
|
return { success: true, output: `✅ Safe 部署: ${JSON.stringify(r)}` };
|