@teamclaws/teamclaw 2026.8.0 → 2026.8.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.
Files changed (54) hide show
  1. package/dist/api.js +1 -0
  2. package/dist/index.js +325 -0
  3. package/dist/src/config.js +381 -0
  4. package/dist/src/controller/controller-capacity.js +14 -0
  5. package/dist/src/controller/controller-service.js +393 -0
  6. package/dist/src/controller/controller-tools.js +582 -0
  7. package/dist/src/controller/delivery-report.js +458 -0
  8. package/dist/src/controller/github-auth.js +564 -0
  9. package/dist/src/controller/http-server.js +6032 -0
  10. package/dist/src/controller/kickoff-orchestrator.js +220 -0
  11. package/dist/src/controller/managed-gateway-process.js +286 -0
  12. package/dist/src/controller/message-router.js +38 -0
  13. package/dist/src/controller/orchestration-manifest.js +173 -0
  14. package/dist/src/controller/preview-manager.js +586 -0
  15. package/dist/src/controller/prompt-injector.js +187 -0
  16. package/dist/src/controller/role-inference.js +35 -0
  17. package/dist/src/controller/task-router.js +67 -0
  18. package/dist/src/controller/tunnel-manager.js +548 -0
  19. package/dist/src/controller/websocket.js +42 -0
  20. package/dist/src/controller/worker-provisioning.js +1648 -0
  21. package/dist/src/discovery.js +86 -0
  22. package/dist/src/git-collaboration.js +694 -0
  23. package/dist/src/identity.js +131 -0
  24. package/dist/src/install-defaults.js +1 -0
  25. package/dist/src/interaction-contracts.js +531 -0
  26. package/dist/src/networking.js +91 -0
  27. package/dist/src/openclaw-workspace.js +903 -0
  28. package/dist/src/prompt-policy.js +373 -0
  29. package/dist/src/protocol.js +58 -0
  30. package/dist/src/roles.js +349 -0
  31. package/dist/src/state.js +183 -0
  32. package/dist/src/task-executor.js +1033 -0
  33. package/dist/src/teamauto/github-client.js +192 -0
  34. package/dist/src/teamauto/norms.js +85 -0
  35. package/dist/src/teamauto/repo-sync.js +201 -0
  36. package/dist/src/teamauto/scanner.js +179 -0
  37. package/dist/src/teamauto/schedule.js +123 -0
  38. package/dist/src/teamauto/scheduler.js +688 -0
  39. package/dist/src/teamauto/store.js +133 -0
  40. package/dist/src/types.js +243 -0
  41. package/dist/src/ui/app.js +4292 -0
  42. package/dist/src/ui/assets/teamclaw-app-icon.png +0 -0
  43. package/dist/src/ui/github-login.html +296 -0
  44. package/dist/src/ui/index.html +414 -0
  45. package/dist/src/ui/style.css +2611 -0
  46. package/dist/src/worker/http-handler.js +146 -0
  47. package/dist/src/worker/message-queue.js +24 -0
  48. package/dist/src/worker/prompt-injector.js +42 -0
  49. package/dist/src/worker/skill-installer.js +253 -0
  50. package/dist/src/worker/tools.js +541 -0
  51. package/dist/src/worker/worker-service.js +234 -0
  52. package/dist/src/workspace-browser.js +269 -0
  53. package/openclaw.plugin.json +1 -1
  54. package/package.json +1 -1
@@ -0,0 +1,173 @@
1
+ import { deriveStableProjectKey } from "../openclaw-workspace.js";
2
+ const TEAMCLAW_ROLE_IDS = new Set([
3
+ "pm",
4
+ "architect",
5
+ "developer",
6
+ "qa",
7
+ "release-engineer",
8
+ "infra-engineer",
9
+ "devops",
10
+ "security-engineer",
11
+ "designer",
12
+ "marketing",
13
+ "data-engineer",
14
+ ]);
15
+ export function normalizeManifestRoleList(raw) {
16
+ if (!Array.isArray(raw)) {
17
+ return [];
18
+ }
19
+ const roleIds = [];
20
+ for (const entry of raw) {
21
+ if (typeof entry !== "string") {
22
+ continue;
23
+ }
24
+ const normalized = entry.trim();
25
+ if (!normalized || !TEAMCLAW_ROLE_IDS.has(normalized) || roleIds.includes(normalized)) {
26
+ continue;
27
+ }
28
+ roleIds.push(normalized);
29
+ }
30
+ return roleIds;
31
+ }
32
+ export function normalizeManifestStringList(raw) {
33
+ if (!Array.isArray(raw)) {
34
+ return [];
35
+ }
36
+ return raw
37
+ .map((entry) => (typeof entry === "string" ? entry.trim() : ""))
38
+ .filter(Boolean);
39
+ }
40
+ export function normalizeOptionalManifestText(raw) {
41
+ if (typeof raw !== "string") {
42
+ return undefined;
43
+ }
44
+ const normalized = raw.trim();
45
+ return normalized || undefined;
46
+ }
47
+ export function normalizeClarificationOptions(raw) {
48
+ if (!Array.isArray(raw)) {
49
+ return [];
50
+ }
51
+ return raw
52
+ .filter((entry) => !!entry && typeof entry === "object")
53
+ .map((entry) => ({
54
+ value: typeof entry.value === "string" ? entry.value.trim() : "",
55
+ label: typeof entry.label === "string" ? entry.label.trim() : "",
56
+ hint: typeof entry.hint === "string" && entry.hint.trim() ? entry.hint.trim() : undefined,
57
+ }))
58
+ .filter((entry) => entry.value && entry.label);
59
+ }
60
+ export function normalizeClarificationQuestionSchema(raw) {
61
+ if (!raw || typeof raw !== "object") {
62
+ return undefined;
63
+ }
64
+ const input = raw;
65
+ const kind = typeof input.kind === "string" ? input.kind.trim() : "";
66
+ const title = typeof input.title === "string" ? input.title.trim() : "";
67
+ if (!title || !["single-select", "multi-select", "number", "text"].includes(kind)) {
68
+ return undefined;
69
+ }
70
+ const options = normalizeClarificationOptions(input.options);
71
+ const schema = {
72
+ kind: kind,
73
+ title,
74
+ description: normalizeOptionalManifestText(input.description),
75
+ required: input.required == null ? true : Boolean(input.required),
76
+ allowOther: Boolean(input.allowOther),
77
+ placeholder: normalizeOptionalManifestText(input.placeholder),
78
+ unit: normalizeOptionalManifestText(input.unit),
79
+ };
80
+ if (options.length > 0) {
81
+ schema.options = options;
82
+ }
83
+ if (typeof input.min === "number" && Number.isFinite(input.min)) {
84
+ schema.min = input.min;
85
+ }
86
+ if (typeof input.max === "number" && Number.isFinite(input.max)) {
87
+ schema.max = input.max;
88
+ }
89
+ if (typeof input.step === "number" && Number.isFinite(input.step)) {
90
+ schema.step = input.step;
91
+ }
92
+ if ((schema.kind === "single-select" || schema.kind === "multi-select") && (!schema.options || schema.options.length === 0)) {
93
+ return undefined;
94
+ }
95
+ return schema;
96
+ }
97
+ export function normalizeClarificationQuestionSchemas(raw) {
98
+ if (!Array.isArray(raw)) {
99
+ return [];
100
+ }
101
+ return raw
102
+ .map((entry) => normalizeClarificationQuestionSchema(entry))
103
+ .filter((entry) => Boolean(entry));
104
+ }
105
+ export function normalizeManifestCreatedTasks(raw) {
106
+ if (!Array.isArray(raw)) {
107
+ return [];
108
+ }
109
+ return raw
110
+ .filter((entry) => !!entry && typeof entry === "object")
111
+ .map((entry) => ({
112
+ title: typeof entry.title === "string" ? entry.title.trim() : "",
113
+ assignedRole: normalizeManifestRoleList([entry.assignedRole])[0],
114
+ expectedOutcome: typeof entry.expectedOutcome === "string" ? entry.expectedOutcome.trim() : "",
115
+ }))
116
+ .filter((entry) => entry.title && entry.expectedOutcome);
117
+ }
118
+ export function normalizeManifestDeferredTasks(raw) {
119
+ if (!Array.isArray(raw)) {
120
+ return [];
121
+ }
122
+ return raw
123
+ .filter((entry) => !!entry && typeof entry === "object")
124
+ .map((entry) => ({
125
+ title: typeof entry.title === "string" ? entry.title.trim() : "",
126
+ assignedRole: normalizeManifestRoleList([entry.assignedRole])[0],
127
+ blockedBy: typeof entry.blockedBy === "string" ? entry.blockedBy.trim() : "",
128
+ whenReady: typeof entry.whenReady === "string" ? entry.whenReady.trim() : "",
129
+ }))
130
+ .filter((entry) => entry.title && entry.blockedBy && entry.whenReady);
131
+ }
132
+ export function normalizeManifestCompletionOpportunities(raw) {
133
+ if (!Array.isArray(raw)) {
134
+ return [];
135
+ }
136
+ return raw
137
+ .filter((entry) => !!entry && typeof entry === "object")
138
+ .map((entry) => ({
139
+ title: typeof entry.title === "string" ? entry.title.trim() : "",
140
+ value: typeof entry.value === "string" ? entry.value.trim() : "",
141
+ summary: typeof entry.summary === "string" ? entry.summary.trim() : "",
142
+ }))
143
+ .filter((entry) => entry.title && entry.value && entry.summary);
144
+ }
145
+ export function normalizeControllerManifest(raw) {
146
+ if (!raw || typeof raw !== "object") {
147
+ return null;
148
+ }
149
+ const input = raw;
150
+ const requirementSummary = typeof input.requirementSummary === "string" ? input.requirementSummary.trim() : "";
151
+ if (!requirementSummary) {
152
+ return null;
153
+ }
154
+ const clarificationSchemas = normalizeClarificationQuestionSchemas(input.clarificationSchemas);
155
+ const clarificationQuestions = normalizeManifestStringList(input.clarificationQuestions);
156
+ return {
157
+ version: typeof input.version === "string" && input.version.trim() ? input.version.trim() : "1.0",
158
+ projectName: typeof input.projectName === "string" && input.projectName.trim()
159
+ ? (deriveStableProjectKey(input.projectName.trim()) || input.projectName.trim())
160
+ : undefined,
161
+ requirementSummary,
162
+ requiredRoles: normalizeManifestRoleList(input.requiredRoles),
163
+ clarificationsNeeded: Boolean(input.clarificationsNeeded),
164
+ clarificationQuestions: clarificationQuestions.length > 0 ? clarificationQuestions : clarificationSchemas.map((entry) => entry.title),
165
+ clarificationSchemas,
166
+ createdTasks: normalizeManifestCreatedTasks(input.createdTasks),
167
+ deferredTasks: normalizeManifestDeferredTasks(input.deferredTasks),
168
+ handoffPlan: normalizeOptionalManifestText(input.handoffPlan),
169
+ notes: normalizeOptionalManifestText(input.notes),
170
+ completionOpportunities: normalizeManifestCompletionOpportunities(input.completionOpportunities),
171
+ requirementFullyComplete: Boolean(input.requirementFullyComplete),
172
+ };
173
+ }