panopticon-cli 0.4.33 → 0.5.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 (71) hide show
  1. package/README.md +96 -210
  2. package/dist/{agents-VLK4BMVA.js → agents-5OPQKM5K.js} +6 -5
  3. package/dist/{chunk-OMNXYPXC.js → chunk-2V4NF7J2.js} +14 -1
  4. package/dist/chunk-2V4NF7J2.js.map +1 -0
  5. package/dist/{chunk-XKT5MHPT.js → chunk-4YSYJ4HM.js} +2 -2
  6. package/dist/{chunk-XFR2DLMR.js → chunk-76F6DSVS.js} +49 -10
  7. package/dist/chunk-76F6DSVS.js.map +1 -0
  8. package/dist/{chunk-PI7Y3PSN.js → chunk-F5555J3A.js} +42 -6
  9. package/dist/chunk-F5555J3A.js.map +1 -0
  10. package/dist/{chunk-KJ2TRXNK.js → chunk-FTCPTHIJ.js} +47 -420
  11. package/dist/chunk-FTCPTHIJ.js.map +1 -0
  12. package/dist/chunk-HJSM6E6U.js +1038 -0
  13. package/dist/chunk-HJSM6E6U.js.map +1 -0
  14. package/dist/{chunk-RBUO57TC.js → chunk-NLQRED36.js} +3 -3
  15. package/dist/chunk-NLQRED36.js.map +1 -0
  16. package/dist/{chunk-ASY7T35E.js → chunk-OWHXCGVO.js} +245 -90
  17. package/dist/chunk-OWHXCGVO.js.map +1 -0
  18. package/dist/{chunk-BKCWRMUX.js → chunk-VHKSS7QX.js} +106 -11
  19. package/dist/chunk-VHKSS7QX.js.map +1 -0
  20. package/dist/{chunk-GFP3PIPB.js → chunk-YGJ54GW2.js} +1 -1
  21. package/dist/chunk-YGJ54GW2.js.map +1 -0
  22. package/dist/cli/index.js +1521 -935
  23. package/dist/cli/index.js.map +1 -1
  24. package/dist/dashboard/prompts/work-agent.md +2 -0
  25. package/dist/dashboard/public/assets/index-Ce6q21Fm.js +743 -0
  26. package/dist/dashboard/public/assets/{index-UjZq6ykz.css → index-NzpI0ItZ.css} +1 -1
  27. package/dist/dashboard/public/index.html +2 -2
  28. package/dist/dashboard/server.js +4274 -2320
  29. package/dist/{feedback-writer-LVZ5TFYZ.js → feedback-writer-VRMMWWTW.js} +2 -2
  30. package/dist/git-utils-I2UDKNZH.js +131 -0
  31. package/dist/git-utils-I2UDKNZH.js.map +1 -0
  32. package/dist/index.d.ts +12 -1
  33. package/dist/index.js +5 -3
  34. package/dist/index.js.map +1 -1
  35. package/dist/{projects-JEIVIYC6.js → projects-CFX3RTDL.js} +4 -2
  36. package/dist/{remote-workspace-AHVHQEES.js → remote-workspace-7FPGF2RM.js} +2 -2
  37. package/dist/{review-status-EPFG4XM7.js → review-status-TDPSOU5J.js} +2 -2
  38. package/dist/{specialist-context-T3NBMCIE.js → specialist-context-WGUUYDWY.js} +5 -5
  39. package/dist/{specialist-logs-CVKD3YJ3.js → specialist-logs-XJB5TCKJ.js} +5 -5
  40. package/dist/{specialists-TKAP6T6Z.js → specialists-5LBRHYFA.js} +5 -5
  41. package/dist/{traefik-QX4ZV4YG.js → traefik-WFMQX2LY.js} +3 -3
  42. package/dist/{workspace-manager-KLHUCIZV.js → workspace-manager-E434Z45T.js} +2 -2
  43. package/package.json +1 -1
  44. package/scripts/record-cost-event.js +5 -5
  45. package/scripts/stop-hook +7 -0
  46. package/scripts/work-agent-stop-hook +137 -0
  47. package/skills/myn-standards/SKILL.md +351 -0
  48. package/skills/pan-new-project/SKILL.md +304 -0
  49. package/skills/write-spec/SKILL.md +138 -0
  50. package/dist/chunk-7XNJJBH6.js +0 -538
  51. package/dist/chunk-7XNJJBH6.js.map +0 -1
  52. package/dist/chunk-ASY7T35E.js.map +0 -1
  53. package/dist/chunk-BKCWRMUX.js.map +0 -1
  54. package/dist/chunk-GFP3PIPB.js.map +0 -1
  55. package/dist/chunk-KJ2TRXNK.js.map +0 -1
  56. package/dist/chunk-OMNXYPXC.js.map +0 -1
  57. package/dist/chunk-PI7Y3PSN.js.map +0 -1
  58. package/dist/chunk-RBUO57TC.js.map +0 -1
  59. package/dist/chunk-XFR2DLMR.js.map +0 -1
  60. package/dist/dashboard/public/assets/index-kAJqtLDO.js +0 -708
  61. /package/dist/{agents-VLK4BMVA.js.map → agents-5OPQKM5K.js.map} +0 -0
  62. /package/dist/{chunk-XKT5MHPT.js.map → chunk-4YSYJ4HM.js.map} +0 -0
  63. /package/dist/{feedback-writer-LVZ5TFYZ.js.map → feedback-writer-VRMMWWTW.js.map} +0 -0
  64. /package/dist/{projects-JEIVIYC6.js.map → projects-CFX3RTDL.js.map} +0 -0
  65. /package/dist/{remote-workspace-AHVHQEES.js.map → remote-workspace-7FPGF2RM.js.map} +0 -0
  66. /package/dist/{review-status-EPFG4XM7.js.map → review-status-TDPSOU5J.js.map} +0 -0
  67. /package/dist/{specialist-context-T3NBMCIE.js.map → specialist-context-WGUUYDWY.js.map} +0 -0
  68. /package/dist/{specialist-logs-CVKD3YJ3.js.map → specialist-logs-XJB5TCKJ.js.map} +0 -0
  69. /package/dist/{specialists-TKAP6T6Z.js.map → specialists-5LBRHYFA.js.map} +0 -0
  70. /package/dist/{traefik-QX4ZV4YG.js.map → traefik-WFMQX2LY.js.map} +0 -0
  71. /package/dist/{workspace-manager-KLHUCIZV.js.map → workspace-manager-E434Z45T.js.map} +0 -0
@@ -1,7 +1,10 @@
1
1
  import {
2
+ MODEL_CAPABILITIES,
3
+ getModelCapability,
2
4
  init_config_yaml,
5
+ init_model_capabilities,
3
6
  loadConfig
4
- } from "./chunk-7XNJJBH6.js";
7
+ } from "./chunk-HJSM6E6U.js";
5
8
  import {
6
9
  AGENTS_DIR,
7
10
  PANOPTICON_HOME,
@@ -134,6 +137,43 @@ function capturePane(sessionName, lines = 50) {
134
137
  return "";
135
138
  }
136
139
  }
140
+ async function capturePaneAsync(sessionName, lines = 50) {
141
+ try {
142
+ const { stdout } = await execAsync(`tmux capture-pane -t ${sessionName} -p -S -${lines}`, {
143
+ encoding: "utf-8"
144
+ });
145
+ return stdout;
146
+ } catch {
147
+ return "";
148
+ }
149
+ }
150
+ async function waitForClaudePrompt(sessionName, timeoutMs = 15e3) {
151
+ const start = Date.now();
152
+ const POLL = 500;
153
+ while (Date.now() - start < timeoutMs) {
154
+ const output = await capturePaneAsync(sessionName, 10);
155
+ const lines = output.split("\n").filter((l) => l.trim());
156
+ const lastLine = lines[lines.length - 1] || "";
157
+ if (lastLine.includes("\u276F")) return true;
158
+ await new Promise((r) => setTimeout(r, POLL));
159
+ }
160
+ return false;
161
+ }
162
+ async function confirmDelivery(sessionName, outputBefore, timeoutMs = 1e4) {
163
+ const start = Date.now();
164
+ const POLL = 1e3;
165
+ const beforeLineCount = outputBefore.split("\n").filter((l) => l.trim()).length;
166
+ while (Date.now() - start < timeoutMs) {
167
+ await new Promise((r) => setTimeout(r, POLL));
168
+ const after = await capturePaneAsync(sessionName, 50);
169
+ const afterLines = after.split("\n").filter((l) => l.trim());
170
+ const afterLineCount = afterLines.length;
171
+ if (afterLineCount > beforeLineCount + 1) return true;
172
+ const newOutput = afterLines.slice(beforeLineCount).join("\n");
173
+ if (newOutput.includes("\u25CF") || newOutput.includes("\u23BF") || newOutput.includes("Read")) return true;
174
+ }
175
+ return false;
176
+ }
137
177
  function getAgentSessions() {
138
178
  return listSessions().filter((s) => s.name.startsWith("agent-"));
139
179
  }
@@ -518,422 +558,6 @@ var init_model_fallback = __esm({
518
558
  }
519
559
  });
520
560
 
521
- // src/lib/model-capabilities.ts
522
- function getModelCapability(model) {
523
- return MODEL_CAPABILITIES[model];
524
- }
525
- var MODEL_CAPABILITIES;
526
- var init_model_capabilities = __esm({
527
- "src/lib/model-capabilities.ts"() {
528
- "use strict";
529
- init_esm_shims();
530
- MODEL_CAPABILITIES = {
531
- // ═══════════════════════════════════════════════════════════════════════════
532
- // ANTHROPIC MODELS
533
- // ═══════════════════════════════════════════════════════════════════════════
534
- "claude-opus-4-6": {
535
- model: "claude-opus-4-6",
536
- provider: "anthropic",
537
- displayName: "Claude Opus 4.6",
538
- costPer1MTokens: 45,
539
- // $5 in / $25 out → same pricing as 4.5
540
- contextWindow: 2e5,
541
- // 1M available via opt-in beta, but we use 200K
542
- skills: {
543
- "code-generation": 96,
544
- // 80.9% SWE-bench (first >80%), 89.4% Aider Polyglot
545
- "code-review": 98,
546
- debugging: 97,
547
- planning: 99,
548
- // User confirms: "Opus 4.6 planning for sure"
549
- documentation: 95,
550
- testing: 92,
551
- security: 98,
552
- // Best for security review
553
- performance: 90,
554
- synthesis: 98,
555
- // Best for combining info across domains
556
- speed: 40,
557
- // Slower but 76% more token efficient
558
- "context-length": 95
559
- },
560
- notes: "Successor to Opus 4.5. Same pricing, 1M context available (opt-in beta). Best for planning, security, complex reasoning."
561
- },
562
- "claude-sonnet-4-6": {
563
- model: "claude-sonnet-4-6",
564
- provider: "anthropic",
565
- displayName: "Claude Sonnet 4.6",
566
- costPer1MTokens: 9,
567
- // $3 in / $15 out → avg ~$9
568
- contextWindow: 2e5,
569
- skills: {
570
- "code-generation": 94,
571
- "code-review": 94,
572
- debugging: 92,
573
- planning: 90,
574
- documentation: 92,
575
- testing: 92,
576
- security: 88,
577
- performance: 88,
578
- synthesis: 90,
579
- speed: 70,
580
- "context-length": 95
581
- },
582
- notes: "Successor to Sonnet 4.5. Same pricing tier. Improved coding and reasoning."
583
- },
584
- "claude-sonnet-4-5": {
585
- model: "claude-sonnet-4-5",
586
- provider: "anthropic",
587
- displayName: "Claude Sonnet 4.5",
588
- costPer1MTokens: 9,
589
- // $3 in / $15 out → avg ~$9
590
- contextWindow: 2e5,
591
- skills: {
592
- "code-generation": 92,
593
- // 77.2% SWE-bench (82% parallel), beats GPT-5 Codex (74.5%)
594
- "code-review": 92,
595
- debugging: 90,
596
- planning: 88,
597
- documentation: 90,
598
- // 100% AIME with Python
599
- testing: 90,
600
- // 50% Terminal-Bench, 61.4% OSWorld
601
- security: 85,
602
- performance: 85,
603
- synthesis: 88,
604
- speed: 70,
605
- "context-length": 95
606
- },
607
- notes: "Best value: 77.2% SWE-bench at 1/5th Opus cost. Beats GPT-5 Codex."
608
- },
609
- "claude-haiku-4-5": {
610
- model: "claude-haiku-4-5",
611
- provider: "anthropic",
612
- displayName: "Claude Haiku 4.5",
613
- costPer1MTokens: 4,
614
- // $0.80 in / $4 out → avg ~$2.4
615
- contextWindow: 2e5,
616
- skills: {
617
- "code-generation": 75,
618
- "code-review": 72,
619
- debugging: 70,
620
- planning: 65,
621
- documentation: 75,
622
- testing: 70,
623
- security: 60,
624
- performance: 65,
625
- synthesis: 68,
626
- speed: 95,
627
- // Fastest Anthropic
628
- "context-length": 95
629
- },
630
- notes: "Fast and cheap, good for simple tasks and exploration"
631
- },
632
- // ═══════════════════════════════════════════════════════════════════════════
633
- // OPENAI MODELS
634
- // ═══════════════════════════════════════════════════════════════════════════
635
- "gpt-5.2-codex": {
636
- model: "gpt-5.2-codex",
637
- provider: "openai",
638
- displayName: "GPT-5.2 Codex",
639
- costPer1MTokens: 75,
640
- // Premium tier ~$75/M
641
- contextWindow: 128e3,
642
- skills: {
643
- "code-generation": 95,
644
- // 80% SWE-bench Verified, 55.6% SWE-bench Pro
645
- "code-review": 90,
646
- debugging: 92,
647
- // 92.4% GPQA Diamond
648
- planning: 88,
649
- documentation: 85,
650
- testing: 90,
651
- security: 85,
652
- performance: 88,
653
- // 52.9% ARC-AGI-2 (best reasoning)
654
- synthesis: 88,
655
- // 100% AIME 2025 without tools
656
- speed: 55,
657
- "context-length": 75
658
- },
659
- notes: "Premium coding: 80% SWE-bench. Best raw reasoning (52.9% ARC-AGI-2). Expensive."
660
- },
661
- "o3-deep-research": {
662
- model: "o3-deep-research",
663
- provider: "openai",
664
- displayName: "O3 Deep Research",
665
- costPer1MTokens: 100,
666
- // Expensive reasoning model
667
- contextWindow: 2e5,
668
- skills: {
669
- "code-generation": 85,
670
- "code-review": 95,
671
- debugging: 98,
672
- // Best for debugging
673
- planning: 95,
674
- documentation: 88,
675
- testing: 85,
676
- security: 92,
677
- performance: 92,
678
- synthesis: 95,
679
- speed: 20,
680
- // Very slow (reasoning chains)
681
- "context-length": 95
682
- },
683
- notes: "Deep reasoning model, excellent for complex debugging and analysis"
684
- },
685
- "gpt-4o": {
686
- model: "gpt-4o",
687
- provider: "openai",
688
- displayName: "GPT-4o",
689
- costPer1MTokens: 15,
690
- // $5 in / $15 out
691
- contextWindow: 128e3,
692
- skills: {
693
- "code-generation": 88,
694
- "code-review": 85,
695
- debugging: 85,
696
- planning: 82,
697
- documentation: 88,
698
- testing: 82,
699
- security: 78,
700
- performance: 80,
701
- synthesis: 85,
702
- speed: 75,
703
- "context-length": 75
704
- },
705
- notes: "Good all-rounder, competitive with Sonnet"
706
- },
707
- "gpt-4o-mini": {
708
- model: "gpt-4o-mini",
709
- provider: "openai",
710
- displayName: "GPT-4o Mini",
711
- costPer1MTokens: 1,
712
- // Very cheap
713
- contextWindow: 128e3,
714
- skills: {
715
- "code-generation": 72,
716
- "code-review": 68,
717
- debugging: 65,
718
- planning: 60,
719
- documentation: 70,
720
- testing: 65,
721
- security: 55,
722
- performance: 60,
723
- synthesis: 62,
724
- speed: 92,
725
- "context-length": 75
726
- },
727
- notes: "Budget option, good for simple tasks"
728
- },
729
- // ═══════════════════════════════════════════════════════════════════════════
730
- // GOOGLE MODELS
731
- // ═══════════════════════════════════════════════════════════════════════════
732
- "gemini-3-pro-preview": {
733
- model: "gemini-3-pro-preview",
734
- provider: "google",
735
- displayName: "Gemini 3 Pro",
736
- costPer1MTokens: 12,
737
- // $4.2 in / $18.9 out
738
- contextWindow: 1e6,
739
- // 1M context!
740
- skills: {
741
- "code-generation": 90,
742
- // 2439 Elo LiveCodeBench Pro (first >1500 on LMArena)
743
- "code-review": 88,
744
- debugging: 85,
745
- planning: 85,
746
- documentation: 88,
747
- testing: 85,
748
- // ~95% AIME 2025
749
- security: 78,
750
- performance: 85,
751
- // Strong multimodal
752
- synthesis: 90,
753
- // Best for combining large codebases
754
- speed: 80,
755
- "context-length": 100
756
- // Best context - 1M tokens
757
- },
758
- notes: "First to exceed 1500 Elo on LMArena. Best for large codebase analysis with 1M context."
759
- },
760
- "gemini-3-flash-preview": {
761
- model: "gemini-3-flash-preview",
762
- provider: "google",
763
- displayName: "Gemini 3 Flash",
764
- costPer1MTokens: 0.5,
765
- // Very cheap
766
- contextWindow: 1e6,
767
- skills: {
768
- "code-generation": 75,
769
- "code-review": 70,
770
- debugging: 68,
771
- planning: 62,
772
- documentation: 72,
773
- testing: 68,
774
- security: 55,
775
- performance: 65,
776
- synthesis: 70,
777
- speed: 98,
778
- // Fastest overall
779
- "context-length": 100
780
- },
781
- notes: "Extremely fast and cheap, huge context, great for exploration"
782
- },
783
- "gemini-2.5-pro": {
784
- model: "gemini-2.5-pro",
785
- provider: "google",
786
- displayName: "Gemini 2.5 Pro",
787
- costPer1MTokens: 12,
788
- contextWindow: 1e6,
789
- skills: {
790
- "code-generation": 92,
791
- "code-review": 90,
792
- debugging: 88,
793
- planning: 88,
794
- documentation: 90,
795
- testing: 87,
796
- security: 82,
797
- performance: 88,
798
- synthesis: 92,
799
- speed: 75,
800
- "context-length": 100
801
- },
802
- notes: "Advanced reasoning and code capabilities with 1M context"
803
- },
804
- "gemini-2.5-flash": {
805
- model: "gemini-2.5-flash",
806
- provider: "google",
807
- displayName: "Gemini 2.5 Flash",
808
- costPer1MTokens: 0.6,
809
- contextWindow: 1e6,
810
- skills: {
811
- "code-generation": 78,
812
- "code-review": 73,
813
- debugging: 70,
814
- planning: 65,
815
- documentation: 75,
816
- testing: 70,
817
- security: 58,
818
- performance: 68,
819
- synthesis: 73,
820
- speed: 95,
821
- "context-length": 100
822
- },
823
- notes: "Fast and efficient with large context support"
824
- },
825
- // ═══════════════════════════════════════════════════════════════════════════
826
- // Z.AI MODELS
827
- // ═══════════════════════════════════════════════════════════════════════════
828
- "glm-4.7": {
829
- model: "glm-4.7",
830
- provider: "zai",
831
- displayName: "GLM 4.7",
832
- costPer1MTokens: 5,
833
- contextWindow: 2e5,
834
- // 200K context, 128K output
835
- skills: {
836
- "code-generation": 88,
837
- // 73.8% SWE-bench, 84.9 LiveCodeBench v6 (open-source SOTA)
838
- "code-review": 85,
839
- debugging: 85,
840
- // Strong debugging with Interleaved Thinking
841
- planning: 82,
842
- // 95.7% AIME 2025 (beats Gemini 3 & GPT-5.1)
843
- documentation: 80,
844
- testing: 82,
845
- // 87.4 τ²-Bench (SOTA for tool use)
846
- security: 72,
847
- performance: 78,
848
- synthesis: 85,
849
- // Preserved Thinking retains context across turns
850
- speed: 80,
851
- "context-length": 95
852
- // 200K context
853
- },
854
- notes: "Top open-source for agentic coding. 73.8% SWE-bench, best tool use. 400B params with Interleaved Thinking."
855
- },
856
- "glm-4.7-flash": {
857
- model: "glm-4.7-flash",
858
- provider: "zai",
859
- displayName: "GLM 4.7 Flash",
860
- costPer1MTokens: 1.5,
861
- contextWindow: 128e3,
862
- skills: {
863
- "code-generation": 72,
864
- "code-review": 68,
865
- debugging: 65,
866
- planning: 62,
867
- documentation: 70,
868
- testing: 65,
869
- security: 55,
870
- performance: 62,
871
- synthesis: 65,
872
- speed: 92,
873
- // Fast inference
874
- "context-length": 75
875
- },
876
- notes: "Fast and affordable. Good for quick iterations and exploration."
877
- },
878
- // ═══════════════════════════════════════════════════════════════════════════
879
- // KIMI MODELS
880
- // ═══════════════════════════════════════════════════════════════════════════
881
- "kimi-k2": {
882
- model: "kimi-k2",
883
- provider: "kimi",
884
- displayName: "Kimi K2",
885
- costPer1MTokens: 1.4,
886
- // $0.16 in / $2.63 out → very cheap
887
- contextWindow: 131e3,
888
- skills: {
889
- "code-generation": 82,
890
- // 65.8% SWE-bench (beats GPT-4.1 at 54.6%)
891
- "code-review": 80,
892
- debugging: 78,
893
- planning: 75,
894
- documentation: 80,
895
- testing: 75,
896
- security: 70,
897
- performance: 72,
898
- synthesis: 78,
899
- speed: 80,
900
- "context-length": 75
901
- },
902
- notes: "Strong value: 65.8% SWE-bench at very low cost. Good for routine tasks."
903
- },
904
- "kimi-k2.5": {
905
- model: "kimi-k2.5",
906
- provider: "kimi",
907
- displayName: "Kimi K2.5",
908
- costPer1MTokens: 8,
909
- // ~5.1x cheaper than GPT-5.2
910
- contextWindow: 256e3,
911
- skills: {
912
- "code-generation": 92,
913
- // 76.8% SWE-bench, 85 LiveCodeBench v6
914
- "code-review": 90,
915
- debugging: 90,
916
- // Strong analytical capabilities
917
- planning: 88,
918
- // User confirms "highly capable"
919
- documentation: 88,
920
- testing: 88,
921
- // 92% coding accuracy
922
- security: 82,
923
- performance: 85,
924
- synthesis: 92,
925
- // Can coordinate 100 sub-agents, 1500 tool calls
926
- speed: 75,
927
- // MoE: 1T total params, 32B active
928
- "context-length": 98
929
- // 256K context
930
- },
931
- notes: "Best open-source coding model. 5x cheaper than GPT-5.2. Excellent for frontend dev and multi-agent orchestration."
932
- }
933
- };
934
- }
935
- });
936
-
937
561
  // src/lib/smart-model-selector.ts
938
562
  function calculateSkillScore(model, requirements) {
939
563
  const cap = getModelCapability(model);
@@ -1237,7 +861,7 @@ var init_work_type_router = __esm({
1237
861
  config;
1238
862
  availableModels = null;
1239
863
  constructor(config) {
1240
- this.config = config || loadConfig();
864
+ this.config = config || loadConfig().config;
1241
865
  }
1242
866
  /**
1243
867
  * Get list of available models based on enabled providers
@@ -1334,7 +958,7 @@ var init_work_type_router = __esm({
1334
958
  * Reload configuration from disk
1335
959
  */
1336
960
  reloadConfig() {
1337
- this.config = loadConfig();
961
+ this.config = loadConfig().config;
1338
962
  this.availableModels = null;
1339
963
  }
1340
964
  /**
@@ -1365,6 +989,9 @@ export {
1365
989
  sendKeysAsync,
1366
990
  sendKeys,
1367
991
  capturePane,
992
+ capturePaneAsync,
993
+ waitForClaudePrompt,
994
+ confirmDelivery,
1368
995
  getAgentSessions,
1369
996
  init_tmux,
1370
997
  initHook,
@@ -1378,4 +1005,4 @@ export {
1378
1005
  getModelId,
1379
1006
  init_work_type_router
1380
1007
  };
1381
- //# sourceMappingURL=chunk-KJ2TRXNK.js.map
1008
+ //# sourceMappingURL=chunk-FTCPTHIJ.js.map