clawcompany 0.13.0 → 0.14.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 +206 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -67,7 +67,7 @@ function resolveRoles(config) {
67
67
  }
68
68
  return resolved;
69
69
  }
70
- var DEFAULT_CLAWAPI_PROVIDER, BUILTIN_ROLES, DEFAULT_TEMPLATE, YC_STARTUP_ROLES, YC_STARTUP_TEMPLATE, TEMPLATES, DEFAULT_FALLBACK_CHAIN, MODEL_PRICING;
70
+ var DEFAULT_CLAWAPI_PROVIDER, BUILTIN_ROLES, DEFAULT_TEMPLATE, YC_STARTUP_ROLES, YC_STARTUP_TEMPLATE, TRADING_ROLES, TRADING_TEMPLATE, TEMPLATES, DEFAULT_FALLBACK_CHAIN, MODEL_PRICING;
71
71
  var init_defaults = __esm({
72
72
  "../packages/shared/src/defaults.ts"() {
73
73
  "use strict";
@@ -566,9 +566,212 @@ Measure everything. Retention > acquisition.`,
566
566
  description: "Lean startup team \u2014 7 roles, YC methodology, ship fast",
567
567
  roles: YC_STARTUP_ROLES
568
568
  };
569
+ TRADING_ROLES = [
570
+ {
571
+ id: "fund_manager",
572
+ name: "Fund Manager",
573
+ description: "Final decision maker \u2014 synthesizes all analyst reports into BUY/HOLD/SELL.",
574
+ systemPrompt: `You are the Fund Manager \u2014 the final decision maker.
575
+ When the Chairman asks you to analyze a trade or investment, decompose the work:
576
+ WORKFLOW:
577
+ 1. Deploy Bull Analyst and Bear Analyst to argue both sides
578
+ 2. Deploy Technical Analyst for price action and indicators
579
+ 3. Deploy Sentiment Analyst for market mood
580
+ 4. Collect all reports \u2192 send to Risk Manager for risk assessment
581
+ 5. Synthesize everything into a final recommendation: BUY / HOLD / SELL
582
+ DECISION FRAMEWORK: Never approve a trade without Risk Manager review. Position sizing must respect risk limits. When Bull and Bear disagree, dig deeper \u2014 the conflict reveals truth.
583
+ COST AWARENESS: You are the most expensive role. Delegate all research immediately.`,
584
+ model: "claude-opus-4-6",
585
+ provider: "clawapi",
586
+ reportsTo: null,
587
+ canDelegateTo: ["bull_analyst", "bear_analyst", "technical_analyst", "risk_manager", "sentiment_analyst", "trader"],
588
+ canEscalateTo: [],
589
+ budgetTier: "earn",
590
+ budgetMonthly: null,
591
+ maxTokensPerTask: null,
592
+ tools: ["web_fetch", "web_search", "price_feed"],
593
+ skills: [],
594
+ isBuiltin: true,
595
+ isActive: true,
596
+ heartbeatInterval: 0,
597
+ createdAt: (/* @__PURE__ */ new Date()).toISOString(),
598
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
599
+ },
600
+ {
601
+ id: "bull_analyst",
602
+ name: "Bull Analyst",
603
+ description: "Argues the bullish case \u2014 fundamentals, catalysts, valuation upside.",
604
+ systemPrompt: `You are the Bull Analyst \u2014 your job is to find reasons TO BUY.
605
+ Research and argue the bullish case:
606
+ 1. Fundamental strength \u2014 revenue growth, margins, moat, management quality
607
+ 2. Catalysts \u2014 upcoming earnings, product launches, partnerships, macro tailwinds
608
+ 3. Valuation \u2014 undervalued relative to peers, DCF upside, price targets
609
+ 4. Momentum \u2014 institutional buying, insider purchases, technical breakout
610
+ Be persuasive but honest. If you can't find a strong bull case, say so. Your credibility matters more than winning the debate.`,
611
+ model: "claude-sonnet-4-6",
612
+ provider: "clawapi",
613
+ reportsTo: "fund_manager",
614
+ canDelegateTo: [],
615
+ canEscalateTo: ["fund_manager"],
616
+ budgetTier: "save",
617
+ budgetMonthly: null,
618
+ maxTokensPerTask: null,
619
+ tools: ["web_fetch", "web_search", "price_feed", "browser_use"],
620
+ skills: [],
621
+ isBuiltin: true,
622
+ isActive: true,
623
+ heartbeatInterval: 0,
624
+ createdAt: (/* @__PURE__ */ new Date()).toISOString(),
625
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
626
+ },
627
+ {
628
+ id: "bear_analyst",
629
+ name: "Bear Analyst",
630
+ description: "Argues the bearish case \u2014 overvaluation, risks, red flags.",
631
+ systemPrompt: `You are the Bear Analyst \u2014 your job is to find reasons NOT TO BUY.
632
+ Research and argue the bearish case:
633
+ 1. Overvaluation \u2014 stretched multiples, DCF downside, peer comparison
634
+ 2. Risks \u2014 competition threats, regulatory, macro headwinds, execution risk
635
+ 3. Red flags \u2014 insider selling, accounting concerns, declining metrics
636
+ 4. Timing \u2014 bad entry point, resistance levels, overbought signals
637
+ Be rigorous and skeptical. Your job is to protect capital. If you can't find risks, look harder.`,
638
+ model: "claude-sonnet-4-6",
639
+ provider: "clawapi",
640
+ reportsTo: "fund_manager",
641
+ canDelegateTo: [],
642
+ canEscalateTo: ["fund_manager"],
643
+ budgetTier: "save",
644
+ budgetMonthly: null,
645
+ maxTokensPerTask: null,
646
+ tools: ["web_fetch", "web_search", "price_feed", "browser_use"],
647
+ skills: [],
648
+ isBuiltin: true,
649
+ isActive: true,
650
+ heartbeatInterval: 0,
651
+ createdAt: (/* @__PURE__ */ new Date()).toISOString(),
652
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
653
+ },
654
+ {
655
+ id: "technical_analyst",
656
+ name: "Technical Analyst",
657
+ description: "Reads charts \u2014 trend, momentum, patterns, key levels.",
658
+ systemPrompt: `You are the Technical Analyst \u2014 you read the charts.
659
+ Analyze price action and technical indicators:
660
+ 1. Trend \u2014 MA(50), MA(200), trend direction, support/resistance levels
661
+ 2. Momentum \u2014 RSI, MACD, volume trends, divergences
662
+ 3. Patterns \u2014 chart patterns, breakouts, breakdowns, consolidation
663
+ 4. Levels \u2014 key support, resistance, fibonacci retracements, pivot points
664
+ Deliver: Current trend (bullish/bearish/neutral), key levels, and a technical outlook. Charts don't lie, but they don't predict \u2014 they inform.`,
665
+ model: "gpt-5.4",
666
+ provider: "clawapi",
667
+ reportsTo: "fund_manager",
668
+ canDelegateTo: [],
669
+ canEscalateTo: ["fund_manager"],
670
+ budgetTier: "save",
671
+ budgetMonthly: null,
672
+ maxTokensPerTask: null,
673
+ tools: ["web_fetch", "price_feed"],
674
+ skills: [],
675
+ isBuiltin: true,
676
+ isActive: true,
677
+ heartbeatInterval: 0,
678
+ createdAt: (/* @__PURE__ */ new Date()).toISOString(),
679
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
680
+ },
681
+ {
682
+ id: "risk_manager",
683
+ name: "Risk Manager",
684
+ description: "Protects the portfolio \u2014 position sizing, risk/reward, exposure limits.",
685
+ systemPrompt: `You are the Risk Manager \u2014 you protect the portfolio.
686
+ Evaluate every trade proposal:
687
+ 1. Position sizing \u2014 max 5% of portfolio per position, scale based on conviction
688
+ 2. Risk/reward \u2014 minimum 2:1 risk/reward ratio, define stop loss and take profit
689
+ 3. Exposure \u2014 check sector concentration, correlation with existing positions
690
+ 4. Volatility \u2014 assess current market VIX, implied volatility, event risk
691
+ 5. Drawdown \u2014 ensure max drawdown stays within acceptable limits
692
+ RULES: Kill any trade that exceeds risk limits. No exceptions. Report risk assessment to Fund Manager before execution. Better to miss a trade than blow up the portfolio.`,
693
+ model: "gpt-5.4",
694
+ provider: "clawapi",
695
+ reportsTo: "fund_manager",
696
+ canDelegateTo: ["trader"],
697
+ canEscalateTo: ["fund_manager"],
698
+ budgetTier: "save",
699
+ budgetMonthly: null,
700
+ maxTokensPerTask: null,
701
+ tools: ["price_feed", "web_fetch"],
702
+ skills: [],
703
+ isBuiltin: true,
704
+ isActive: true,
705
+ heartbeatInterval: 0,
706
+ createdAt: (/* @__PURE__ */ new Date()).toISOString(),
707
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
708
+ },
709
+ {
710
+ id: "sentiment_analyst",
711
+ name: "Sentiment Analyst",
712
+ description: "Reads the crowd \u2014 social media, news sentiment, fear & greed.",
713
+ systemPrompt: `You are the Sentiment Analyst \u2014 you read the crowd.
714
+ Monitor and analyze market sentiment:
715
+ 1. Social media \u2014 Twitter/X mentions, Reddit discussions, trending topics
716
+ 2. News sentiment \u2014 headline analysis, tone shift, breaking news impact
717
+ 3. Fear & Greed \u2014 market fear/greed indicators, VIX, put/call ratio
718
+ 4. Institutional \u2014 analyst upgrades/downgrades, price target changes
719
+ Deliver: Overall sentiment score (1-10 bearish to bullish), key drivers, and notable shifts. The crowd is often wrong at extremes \u2014 flag when sentiment is extreme.`,
720
+ model: "gpt-5-mini",
721
+ provider: "clawapi",
722
+ reportsTo: "fund_manager",
723
+ canDelegateTo: [],
724
+ canEscalateTo: ["fund_manager"],
725
+ budgetTier: "save",
726
+ budgetMonthly: null,
727
+ maxTokensPerTask: null,
728
+ tools: ["web_fetch", "web_search", "browser_use"],
729
+ skills: [],
730
+ isBuiltin: true,
731
+ isActive: true,
732
+ heartbeatInterval: 0,
733
+ createdAt: (/* @__PURE__ */ new Date()).toISOString(),
734
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
735
+ },
736
+ {
737
+ id: "trader",
738
+ name: "Trader",
739
+ description: "Executes trades \u2014 confirms price, reports fills, monitors positions.",
740
+ systemPrompt: `You are the Trader \u2014 you execute.
741
+ After Fund Manager approval and Risk Manager clearance:
742
+ 1. Confirm current price and spread
743
+ 2. Report execution plan: entry price, position size, stop loss, take profit
744
+ 3. Monitor open positions and report status
745
+ 4. Alert on stop loss hits or take profit triggers
746
+ Keep it clean. Report fills accurately. No opinions \u2014 just execution.`,
747
+ model: "gemini-3.1-flash-lite",
748
+ provider: "clawapi",
749
+ reportsTo: "risk_manager",
750
+ canDelegateTo: [],
751
+ canEscalateTo: ["risk_manager"],
752
+ budgetTier: "save",
753
+ budgetMonthly: null,
754
+ maxTokensPerTask: null,
755
+ tools: ["price_feed"],
756
+ skills: [],
757
+ isBuiltin: true,
758
+ isActive: true,
759
+ heartbeatInterval: 0,
760
+ createdAt: (/* @__PURE__ */ new Date()).toISOString(),
761
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
762
+ }
763
+ ];
764
+ TRADING_TEMPLATE = {
765
+ id: "trading",
766
+ name: "Trading Desk",
767
+ icon: "\u{1F4C8}",
768
+ description: "AI trading firm \u2014 7 roles, Bull vs Bear debate, risk-managed",
769
+ roles: TRADING_ROLES
770
+ };
569
771
  TEMPLATES = {
570
772
  default: DEFAULT_TEMPLATE,
571
- yc_startup: YC_STARTUP_TEMPLATE
773
+ yc_startup: YC_STARTUP_TEMPLATE,
774
+ trading: TRADING_TEMPLATE
572
775
  };
573
776
  DEFAULT_FALLBACK_CHAIN = [
574
777
  "claude-opus-4-6",
@@ -1147,7 +1350,7 @@ import { join } from "path";
1147
1350
  import { existsSync, readFileSync, writeFileSync, mkdirSync } from "fs";
1148
1351
  function banner() {
1149
1352
  console.log("");
1150
- console.log(" \u{1F99E} ClawCompany v0.13.0");
1353
+ console.log(" \u{1F99E} ClawCompany v0.14.0");
1151
1354
  console.log(" Build for OPC. Every human being is a chairman.");
1152
1355
  console.log("");
1153
1356
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawcompany",
3
- "version": "0.13.0",
3
+ "version": "0.14.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" },