bantou 0.2.0 → 0.2.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/.output/nitro.json +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/9a6f6e29-92f1-40d0-84d5-974a9154d48f.json +1 -0
- package/.output/server/chunks/nitro/nitro.mjs +10 -22
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/package.json +1 -1
- package/README.md +3 -3
- package/package.json +1 -1
- package/.output/public/_nuxt/builds/meta/1a8fc623-6671-445b-bdd3-c3d073520a3a.json +0 -1
package/.output/nitro.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"9a6f6e29-92f1-40d0-84d5-974a9154d48f","timestamp":1793191863983}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"9a6f6e29-92f1-40d0-84d5-974a9154d48f","timestamp":1793191863983,"prerendered":[]}
|
|
@@ -7,7 +7,7 @@ import { resolve, dirname, join, isAbsolute } from 'node:path';
|
|
|
7
7
|
import { createHash, randomBytes, randomUUID } from 'node:crypto';
|
|
8
8
|
import { hostname } from 'node:os';
|
|
9
9
|
import { startBroker } from '@unagents/messenger-broker';
|
|
10
|
-
import {
|
|
10
|
+
import { createMessengerClient } from '@unagents/messenger-client';
|
|
11
11
|
import { execFile, spawn } from 'node:child_process';
|
|
12
12
|
import { readFile as readFile$1, mkdir, writeFile as writeFile$1, rename, unlink as unlink$1, readdir as readdir$1, stat, appendFile } from 'node:fs/promises';
|
|
13
13
|
import { promisify } from 'node:util';
|
|
@@ -4042,7 +4042,7 @@ function _expandFromEnv(value) {
|
|
|
4042
4042
|
const _inlineRuntimeConfig = {
|
|
4043
4043
|
"app": {
|
|
4044
4044
|
"baseURL": "/",
|
|
4045
|
-
"buildId": "
|
|
4045
|
+
"buildId": "9a6f6e29-92f1-40d0-84d5-974a9154d48f",
|
|
4046
4046
|
"buildAssetsDir": "/_nuxt/",
|
|
4047
4047
|
"cdnURL": ""
|
|
4048
4048
|
},
|
|
@@ -5441,7 +5441,6 @@ async function startDaemon(configPath, deps) {
|
|
|
5441
5441
|
log(
|
|
5442
5442
|
`broker \u8D77\u52D5: port=${broker.port} bind=${bind} discovery=${discovery} token=${token ? "\u6709" : "\u7121"} id=${broker.id}`
|
|
5443
5443
|
);
|
|
5444
|
-
const url = brokerUrl(bind, broker.port);
|
|
5445
5444
|
if (!["127.0.0.1", "::1", "localhost"].includes(bind) && token === "") {
|
|
5446
5445
|
log(`\u8B66\u544A: token \u7121\u3057\u3067 ${bind} \u306B bind\u3002LAN \u304B\u3089\u8AB0\u3067\u3082\u6307\u793A\u3092\u9001\u308C\u308B`);
|
|
5447
5446
|
}
|
|
@@ -5500,20 +5499,9 @@ async function startDaemon(configPath, deps) {
|
|
|
5500
5499
|
}
|
|
5501
5500
|
};
|
|
5502
5501
|
try {
|
|
5503
|
-
const admin = createBrokerClient(token);
|
|
5504
|
-
admin.setUrl(url);
|
|
5505
|
-
const peers = await admin.post("/list-peers", {});
|
|
5506
|
-
for (const p of peers) {
|
|
5507
|
-
if (p.name === SERVER_NAME && p.hostname === hostname()) {
|
|
5508
|
-
await admin.post("/unregister", { id: p.id });
|
|
5509
|
-
log(`\u53E4\u3044 peer \u3092\u89E3\u9664: ${p.id}`);
|
|
5510
|
-
}
|
|
5511
|
-
}
|
|
5512
5502
|
client = createMessengerClient({
|
|
5513
|
-
env: { AGENT_MESSENGER_DISCOVERY: "off", AGENT_MESSENGER_TOKEN: token },
|
|
5514
5503
|
name: SERVER_NAME,
|
|
5515
5504
|
summary: `${hostname()} ${config.workspace}`,
|
|
5516
|
-
brokers: [url],
|
|
5517
5505
|
autoStartBroker: false,
|
|
5518
5506
|
log: (m) => log(`messenger: ${m}`)
|
|
5519
5507
|
});
|
|
@@ -5522,7 +5510,7 @@ async function startDaemon(configPath, deps) {
|
|
|
5522
5510
|
inflight.add(p);
|
|
5523
5511
|
});
|
|
5524
5512
|
await client.connect();
|
|
5525
|
-
log(`peer \u767B\u9332: name=${SERVER_NAME} id=${client.peer.id}
|
|
5513
|
+
log(`peer \u767B\u9332: name=${SERVER_NAME} id=${client.peer.id}`);
|
|
5526
5514
|
if (deps.protocolDir) {
|
|
5527
5515
|
try {
|
|
5528
5516
|
const info = await client.setProtocol(deps.protocolDir);
|
|
@@ -5626,7 +5614,7 @@ function startMcpListener(listener, opts) {
|
|
|
5626
5614
|
});
|
|
5627
5615
|
}
|
|
5628
5616
|
|
|
5629
|
-
const
|
|
5617
|
+
const _D1kwHzO9LpK6zbb1nuc_e7ja1JtSgEIJEPzehMKDIrk = defineNitroPlugin((nitro) => {
|
|
5630
5618
|
const { configPath, protocolDir } = useRuntimeConfig().bantou;
|
|
5631
5619
|
let daemon;
|
|
5632
5620
|
let stopping = false;
|
|
@@ -5661,19 +5649,19 @@ const _BXJ7FSQZ6JqPfCPCqXG5Jm1pKehUI0Q0v0FYu6bKODg = defineNitroPlugin((nitro) =
|
|
|
5661
5649
|
});
|
|
5662
5650
|
|
|
5663
5651
|
const plugins = [
|
|
5664
|
-
|
|
5652
|
+
_D1kwHzO9LpK6zbb1nuc_e7ja1JtSgEIJEPzehMKDIrk
|
|
5665
5653
|
];
|
|
5666
5654
|
|
|
5667
5655
|
const _SxA8c9 = defineEventHandler(() => {});
|
|
5668
5656
|
|
|
5669
|
-
const
|
|
5670
|
-
const
|
|
5657
|
+
const _lazy_hBaWPa = () => import('../routes/mcp.mjs');
|
|
5658
|
+
const _lazy_OYQtwO = () => import('../routes/renderer.mjs');
|
|
5671
5659
|
|
|
5672
5660
|
const handlers = [
|
|
5673
|
-
{ route: '/mcp', handler:
|
|
5674
|
-
{ route: '/__nuxt_error', handler:
|
|
5661
|
+
{ route: '/mcp', handler: _lazy_hBaWPa, lazy: true, middleware: false, method: undefined },
|
|
5662
|
+
{ route: '/__nuxt_error', handler: _lazy_OYQtwO, lazy: true, middleware: false, method: undefined },
|
|
5675
5663
|
{ route: '/__nuxt_island/**', handler: _SxA8c9, lazy: false, middleware: false, method: undefined },
|
|
5676
|
-
{ route: '/**', handler:
|
|
5664
|
+
{ route: '/**', handler: _lazy_OYQtwO, lazy: true, middleware: false, method: undefined }
|
|
5677
5665
|
];
|
|
5678
5666
|
|
|
5679
5667
|
function createNitroApp() {
|