@ra3orblade/swarm 0.4.0 → 0.4.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/swarm-mcp.js +260 -240
- package/dist/swarmd.js +1 -73
- package/package.json +1 -1
- package/web/menus.js +11 -11
package/dist/swarmd.js
CHANGED
|
@@ -2118,78 +2118,6 @@ var RegExpRouter = class {
|
|
|
2118
2118
|
}
|
|
2119
2119
|
};
|
|
2120
2120
|
|
|
2121
|
-
// node_modules/.bun/hono@4.13.3/node_modules/hono/dist/router/reg-exp-router/prepared-router.js
|
|
2122
|
-
var PreparedRegExpRouter = class {
|
|
2123
|
-
name = "PreparedRegExpRouter";
|
|
2124
|
-
#matchers;
|
|
2125
|
-
#relocateMap;
|
|
2126
|
-
constructor(matchers, relocateMap) {
|
|
2127
|
-
this.#matchers = matchers;
|
|
2128
|
-
this.#relocateMap = relocateMap;
|
|
2129
|
-
}
|
|
2130
|
-
#addWildcard(method, handlerData) {
|
|
2131
|
-
const matcher = this.#matchers[method];
|
|
2132
|
-
matcher[1].forEach((list) => list && list.push(handlerData));
|
|
2133
|
-
Object.values(matcher[2]).forEach((list) => list[0].push(handlerData));
|
|
2134
|
-
}
|
|
2135
|
-
#addPath(method, path, handler, indexes, map) {
|
|
2136
|
-
const matcher = this.#matchers[method];
|
|
2137
|
-
if (!map) {
|
|
2138
|
-
matcher[2][path][0].push([handler, {}]);
|
|
2139
|
-
} else {
|
|
2140
|
-
indexes.forEach((index) => {
|
|
2141
|
-
if (typeof index === "number") {
|
|
2142
|
-
matcher[1][index].push([handler, map]);
|
|
2143
|
-
} else {
|
|
2144
|
-
matcher[2][index || path][0].push([handler, map]);
|
|
2145
|
-
}
|
|
2146
|
-
});
|
|
2147
|
-
}
|
|
2148
|
-
}
|
|
2149
|
-
add(method, path, handler) {
|
|
2150
|
-
if (!this.#matchers[method]) {
|
|
2151
|
-
const all = this.#matchers[METHOD_NAME_ALL];
|
|
2152
|
-
const staticMap = {};
|
|
2153
|
-
for (const key in all[2]) {
|
|
2154
|
-
staticMap[key] = [all[2][key][0].slice(), emptyParam];
|
|
2155
|
-
}
|
|
2156
|
-
this.#matchers[method] = [
|
|
2157
|
-
all[0],
|
|
2158
|
-
all[1].map((list) => Array.isArray(list) ? list.slice() : 0),
|
|
2159
|
-
staticMap
|
|
2160
|
-
];
|
|
2161
|
-
}
|
|
2162
|
-
if (path === "/*" || path === "*") {
|
|
2163
|
-
const handlerData = [handler, {}];
|
|
2164
|
-
if (method === METHOD_NAME_ALL) {
|
|
2165
|
-
for (const m in this.#matchers) {
|
|
2166
|
-
this.#addWildcard(m, handlerData);
|
|
2167
|
-
}
|
|
2168
|
-
} else {
|
|
2169
|
-
this.#addWildcard(method, handlerData);
|
|
2170
|
-
}
|
|
2171
|
-
return;
|
|
2172
|
-
}
|
|
2173
|
-
const data = this.#relocateMap[path];
|
|
2174
|
-
if (!data) {
|
|
2175
|
-
throw new Error(`Path ${path} is not registered`);
|
|
2176
|
-
}
|
|
2177
|
-
for (const [indexes, map] of data) {
|
|
2178
|
-
if (method === METHOD_NAME_ALL) {
|
|
2179
|
-
for (const m in this.#matchers) {
|
|
2180
|
-
this.#addPath(m, path, handler, indexes, map);
|
|
2181
|
-
}
|
|
2182
|
-
} else {
|
|
2183
|
-
this.#addPath(method, path, handler, indexes, map);
|
|
2184
|
-
}
|
|
2185
|
-
}
|
|
2186
|
-
}
|
|
2187
|
-
buildAllMatchers() {
|
|
2188
|
-
return this.#matchers;
|
|
2189
|
-
}
|
|
2190
|
-
match = match;
|
|
2191
|
-
};
|
|
2192
|
-
|
|
2193
2121
|
// node_modules/.bun/hono@4.13.3/node_modules/hono/dist/router/smart-router/router.js
|
|
2194
2122
|
var SmartRouter = class {
|
|
2195
2123
|
name = "SmartRouter";
|
|
@@ -4262,7 +4190,7 @@ function rowToEvent(r) {
|
|
|
4262
4190
|
}
|
|
4263
4191
|
|
|
4264
4192
|
// packages/daemon/src/app.ts
|
|
4265
|
-
var VERSION = "0.4.
|
|
4193
|
+
var VERSION = "0.4.1";
|
|
4266
4194
|
var WEB_DIR = (() => {
|
|
4267
4195
|
if (process.env.SWARM_WEB_DIR)
|
|
4268
4196
|
return process.env.SWARM_WEB_DIR;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ra3orblade/swarm",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Local-first control plane for AI-agent development: watch every Claude Code / Codex / Grok session on your machine, ledger tasks and worktrees, enforce rules as hook denials.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|