@teamclaws/teamclaw 2026.3.26-2 → 2026.4.2-2

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 (46) hide show
  1. package/README.md +52 -8
  2. package/cli.mjs +538 -224
  3. package/index.ts +76 -27
  4. package/openclaw.plugin.json +53 -28
  5. package/package.json +5 -2
  6. package/skills/teamclaw/SKILL.md +213 -0
  7. package/skills/teamclaw/references/api-quick-ref.md +117 -0
  8. package/skills/teamclaw-setup/SKILL.md +81 -0
  9. package/skills/teamclaw-setup/references/install-modes.md +136 -0
  10. package/skills/teamclaw-setup/references/validation-checklist.md +73 -0
  11. package/src/config.ts +44 -16
  12. package/src/controller/controller-capacity.ts +2 -2
  13. package/src/controller/controller-service.ts +193 -47
  14. package/src/controller/controller-tools.ts +102 -2
  15. package/src/controller/delivery-report.ts +563 -0
  16. package/src/controller/http-server.ts +1907 -172
  17. package/src/controller/kickoff-orchestrator.ts +292 -0
  18. package/src/controller/managed-gateway-process.ts +330 -0
  19. package/src/controller/orchestration-manifest.ts +69 -1
  20. package/src/controller/preview-manager.ts +676 -0
  21. package/src/controller/prompt-injector.ts +116 -67
  22. package/src/controller/role-inference.ts +41 -0
  23. package/src/controller/websocket.ts +3 -1
  24. package/src/controller/worker-provisioning.ts +429 -74
  25. package/src/discovery.ts +1 -1
  26. package/src/git-collaboration.ts +198 -47
  27. package/src/identity.ts +12 -2
  28. package/src/interaction-contracts.ts +179 -3
  29. package/src/networking.ts +99 -0
  30. package/src/openclaw-workspace.ts +478 -11
  31. package/src/prompt-policy.ts +381 -0
  32. package/src/roles.ts +37 -36
  33. package/src/state.ts +40 -1
  34. package/src/task-executor.ts +282 -78
  35. package/src/types.ts +150 -7
  36. package/src/ui/app.js +1403 -175
  37. package/src/ui/assets/teamclaw-app-icon.png +0 -0
  38. package/src/ui/index.html +122 -40
  39. package/src/ui/style.css +829 -143
  40. package/src/worker/http-handler.ts +40 -4
  41. package/src/worker/prompt-injector.ts +9 -38
  42. package/src/worker/skill-installer.ts +2 -2
  43. package/src/worker/tools.ts +31 -5
  44. package/src/worker/worker-service.ts +49 -8
  45. package/src/workspace-browser.ts +20 -7
  46. package/src/controller/local-worker-manager.ts +0 -533
@@ -1,4 +1,6 @@
1
1
  import type {
2
+ ClarificationQuestionOption,
3
+ ClarificationQuestionSchema,
2
4
  ControllerManifestCreatedTask,
3
5
  ControllerManifestDeferredTask,
4
6
  ControllerOrchestrationManifest,
@@ -53,6 +55,67 @@ export function normalizeOptionalManifestText(raw: unknown): string | undefined
53
55
  return normalized || undefined;
54
56
  }
55
57
 
58
+ export function normalizeClarificationOptions(raw: unknown): ClarificationQuestionOption[] {
59
+ if (!Array.isArray(raw)) {
60
+ return [];
61
+ }
62
+ return raw
63
+ .filter((entry): entry is Record<string, unknown> => !!entry && typeof entry === "object")
64
+ .map((entry) => ({
65
+ value: typeof entry.value === "string" ? entry.value.trim() : "",
66
+ label: typeof entry.label === "string" ? entry.label.trim() : "",
67
+ hint: typeof entry.hint === "string" && entry.hint.trim() ? entry.hint.trim() : undefined,
68
+ }))
69
+ .filter((entry) => entry.value && entry.label);
70
+ }
71
+
72
+ export function normalizeClarificationQuestionSchema(raw: unknown): ClarificationQuestionSchema | undefined {
73
+ if (!raw || typeof raw !== "object") {
74
+ return undefined;
75
+ }
76
+ const input = raw as Record<string, unknown>;
77
+ const kind = typeof input.kind === "string" ? input.kind.trim() : "";
78
+ const title = typeof input.title === "string" ? input.title.trim() : "";
79
+ if (!title || !["single-select", "multi-select", "number", "text"].includes(kind)) {
80
+ return undefined;
81
+ }
82
+ const options = normalizeClarificationOptions(input.options);
83
+ const schema: ClarificationQuestionSchema = {
84
+ kind: kind as ClarificationQuestionSchema["kind"],
85
+ title,
86
+ description: normalizeOptionalManifestText(input.description),
87
+ required: input.required == null ? true : Boolean(input.required),
88
+ allowOther: Boolean(input.allowOther),
89
+ placeholder: normalizeOptionalManifestText(input.placeholder),
90
+ unit: normalizeOptionalManifestText(input.unit),
91
+ };
92
+ if (options.length > 0) {
93
+ schema.options = options;
94
+ }
95
+ if (typeof input.min === "number" && Number.isFinite(input.min)) {
96
+ schema.min = input.min;
97
+ }
98
+ if (typeof input.max === "number" && Number.isFinite(input.max)) {
99
+ schema.max = input.max;
100
+ }
101
+ if (typeof input.step === "number" && Number.isFinite(input.step)) {
102
+ schema.step = input.step;
103
+ }
104
+ if ((schema.kind === "single-select" || schema.kind === "multi-select") && (!schema.options || schema.options.length === 0)) {
105
+ return undefined;
106
+ }
107
+ return schema;
108
+ }
109
+
110
+ export function normalizeClarificationQuestionSchemas(raw: unknown): ClarificationQuestionSchema[] {
111
+ if (!Array.isArray(raw)) {
112
+ return [];
113
+ }
114
+ return raw
115
+ .map((entry) => normalizeClarificationQuestionSchema(entry))
116
+ .filter((entry): entry is ClarificationQuestionSchema => Boolean(entry));
117
+ }
118
+
56
119
  export function normalizeManifestCreatedTasks(raw: unknown): ControllerManifestCreatedTask[] {
57
120
  if (!Array.isArray(raw)) {
58
121
  return [];
@@ -91,15 +154,20 @@ export function normalizeControllerManifest(raw: unknown): ControllerOrchestrati
91
154
  if (!requirementSummary) {
92
155
  return null;
93
156
  }
157
+ const clarificationSchemas = normalizeClarificationQuestionSchemas(input.clarificationSchemas);
158
+ const clarificationQuestions = normalizeManifestStringList(input.clarificationQuestions);
94
159
  return {
95
160
  version: typeof input.version === "string" && input.version.trim() ? input.version.trim() : "1.0",
161
+ projectName: typeof input.projectName === "string" && input.projectName.trim() ? input.projectName.trim() : undefined,
96
162
  requirementSummary,
97
163
  requiredRoles: normalizeManifestRoleList(input.requiredRoles),
98
164
  clarificationsNeeded: Boolean(input.clarificationsNeeded),
99
- clarificationQuestions: normalizeManifestStringList(input.clarificationQuestions),
165
+ clarificationQuestions: clarificationQuestions.length > 0 ? clarificationQuestions : clarificationSchemas.map((entry) => entry.title),
166
+ clarificationSchemas,
100
167
  createdTasks: normalizeManifestCreatedTasks(input.createdTasks),
101
168
  deferredTasks: normalizeManifestDeferredTasks(input.deferredTasks),
102
169
  handoffPlan: normalizeOptionalManifestText(input.handoffPlan),
103
170
  notes: normalizeOptionalManifestText(input.notes),
171
+ requirementFullyComplete: Boolean(input.requirementFullyComplete),
104
172
  };
105
173
  }