clawcompany 0.24.0 → 0.25.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.
Files changed (2) hide show
  1. package/dist/index.js +14 -9
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1929,7 +1929,7 @@ import { join } from "path";
1929
1929
  import { existsSync, readFileSync, writeFileSync, mkdirSync } from "fs";
1930
1930
  function banner() {
1931
1931
  console.log("");
1932
- console.log(" \u{1F99E} ClawCompany v0.24.0");
1932
+ console.log(" \u{1F99E} ClawCompany v0.25.0");
1933
1933
  console.log(" Build for OPC. Every human being is a chairman.");
1934
1934
  console.log("");
1935
1935
  }
@@ -3266,16 +3266,21 @@ var TaskOrchestrator = class {
3266
3266
  setMemoryContext(ctx) {
3267
3267
  this.memoryContext = ctx;
3268
3268
  }
3269
+ /** Get the leader role ID (reportsTo === null) */
3270
+ getLeaderId() {
3271
+ const leader = this.router.getRoles().find((r) => r.reportsTo === null && r.budgetTier !== "survive");
3272
+ return leader?.id ?? "ceo";
3273
+ }
3269
3274
  /**
3270
- * Phase 2: CEO decomposes mission into work streams.
3271
- * Human (Chairman) gives the mission → CEO breaks it down.
3275
+ * Phase 2: Leader decomposes mission into work streams.
3276
+ * Human (Chairman) gives the mission → leader breaks it down.
3272
3277
  */
3273
3278
  async decompose(mission) {
3274
- const ceo = this.router.getRole("ceo");
3275
- if (!ceo) throw new Error("CEO role not configured");
3276
- const roles = this.router.getRoles().filter((r) => r.isActive && r.id !== "ceo" && r.budgetTier !== "survive");
3279
+ const leader = this.router.getRoles().find((r) => r.reportsTo === null && r.budgetTier !== "survive");
3280
+ if (!leader) throw new Error("No leader role configured");
3281
+ const roles = this.router.getRoles().filter((r) => r.isActive && r.id !== leader.id && r.budgetTier !== "survive");
3277
3282
  const roleList = roles.map((r) => `- ${r.id}: ${r.name} (${r.model}) \u2014 ${r.description}`).join("\n");
3278
- const response = await this.router.chatAsRole("ceo", [
3283
+ const response = await this.router.chatAsRole(leader.id, [
3279
3284
  {
3280
3285
  role: "user",
3281
3286
  content: `Mission from the Chairman (human):
@@ -3424,8 +3429,8 @@ ${this.memoryContext}` : ""}
3424
3429
 
3425
3430
  Today's date is ${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]}.`,
3426
3431
  assignedTo: ws.assignTo,
3427
- createdBy: "ceo",
3428
- reportTo: "ceo",
3432
+ createdBy: this.getLeaderId(),
3433
+ reportTo: this.getLeaderId(),
3429
3434
  status: "in_progress",
3430
3435
  priority: 1,
3431
3436
  tokensIn: 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawcompany",
3
- "version": "0.24.0",
3
+ "version": "0.25.0",
4
4
  "description": "Build for OPC. Every human being is a chairman. AI company infrastructure — one key, 9 roles, 4 models.",
5
5
  "type": "module",
6
6
  "bin": { "clawcompany": "dist/index.js" },