clawcompany 0.30.0 → 0.31.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 +7 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2149,7 +2149,7 @@ import { join } from "path";
2149
2149
  import { existsSync, readFileSync, writeFileSync, mkdirSync } from "fs";
2150
2150
  function banner() {
2151
2151
  console.log("");
2152
- console.log(" \u{1F99E} ClawCompany v0.30.0");
2152
+ console.log(" \u{1F99E} ClawCompany v0.31.0");
2153
2153
  console.log(" Build for OPC. Every human being is a chairman.");
2154
2154
  console.log("");
2155
2155
  }
@@ -2381,7 +2381,7 @@ async function marketInstallCommand(itemId) {
2381
2381
  const builtin = BUILTIN_ROLES.find((r) => r.id === id);
2382
2382
  const name = overrides.name ?? builtin?.name ?? id;
2383
2383
  const model = overrides.model ?? builtin?.model ?? "default";
2384
- const reportsTo = overrides.reportsTo ?? builtin?.reportsTo ?? "ceo";
2384
+ const reportsTo = overrides.reportsTo ?? builtin?.reportsTo ?? null;
2385
2385
  const pricing = MODEL_PRICING[model];
2386
2386
  const cost = pricing ? `$${pricing.input}/$${pricing.output}` : "";
2387
2387
  activeRoles.push({ id, name, model, reportsTo });
@@ -3532,8 +3532,11 @@ var TaskOrchestrator = class {
3532
3532
  }
3533
3533
  /** Get the leader role ID (reportsTo === null) */
3534
3534
  getLeaderId() {
3535
- const leader = this.router.getRoles().find((r) => r.reportsTo === null && r.budgetTier !== "survive");
3536
- return leader?.id ?? "ceo";
3535
+ const roles = this.router.getRoles().filter((r) => r.budgetTier !== "survive");
3536
+ const leader = roles.find((r) => r.reportsTo === null);
3537
+ if (leader) return leader.id;
3538
+ if (roles.length > 0) return roles[0].id;
3539
+ throw new Error("No active roles configured");
3537
3540
  }
3538
3541
  /**
3539
3542
  * Phase 2: Leader decomposes mission into work streams.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawcompany",
3
- "version": "0.30.0",
3
+ "version": "0.31.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" },