@teamclaws/teamclaw 2026.8.0 → 2026.11.0
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/cli.mjs +46 -15
- package/dist/api.js +1 -0
- package/dist/index.js +325 -0
- package/dist/src/config.js +412 -0
- package/dist/src/controller/clarification-routes.js +315 -0
- package/dist/src/controller/controller-capacity.js +14 -0
- package/dist/src/controller/controller-intake.js +895 -0
- package/dist/src/controller/controller-planning.js +813 -0
- package/dist/src/controller/controller-runs.js +175 -0
- package/dist/src/controller/controller-service.js +624 -0
- package/dist/src/controller/controller-tools.js +587 -0
- package/dist/src/controller/delivery-report.js +458 -0
- package/dist/src/controller/github-auth.js +564 -0
- package/dist/src/controller/http-server.js +284 -0
- package/dist/src/controller/kickoff-orchestrator.js +246 -0
- package/dist/src/controller/managed-gateway-process.js +286 -0
- package/dist/src/controller/message-delivery.js +28 -0
- package/dist/src/controller/message-router.js +38 -0
- package/dist/src/controller/message-routes.js +114 -0
- package/dist/src/controller/orchestration-manifest.js +151 -0
- package/dist/src/controller/preview-manager.js +586 -0
- package/dist/src/controller/preview-proxy.js +98 -0
- package/dist/src/controller/profile-switch.js +289 -0
- package/dist/src/controller/project-registry.js +294 -0
- package/dist/src/controller/prompt-injector.js +197 -0
- package/dist/src/controller/repo-routes.js +63 -0
- package/dist/src/controller/role-inference.js +246 -0
- package/dist/src/controller/route-table.js +1353 -0
- package/dist/src/controller/task-assignment.js +508 -0
- package/dist/src/controller/task-cleanup.js +258 -0
- package/dist/src/controller/task-execution.js +240 -0
- package/dist/src/controller/task-results.js +461 -0
- package/dist/src/controller/task-router.js +137 -0
- package/dist/src/controller/task-routes.js +703 -0
- package/dist/src/controller/teamauto-routes.js +124 -0
- package/dist/src/controller/tunnel-manager.js +548 -0
- package/dist/src/controller/ui-assets.js +68 -0
- package/dist/src/controller/websocket.js +42 -0
- package/dist/src/controller/worker-provisioning.js +1674 -0
- package/dist/src/controller/worker-routes.js +188 -0
- package/dist/src/discovery.js +86 -0
- package/dist/src/git-collaboration.js +694 -0
- package/dist/src/identity.js +132 -0
- package/dist/src/install-defaults.js +1 -0
- package/dist/src/interaction-contracts.js +531 -0
- package/dist/src/networking.js +91 -0
- package/dist/src/openclaw-workspace.js +925 -0
- package/dist/src/profile-loader.js +486 -0
- package/dist/src/profiles/banking.json +178 -0
- package/dist/src/profiles/crossborder-ecom.json +253 -0
- package/dist/src/profiles/insurance.json +157 -0
- package/dist/src/profiles/knowledge/hs-structure.md +97 -0
- package/dist/src/profiles/knowledge/incoterms-2020.md +188 -0
- package/dist/src/profiles/knowledge/vat-principles.md +85 -0
- package/dist/src/profiles/schema.json +201 -0
- package/dist/src/profiles/securities.json +137 -0
- package/dist/src/profiles/software-rd.json +264 -0
- package/dist/src/profiles/trading-co.json +200 -0
- package/dist/src/prompt-policy.js +386 -0
- package/dist/src/protocol.js +58 -0
- package/dist/src/role-ids.js +29 -0
- package/dist/src/roles.js +390 -0
- package/dist/src/session-roles.js +14 -0
- package/dist/src/state.js +361 -0
- package/dist/src/task-executor.js +1023 -0
- package/dist/src/teamauto/github-client.js +210 -0
- package/dist/src/teamauto/norms.js +85 -0
- package/dist/src/teamauto/repo-sync.js +423 -0
- package/dist/src/teamauto/scanner.js +207 -0
- package/dist/src/teamauto/schedule.js +123 -0
- package/dist/src/teamauto/scheduler.js +907 -0
- package/dist/src/teamauto/store.js +133 -0
- package/dist/src/types.js +290 -0
- package/dist/src/ui/app.js +4860 -0
- package/dist/src/ui/assets/teamclaw-app-icon.png +0 -0
- package/dist/src/ui/github-login.html +296 -0
- package/dist/src/ui/index.html +447 -0
- package/dist/src/ui/style.css +2805 -0
- package/dist/src/worker/http-handler.js +146 -0
- package/dist/src/worker/message-queue.js +24 -0
- package/dist/src/worker/prompt-injector.js +78 -0
- package/dist/src/worker/skill-installer.js +255 -0
- package/dist/src/worker/tools.js +541 -0
- package/dist/src/worker/worker-service.js +307 -0
- package/dist/src/workspace-browser.js +269 -0
- package/openclaw.plugin.json +28 -1
- package/package.json +3 -2
- package/src/config.ts +33 -2
- package/src/controller/clarification-routes.ts +404 -0
- package/src/controller/controller-intake.ts +1113 -0
- package/src/controller/controller-planning.ts +1029 -0
- package/src/controller/controller-runs.ts +239 -0
- package/src/controller/controller-service.ts +295 -41
- package/src/controller/controller-tools.ts +11 -7
- package/src/controller/http-server.ts +294 -6971
- package/src/controller/kickoff-orchestrator.ts +70 -7
- package/src/controller/message-delivery.ts +49 -0
- package/src/controller/message-routes.ts +137 -0
- package/src/controller/orchestration-manifest.ts +6 -29
- package/src/controller/preview-proxy.ts +127 -0
- package/src/controller/profile-switch.ts +366 -0
- package/src/controller/project-registry.ts +361 -0
- package/src/controller/prompt-injector.ts +23 -8
- package/src/controller/repo-routes.ts +91 -0
- package/src/controller/role-inference.ts +260 -22
- package/src/controller/route-table.ts +1616 -0
- package/src/controller/task-assignment.ts +618 -0
- package/src/controller/task-cleanup.ts +344 -0
- package/src/controller/task-execution.ts +356 -0
- package/src/controller/task-results.ts +544 -0
- package/src/controller/task-router.ts +98 -6
- package/src/controller/task-routes.ts +812 -0
- package/src/controller/teamauto-routes.ts +121 -0
- package/src/controller/ui-assets.ts +70 -0
- package/src/controller/websocket.ts +13 -1
- package/src/controller/worker-provisioning.ts +32 -4
- package/src/controller/worker-routes.ts +241 -0
- package/src/identity.ts +3 -2
- package/src/interaction-contracts.ts +7 -7
- package/src/openclaw-workspace.ts +44 -18
- package/src/profile-loader.ts +650 -0
- package/src/profiles/banking.json +178 -0
- package/src/profiles/crossborder-ecom.json +253 -0
- package/src/profiles/insurance.json +157 -0
- package/src/profiles/knowledge/hs-structure.md +97 -0
- package/src/profiles/knowledge/incoterms-2020.md +188 -0
- package/src/profiles/knowledge/vat-principles.md +85 -0
- package/src/profiles/schema.json +201 -0
- package/src/profiles/securities.json +137 -0
- package/src/profiles/software-rd.json +264 -0
- package/src/profiles/trading-co.json +200 -0
- package/src/prompt-policy.ts +27 -13
- package/src/role-ids.ts +31 -0
- package/src/roles.ts +60 -14
- package/src/session-roles.ts +14 -0
- package/src/state.ts +236 -9
- package/src/task-executor.ts +7 -18
- package/src/teamauto/github-client.ts +21 -0
- package/src/teamauto/repo-sync.ts +246 -6
- package/src/teamauto/scanner.ts +47 -13
- package/src/teamauto/scheduler.ts +259 -16
- package/src/teamauto/store.ts +12 -0
- package/src/types.ts +133 -16
- package/src/ui/app.js +592 -24
- package/src/ui/index.html +44 -11
- package/src/ui/style.css +194 -0
- package/src/worker/prompt-injector.ts +48 -8
- package/src/worker/skill-installer.ts +3 -1
- package/src/worker/worker-service.ts +83 -3
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import os from "node:os";
|
|
2
|
+
import { spawnSync } from "node:child_process";
|
|
3
|
+
function isPrivateLanIpv4(address) {
|
|
4
|
+
if (address.startsWith("10.") || address.startsWith("192.168.")) {
|
|
5
|
+
return true;
|
|
6
|
+
}
|
|
7
|
+
const parts = address.split(".").map((value) => Number.parseInt(value, 10));
|
|
8
|
+
return parts.length === 4 && parts[0] === 172 && parts[1] >= 16 && parts[1] <= 31;
|
|
9
|
+
}
|
|
10
|
+
function rankLanAddress(address) {
|
|
11
|
+
if (address.startsWith("192.168.")) {
|
|
12
|
+
return 0;
|
|
13
|
+
}
|
|
14
|
+
if (address.startsWith("10.")) {
|
|
15
|
+
return 1;
|
|
16
|
+
}
|
|
17
|
+
const parts = address.split(".").map((value) => Number.parseInt(value, 10));
|
|
18
|
+
if (parts.length === 4 && parts[0] === 172 && parts[1] >= 16 && parts[1] <= 31) {
|
|
19
|
+
return 2;
|
|
20
|
+
}
|
|
21
|
+
return 3;
|
|
22
|
+
}
|
|
23
|
+
function parseDefaultRouteInterface(text) {
|
|
24
|
+
const directMatch = text.match(/(?:^|\n)\s*interface:\s*(\S+)/i);
|
|
25
|
+
if (directMatch?.[1]) {
|
|
26
|
+
return directMatch[1];
|
|
27
|
+
}
|
|
28
|
+
const devMatch = text.match(/(?:^|\n)default(?:\s+via\s+\S+)?\s+dev\s+(\S+)/i);
|
|
29
|
+
if (devMatch?.[1]) {
|
|
30
|
+
return devMatch[1];
|
|
31
|
+
}
|
|
32
|
+
return "";
|
|
33
|
+
}
|
|
34
|
+
function probeDefaultRouteInterface() {
|
|
35
|
+
const candidates = process.platform === "darwin"
|
|
36
|
+
? [
|
|
37
|
+
{ command: "route", args: ["-n", "get", "default"] },
|
|
38
|
+
{ command: "ip", args: ["route", "show", "default"] },
|
|
39
|
+
]
|
|
40
|
+
: [
|
|
41
|
+
{ command: "ip", args: ["route", "show", "default"] },
|
|
42
|
+
{ command: "route", args: ["-n", "get", "default"] },
|
|
43
|
+
];
|
|
44
|
+
for (const candidate of candidates) {
|
|
45
|
+
const result = spawnSync(candidate.command, candidate.args, { encoding: "utf8" });
|
|
46
|
+
if (result.status !== 0 || result.error) {
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
const interfaceName = parseDefaultRouteInterface(result.stdout || "");
|
|
50
|
+
if (interfaceName) {
|
|
51
|
+
return interfaceName;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return "";
|
|
55
|
+
}
|
|
56
|
+
function listNonInternalIpv4Addresses() {
|
|
57
|
+
const addresses = [];
|
|
58
|
+
const interfaces = os.networkInterfaces();
|
|
59
|
+
for (const records of Object.values(interfaces)) {
|
|
60
|
+
for (const record of records ?? []) {
|
|
61
|
+
if (!record || record.internal || record.family !== "IPv4") {
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
addresses.push(record.address);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return addresses.filter((value, index, values) => values.indexOf(value) === index);
|
|
68
|
+
}
|
|
69
|
+
export function resolvePreferredLanAddress() {
|
|
70
|
+
const interfaces = os.networkInterfaces();
|
|
71
|
+
const defaultRouteInterface = probeDefaultRouteInterface();
|
|
72
|
+
if (defaultRouteInterface) {
|
|
73
|
+
const records = (interfaces[defaultRouteInterface] ?? [])
|
|
74
|
+
.filter((record) => Boolean(record) && record.family === "IPv4" && !record.internal);
|
|
75
|
+
const preferredPrivate = records.find((record) => isPrivateLanIpv4(record.address));
|
|
76
|
+
if (preferredPrivate) {
|
|
77
|
+
return preferredPrivate.address;
|
|
78
|
+
}
|
|
79
|
+
if (records[0]) {
|
|
80
|
+
return records[0].address;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
const privateCandidates = listNonInternalIpv4Addresses()
|
|
84
|
+
.filter((address) => isPrivateLanIpv4(address))
|
|
85
|
+
.sort((left, right) => rankLanAddress(left) - rankLanAddress(right) || left.localeCompare(right));
|
|
86
|
+
if (privateCandidates[0]) {
|
|
87
|
+
return privateCandidates[0];
|
|
88
|
+
}
|
|
89
|
+
const fallback = listNonInternalIpv4Addresses()[0];
|
|
90
|
+
return fallback || null;
|
|
91
|
+
}
|