@statechange/council 0.5.0 → 0.7.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.
- package/README.md +27 -27
- package/dist/cli.js +15 -15
- package/dist/cli.js.map +1 -1
- package/dist/commands/councilor.d.ts +7 -0
- package/dist/commands/councilor.js +98 -0
- package/dist/commands/councilor.js.map +1 -0
- package/dist/commands/discuss.d.ts +2 -2
- package/dist/commands/discuss.js +14 -14
- package/dist/commands/discuss.js.map +1 -1
- package/dist/commands/history.js +2 -2
- package/dist/commands/history.js.map +1 -1
- package/dist/commands/list.js +7 -7
- package/dist/commands/list.js.map +1 -1
- package/dist/core/conversation-engine.d.ts +5 -3
- package/dist/core/conversation-engine.js +59 -34
- package/dist/core/conversation-engine.js.map +1 -1
- package/dist/core/councilor-loader.d.ts +4 -0
- package/dist/core/councilor-loader.js +98 -0
- package/dist/core/councilor-loader.js.map +1 -0
- package/dist/core/councilor-registry.d.ts +12 -0
- package/dist/core/councilor-registry.js +131 -0
- package/dist/core/councilor-registry.js.map +1 -0
- package/dist/core/counsellor-loader.js +2 -1
- package/dist/core/counsellor-loader.js.map +1 -1
- package/dist/core/excalidraw-cheatsheet.js +2 -2
- package/dist/core/history.d.ts +1 -1
- package/dist/core/history.js +1 -1
- package/dist/core/history.js.map +1 -1
- package/dist/core/infographic.js +2 -2
- package/dist/core/infographic.js.map +1 -1
- package/dist/core/output-formatter.js +2 -2
- package/dist/core/output-formatter.js.map +1 -1
- package/dist/core/secretary.js +7 -7
- package/dist/core/secretary.js.map +1 -1
- package/dist/core/skill-loader.d.ts +2 -2
- package/dist/core/skill-loader.js +6 -6
- package/dist/core/skill-loader.js.map +1 -1
- package/dist/electron/ipc-handlers.js +73 -64
- package/dist/electron/ipc-handlers.js.map +1 -1
- package/dist/electron/main.js +5 -2
- package/dist/electron/main.js.map +1 -1
- package/dist/electron/preload.js +5 -5
- package/dist/electron/preload.js.map +1 -1
- package/dist/types.d.ts +16 -13
- package/dist/types.js +1 -1
- package/dist/types.js.map +1 -1
- package/dist-electron/main.js +619 -595
- package/dist-electron/preload.mjs +1 -1
- package/dist-renderer/assets/{ar-SA-G6X2FPQ2-DIdoFnw2.js → ar-SA-G6X2FPQ2-BgPx2ItE.js} +1 -1
- package/dist-renderer/assets/{arc-BTotlQZy.js → arc-uuSymAy6.js} +1 -1
- package/dist-renderer/assets/{az-AZ-76LH7QW2-vKvyE204.js → az-AZ-76LH7QW2-CXxeQJ5N.js} +1 -1
- package/dist-renderer/assets/{bg-BG-XCXSNQG7-CUw6XMat.js → bg-BG-XCXSNQG7-B-v6aJJk.js} +1 -1
- package/dist-renderer/assets/{blockDiagram-38ab4fdb-KuBxDdIg.js → blockDiagram-38ab4fdb-B2x5B_qZ.js} +1 -1
- package/dist-renderer/assets/{bn-BD-2XOGV67Q-jAYEmCju.js → bn-BD-2XOGV67Q-CmhmKt_C.js} +1 -1
- package/dist-renderer/assets/{c4Diagram-3d4e48cf-BNBdnuO2.js → c4Diagram-3d4e48cf-qv_cNClp.js} +1 -1
- package/dist-renderer/assets/{ca-ES-6MX7JW3Y-CI1kukXq.js → ca-ES-6MX7JW3Y-Cnypgm9v.js} +1 -1
- package/dist-renderer/assets/channel-CbR4ut5U.js +1 -0
- package/dist-renderer/assets/{classDiagram-70f12bd4-CupH4cFs.js → classDiagram-70f12bd4-DdjxeBAm.js} +1 -1
- package/dist-renderer/assets/{classDiagram-v2-f2320105-BahsG3Tc.js → classDiagram-v2-f2320105-DjGhSmzz.js} +1 -1
- package/dist-renderer/assets/clone-CdbunAYL.js +1 -0
- package/dist-renderer/assets/{createText-2e5e7dd3-B3UjfUG4.js → createText-2e5e7dd3-DPeQ2O5Z.js} +1 -1
- package/dist-renderer/assets/{cs-CZ-2BRQDIVT-UI0wC0-v.js → cs-CZ-2BRQDIVT-CLjGATXX.js} +1 -1
- package/dist-renderer/assets/{da-DK-5WZEPLOC-CQAf8fls.js → da-DK-5WZEPLOC-D5L0qoxT.js} +1 -1
- package/dist-renderer/assets/{de-DE-XR44H4JA-CjKBhliG.js → de-DE-XR44H4JA-C32FRrv8.js} +1 -1
- package/dist-renderer/assets/{edges-e0da2a9e-2iE4P-5f.js → edges-e0da2a9e-C9UtuZtL.js} +1 -1
- package/dist-renderer/assets/{el-GR-BZB4AONW-CQB6VLsx.js → el-GR-BZB4AONW-DbhHCmA8.js} +1 -1
- package/dist-renderer/assets/{erDiagram-9861fffd-BBDZcr4V.js → erDiagram-9861fffd-BkLC6VUM.js} +1 -1
- package/dist-renderer/assets/{es-ES-U4NZUMDT-DiI8d1UY.js → es-ES-U4NZUMDT-DXQY7ys3.js} +1 -1
- package/dist-renderer/assets/{eu-ES-A7QVB2H4-DkxqpvcF.js → eu-ES-A7QVB2H4-B4VgVqIF.js} +1 -1
- package/dist-renderer/assets/{fa-IR-HGAKTJCU-D6yQ0OLT.js → fa-IR-HGAKTJCU-elHgBamS.js} +1 -1
- package/dist-renderer/assets/{fi-FI-Z5N7JZ37-YXeS6J7A.js → fi-FI-Z5N7JZ37-BQe_Oc8x.js} +1 -1
- package/dist-renderer/assets/{flowDb-956e92f1-BUyPBg4x.js → flowDb-956e92f1-DR2fF74n.js} +1 -1
- package/dist-renderer/assets/{flowDiagram-66a62f08-DlzNPiyJ.js → flowDiagram-66a62f08-wDDwHPpp.js} +1 -1
- package/dist-renderer/assets/flowDiagram-v2-96b9c2cf-DYxWopzM.js +1 -0
- package/dist-renderer/assets/{flowchart-elk-definition-4a651766-Chzxgp5p.js → flowchart-elk-definition-4a651766-m7cC1ndJ.js} +1 -1
- package/dist-renderer/assets/{fr-FR-RHASNOE6-f9mGiK-9.js → fr-FR-RHASNOE6-U8yDW4RB.js} +1 -1
- package/dist-renderer/assets/{ganttDiagram-c361ad54-WJyNxrSM.js → ganttDiagram-c361ad54-SpXIeRET.js} +1 -1
- package/dist-renderer/assets/{gitGraphDiagram-72cf32ee-BVsVFoEf.js → gitGraphDiagram-72cf32ee-CqmKGlMY.js} +1 -1
- package/dist-renderer/assets/{gl-ES-HMX3MZ6V-BjCm-PNJ.js → gl-ES-HMX3MZ6V-ti0GznU7.js} +1 -1
- package/dist-renderer/assets/{graph-CkTunRXI.js → graph-KjGTQ8qd.js} +1 -1
- package/dist-renderer/assets/{he-IL-6SHJWFNN-DfYxNI2P.js → he-IL-6SHJWFNN-M5av5hFk.js} +1 -1
- package/dist-renderer/assets/{hi-IN-IWLTKZ5I-DoZMu26E.js → hi-IN-IWLTKZ5I-Ci72nkHu.js} +1 -1
- package/dist-renderer/assets/{hu-HU-A5ZG7DT2-DTrSQZCB.js → hu-HU-A5ZG7DT2-CJZteS36.js} +1 -1
- package/dist-renderer/assets/{id-ID-SAP4L64H-C_U2ELPS.js → id-ID-SAP4L64H-DmDvIS5c.js} +1 -1
- package/dist-renderer/assets/{index-3862675e-BNtj693g.js → index-3862675e-CCE1hBgs.js} +1 -1
- package/dist-renderer/assets/index-BUIE-P96.js +51 -0
- package/dist-renderer/assets/{index-CMFrvjlh.js → index-CsJIZuMr.js} +4 -4
- package/dist-renderer/assets/{index-Dfvdrrq2.css → index-HXjW9ZG3.css} +1 -1
- package/dist-renderer/assets/{infoDiagram-f8f76790-BgR_oHkS.js → infoDiagram-f8f76790-CcZfsGA-.js} +1 -1
- package/dist-renderer/assets/{it-IT-JPQ66NNP-DUHgayhE.js → it-IT-JPQ66NNP-Bzpfv7zO.js} +1 -1
- package/dist-renderer/assets/{ja-JP-DBVTYXUO-BvvEmKLB.js → ja-JP-DBVTYXUO-Bybhg0KI.js} +1 -1
- package/dist-renderer/assets/{journeyDiagram-49397b02-DMpZKzA6.js → journeyDiagram-49397b02-D5LB2Wfi.js} +1 -1
- package/dist-renderer/assets/{kaa-6HZHGXH3-g6rUcGHV.js → kaa-6HZHGXH3-n7D3u8lS.js} +1 -1
- package/dist-renderer/assets/{kab-KAB-ZGHBKWFO-7y2loFp3.js → kab-KAB-ZGHBKWFO-BsHCeWxt.js} +1 -1
- package/dist-renderer/assets/{kk-KZ-P5N5QNE5-CrUBYCyh.js → kk-KZ-P5N5QNE5-Dvo1EL3s.js} +1 -1
- package/dist-renderer/assets/{km-KH-HSX4SM5Z-BmTnQD1U.js → km-KH-HSX4SM5Z-Bo9Koyui.js} +1 -1
- package/dist-renderer/assets/{ko-KR-MTYHY66A-B13GdnWI.js → ko-KR-MTYHY66A-Dqbq9Ios.js} +1 -1
- package/dist-renderer/assets/{ku-TR-6OUDTVRD-BLvm9HOc.js → ku-TR-6OUDTVRD-B_bI20Zq.js} +1 -1
- package/dist-renderer/assets/{layout-BRp1ZWud.js → layout-BMJBnVbc.js} +1 -1
- package/dist-renderer/assets/{line-CBnb-2iQ.js → line-DYvIrKnf.js} +1 -1
- package/dist-renderer/assets/{linear-DflXVGQM.js → linear-CzUW4n8y.js} +1 -1
- package/dist-renderer/assets/{lt-LT-XHIRWOB4-o21UyUem.js → lt-LT-XHIRWOB4-DMcSSx20.js} +1 -1
- package/dist-renderer/assets/{lv-LV-5QDEKY6T-Co_yvRsA.js → lv-LV-5QDEKY6T-WQFa3Exi.js} +1 -1
- package/dist-renderer/assets/{mindmap-definition-fc14e90a-DpcRC-Qx.js → mindmap-definition-fc14e90a-CbbLnbfT.js} +1 -1
- package/dist-renderer/assets/{mr-IN-CRQNXWMA-4PVnnNcU.js → mr-IN-CRQNXWMA-CeiPk7t6.js} +1 -1
- package/dist-renderer/assets/{my-MM-5M5IBNSE-Dk5W3fXX.js → my-MM-5M5IBNSE-9E7W6sP8.js} +1 -1
- package/dist-renderer/assets/{nb-NO-T6EIAALU-DMkPaluQ.js → nb-NO-T6EIAALU-CmEniZIK.js} +1 -1
- package/dist-renderer/assets/{nl-NL-IS3SIHDZ-CYOTB3Eg.js → nl-NL-IS3SIHDZ-zXTYcbKu.js} +1 -1
- package/dist-renderer/assets/{nn-NO-6E72VCQL-D4OuF2An.js → nn-NO-6E72VCQL-h3sqNMWN.js} +1 -1
- package/dist-renderer/assets/{oc-FR-POXYY2M6-Dgdddkga.js → oc-FR-POXYY2M6-DJ0D2dhd.js} +1 -1
- package/dist-renderer/assets/{pa-IN-N4M65BXN-DB2Y0wYm.js → pa-IN-N4M65BXN-DZ6nLqLL.js} +1 -1
- package/dist-renderer/assets/{percentages-BXMCSKIN-bsDgM1tI.js → percentages-BXMCSKIN-C_WTAk1u.js} +7 -7
- package/dist-renderer/assets/{pica-B0wN7u7a.js → pica-41wOwwIp.js} +1 -1
- package/dist-renderer/assets/{pieDiagram-8a3498a8-D8QY6THh.js → pieDiagram-8a3498a8-DbqgEWOz.js} +1 -1
- package/dist-renderer/assets/{pl-PL-T2D74RX3-BvikiN3J.js → pl-PL-T2D74RX3-TTq9_VVs.js} +1 -1
- package/dist-renderer/assets/{pt-BR-5N22H2LF-DsWDLPF-.js → pt-BR-5N22H2LF-D8eWF-rx.js} +1 -1
- package/dist-renderer/assets/{pt-PT-UZXXM6DQ-BnTfNmgE.js → pt-PT-UZXXM6DQ-Ck4YSJms.js} +1 -1
- package/dist-renderer/assets/{quadrantDiagram-120e2f19-CYknF173.js → quadrantDiagram-120e2f19-astysE66.js} +1 -1
- package/dist-renderer/assets/{requirementDiagram-deff3bca-DpK6qRCG.js → requirementDiagram-deff3bca-BczvOV-q.js} +1 -1
- package/dist-renderer/assets/{ro-RO-JPDTUUEW-WzwdaLQU.js → ro-RO-JPDTUUEW-Cix9Zgf2.js} +1 -1
- package/dist-renderer/assets/{ru-RU-B4JR7IUQ-kSoy6NPm.js → ru-RU-B4JR7IUQ-DOEAc_qv.js} +1 -1
- package/dist-renderer/assets/{sankeyDiagram-04a897e0-qq5SY-Ue.js → sankeyDiagram-04a897e0-BdKNjOGj.js} +1 -1
- package/dist-renderer/assets/{sequenceDiagram-704730f1-WIIr9Ug4.js → sequenceDiagram-704730f1-DmhSJhf3.js} +1 -1
- package/dist-renderer/assets/{si-LK-N5RQ5JYF-AuePWwxD.js → si-LK-N5RQ5JYF-CdpuKOSp.js} +1 -1
- package/dist-renderer/assets/{sk-SK-C5VTKIMK-DC2HAG_f.js → sk-SK-C5VTKIMK-B_9Y1a-J.js} +1 -1
- package/dist-renderer/assets/{sl-SI-NN7IZMDC-BYS14Fmd.js → sl-SI-NN7IZMDC-6_HfcMn2.js} +1 -1
- package/dist-renderer/assets/{stateDiagram-587899a1-BoO-tW9h.js → stateDiagram-587899a1--iD3nJ-S.js} +1 -1
- package/dist-renderer/assets/{stateDiagram-v2-d93cdb3a-_GDLfMOw.js → stateDiagram-v2-d93cdb3a-D_ikJOMZ.js} +1 -1
- package/dist-renderer/assets/{styles-6aaf32cf-Bq02XG30.js → styles-6aaf32cf-CmNrPQpM.js} +1 -1
- package/dist-renderer/assets/{styles-9a916d00-DrDuz5OD.js → styles-9a916d00-DF6mmpc8.js} +1 -1
- package/dist-renderer/assets/{styles-c10674c1-BiUI5sb2.js → styles-c10674c1-DrNd7u60.js} +1 -1
- package/dist-renderer/assets/{subset-shared.chunk-B4D4aZVR.js → subset-shared.chunk-DESKTf4i.js} +1 -1
- package/dist-renderer/assets/{subset-worker.chunk-iv_EGnGX.js → subset-worker.chunk-foHYh0Wd.js} +1 -1
- package/dist-renderer/assets/{sv-SE-XGPEYMSR-C_IQ_dRL.js → sv-SE-XGPEYMSR-CIuCW4P8.js} +1 -1
- package/dist-renderer/assets/{svgDrawCommon-08f97a94-CGR4dkyx.js → svgDrawCommon-08f97a94-z7vJpB0X.js} +1 -1
- package/dist-renderer/assets/{ta-IN-2NMHFXQM-Bv6L9r0f.js → ta-IN-2NMHFXQM-BzAn6f_T.js} +1 -1
- package/dist-renderer/assets/{th-TH-HPSO5L25-Y-RfnO5u.js → th-TH-HPSO5L25-F8UKokOj.js} +1 -1
- package/dist-renderer/assets/{timeline-definition-85554ec2-DNqe_2XL.js → timeline-definition-85554ec2-CqgD9A1Q.js} +1 -1
- package/dist-renderer/assets/{tr-TR-DEFEU3FU-B46ZqcXK.js → tr-TR-DEFEU3FU-Blb21beE.js} +1 -1
- package/dist-renderer/assets/{uk-UA-QMV73CPH-DzETOoLm.js → uk-UA-QMV73CPH-BNT7k4n6.js} +1 -1
- package/dist-renderer/assets/{vi-VN-M7AON7JQ-CKt3VFx4.js → vi-VN-M7AON7JQ-Cfx0gaLT.js} +1 -1
- package/dist-renderer/assets/{xychartDiagram-e933f94c-IFYih3oh.js → xychartDiagram-e933f94c-FbPSsBHD.js} +1 -1
- package/dist-renderer/assets/{zh-CN-LNUGB5OW-DDBoaB0P.js → zh-CN-LNUGB5OW-CpiybZS1.js} +1 -1
- package/dist-renderer/assets/{zh-HK-E62DVLB3-CtYuCfrU.js → zh-HK-E62DVLB3-UIQkTr8J.js} +1 -1
- package/dist-renderer/assets/{zh-TW-RAJ6MFWO-61MRQ0N-.js → zh-TW-RAJ6MFWO-GvyNND72.js} +1 -1
- package/dist-renderer/index.html +2 -2
- package/package.json +2 -2
- package/skills/council-manage/SKILL.md +54 -43
- package/skills/council-setup-keys/SKILL.md +2 -2
- package/dist-renderer/assets/channel-CYpnUKSx.js +0 -1
- package/dist-renderer/assets/clone-DFY_WtGN.js +0 -1
- package/dist-renderer/assets/flowDiagram-v2-96b9c2cf-D9BHRMv4.js +0 -1
- package/dist-renderer/assets/index-B-vvA6a2.js +0 -36
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# @statechange/council
|
|
2
2
|
|
|
3
|
-
Build a council of AI personas and have them debate any topic. Each
|
|
3
|
+
Build a council of AI personas and have them debate any topic. Each councilor has their own LLM backend, model, personality, and source material. Run discussions in a structured **debate** format or an open **freeform** group chat — via the CLI, an Electron GUI, or Claude Code skills.
|
|
4
4
|
|
|
5
5
|
## Getting Started with Claude Code Skills
|
|
6
6
|
|
|
7
|
-
The fastest path is to add the skills to [Claude Code](https://claude.com/claude-code). They handle installation, configuration,
|
|
7
|
+
The fastest path is to add the skills to [Claude Code](https://claude.com/claude-code). They handle installation, configuration, councilor creation, and running discussions for you.
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
npx skills add statechangelabs/ai-council
|
|
@@ -14,7 +14,7 @@ This gives you two skills:
|
|
|
14
14
|
|
|
15
15
|
| Skill | What it does |
|
|
16
16
|
|-------|-------------|
|
|
17
|
-
| `/council-manage` | Create
|
|
17
|
+
| `/council-manage` | Create councilors, run discussions, manage your council. Try: *"create a councilor based on Warren Buffett"* or *"run a debate about whether AI should be open source"* |
|
|
18
18
|
| `/council-setup-keys` | Finds API keys scattered across your env files and shell profiles, then imports them into `~/.ai-council/config.json` |
|
|
19
19
|
|
|
20
20
|
The skills will install the `council` CLI automatically if it's not already on your system.
|
|
@@ -40,20 +40,20 @@ council discuss "Should we pivot to enterprise?" --rounds 3
|
|
|
40
40
|
# Debate — structured constructive/rebuttal format
|
|
41
41
|
council discuss "Should AI be open source?" --mode debate --rounds 3
|
|
42
42
|
|
|
43
|
-
# Pick specific
|
|
44
|
-
council discuss "Topic" --
|
|
43
|
+
# Pick specific councilors
|
|
44
|
+
council discuss "Topic" --councilors ./council/strategist ./council/critic
|
|
45
45
|
|
|
46
46
|
# Topic from a file
|
|
47
47
|
council discuss ./topics/architecture.md
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
### Manage
|
|
50
|
+
### Manage councilors
|
|
51
51
|
|
|
52
52
|
```bash
|
|
53
|
-
council list # Show available
|
|
54
|
-
council
|
|
55
|
-
council
|
|
56
|
-
council
|
|
53
|
+
council list # Show available councilors
|
|
54
|
+
council councilor add ./path/to/councilor # Register from local directory
|
|
55
|
+
council councilor add https://github.com/user/councilors.git # From git
|
|
56
|
+
council councilor remove my-councilor # Unregister
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
### View history
|
|
@@ -80,7 +80,7 @@ council discuss <topic> [options]
|
|
|
80
80
|
--mode, -m freeform or debate (default: freeform)
|
|
81
81
|
--rounds, -r Number of discussion rounds (default: 2)
|
|
82
82
|
--council, -c Path to council directory (default: ./council/)
|
|
83
|
-
--
|
|
83
|
+
--councilors Specific councilor directory paths (space-separated)
|
|
84
84
|
--output, -o Output directory (default: ./output)
|
|
85
85
|
--format, -f md, json, or both (default: both)
|
|
86
86
|
--infographic, -i Generate an infographic after discussion
|
|
@@ -88,7 +88,7 @@ council discuss <topic> [options]
|
|
|
88
88
|
|
|
89
89
|
## GUI
|
|
90
90
|
|
|
91
|
-
The Electron app gives you a visual interface with real-time streaming, point-and-click
|
|
91
|
+
The Electron app gives you a visual interface with real-time streaming, point-and-click councilor management, and full discussion history.
|
|
92
92
|
|
|
93
93
|
```bash
|
|
94
94
|
# From the cloned repo
|
|
@@ -100,8 +100,8 @@ bun run dev:gui
|
|
|
100
100
|
|
|
101
101
|
### What you get
|
|
102
102
|
|
|
103
|
-
- **Discussion page** — Topic input with file attachments,
|
|
104
|
-
- **
|
|
103
|
+
- **Discussion page** — Topic input with file attachments, councilor selection chips, freeform/debate mode toggle, real-time streaming of responses, round dividers and interim summaries in debate mode, inject messages mid-discussion
|
|
104
|
+
- **Councilors page** — Browse, search, create, edit, and delete councilors with a form editor or raw ABOUT.md editing; register external councilors from local paths or git repos
|
|
105
105
|
- **History page** — Browse past discussions, view full transcripts with round summaries, copy as markdown, generate infographics
|
|
106
106
|
- **Settings page** — Configure API keys per backend, test connections, see available models
|
|
107
107
|
|
|
@@ -109,15 +109,15 @@ bun run dev:gui
|
|
|
109
109
|
|
|
110
110
|
### Freeform
|
|
111
111
|
|
|
112
|
-
The default. An open group chat where every
|
|
112
|
+
The default. An open group chat where every councilor sees the full conversation history on every turn. The first speaker sets the tone and later speakers react to what's been said. Councilor order stays the same each round.
|
|
113
113
|
|
|
114
114
|
### Debate
|
|
115
115
|
|
|
116
116
|
A structured argument format designed to prevent pile-on and anchoring bias:
|
|
117
117
|
|
|
118
|
-
1. **Round 1 — Constructive**: Each
|
|
118
|
+
1. **Round 1 — Constructive**: Each councilor argues their position based *only* on the question. They can't see what anyone else said. Even a "critic" persona has to stand up their own argument first.
|
|
119
119
|
|
|
120
|
-
2. **Rebuttal rounds (2+)**:
|
|
120
|
+
2. **Rebuttal rounds (2+)**: Councilors now see the constructive round plus *only* the previous rebuttal round — not the entire history. This keeps context growth bounded. Speaker order is shuffled each round so nobody is always first or last.
|
|
121
121
|
|
|
122
122
|
3. **Interim summaries**: If a secretary is configured, a brief summary is generated after every round, tracking emerging agreements, disagreements, and shifts in position.
|
|
123
123
|
|
|
@@ -154,13 +154,13 @@ Enable post-discussion summaries (and debate interim summaries) by adding a `sec
|
|
|
154
154
|
| google | gemini-2.0-flash | `GOOGLE_API_KEY` |
|
|
155
155
|
| ollama | llama3.2 | None (local) |
|
|
156
156
|
|
|
157
|
-
## Creating
|
|
157
|
+
## Creating Councilors
|
|
158
158
|
|
|
159
|
-
A
|
|
159
|
+
A councilor is a directory containing an `ABOUT.md` file with YAML frontmatter and a system prompt:
|
|
160
160
|
|
|
161
161
|
```
|
|
162
162
|
council/
|
|
163
|
-
my-
|
|
163
|
+
my-councilor/
|
|
164
164
|
ABOUT.md
|
|
165
165
|
avatar.jpg # optional
|
|
166
166
|
```
|
|
@@ -195,30 +195,30 @@ Keep your responses focused. Aim for 2-4 paragraphs per turn.
|
|
|
195
195
|
| Field | Required | Description |
|
|
196
196
|
|-------|----------|-------------|
|
|
197
197
|
| `name` | Yes | Display name |
|
|
198
|
-
| `description` | Yes | One-line summary of this
|
|
198
|
+
| `description` | Yes | One-line summary of this councilor's perspective |
|
|
199
199
|
| `backend` | Yes | `anthropic`, `openai`, `google`, or `ollama` |
|
|
200
200
|
| `model` | No | Specific model ID; uses backend default if omitted |
|
|
201
201
|
| `temperature` | No | 0.0–2.0; higher = more creative (default varies by backend) |
|
|
202
202
|
| `interests` | No | Tags shown in the UI |
|
|
203
203
|
| `avatar` | No | Path to local image or URL |
|
|
204
204
|
|
|
205
|
-
### Included
|
|
205
|
+
### Included councilors
|
|
206
206
|
|
|
207
|
-
The package ships with three starter
|
|
207
|
+
The package ships with three starter councilors:
|
|
208
208
|
|
|
209
|
-
|
|
|
209
|
+
| Councilor | Backend | Perspective |
|
|
210
210
|
|-----------|---------|-------------|
|
|
211
211
|
| **The Strategist** | Anthropic (Haiku) | Strategic business advisor — positioning, growth, competitive advantage |
|
|
212
212
|
| **The Creative** | Anthropic (Opus) | Lateral thinker — unexpected analogies, reframing, unconventional connections |
|
|
213
213
|
| **The Critic** | Google (Gemini Flash) | Devil's advocate — stress-tests ideas, surfaces assumptions, finds failure modes |
|
|
214
214
|
|
|
215
|
-
### Building
|
|
215
|
+
### Building councilors from source material
|
|
216
216
|
|
|
217
|
-
You can create
|
|
217
|
+
You can create councilors based on real people or bodies of work by appending reference material below the system prompt. The `/council-manage` skill in Claude Code can automate this — ask it to *"create a councilor based on [person or book]"* and it'll handle downloading source text, writing the system prompt, and assembling the ABOUT.md.
|
|
218
218
|
|
|
219
219
|
## Logging
|
|
220
220
|
|
|
221
|
-
Errors are logged to `~/.ai-council/council.log` with timestamps, context tags, and full stack traces. Check this file when a
|
|
221
|
+
Errors are logged to `~/.ai-council/council.log` with timestamps, context tags, and full stack traces. Check this file when a councilor fails to respond or a summary doesn't generate.
|
|
222
222
|
|
|
223
223
|
## Development
|
|
224
224
|
|
package/dist/cli.js
CHANGED
|
@@ -7,7 +7,7 @@ import { resolve } from "node:path";
|
|
|
7
7
|
import { DiscussCommand } from "./commands/discuss.js";
|
|
8
8
|
import { ListCommand } from "./commands/list.js";
|
|
9
9
|
import { ConfigCommand } from "./commands/config.js";
|
|
10
|
-
import {
|
|
10
|
+
import { CouncilorCommand } from "./commands/councilor.js";
|
|
11
11
|
import { HistoryCommand } from "./commands/history.js";
|
|
12
12
|
import { GuiCommand } from "./commands/gui.js";
|
|
13
13
|
import { InstallCommand } from "./commands/install.js";
|
|
@@ -17,12 +17,12 @@ const cli = meow(`
|
|
|
17
17
|
|
|
18
18
|
Commands
|
|
19
19
|
discuss <topic> Run a council discussion on a topic (string or file path)
|
|
20
|
-
list List available
|
|
20
|
+
list List available councilors
|
|
21
21
|
history List past discussions
|
|
22
22
|
history <id> Show a specific past discussion
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
councilor add <path-or-url> Register a councilor from a local path or git URL
|
|
24
|
+
councilor remove <id> Unregister a councilor (--yes to delete cloned files)
|
|
25
|
+
councilor list List all registered councilors
|
|
26
26
|
gui Launch the Electron GUI
|
|
27
27
|
install Install AI Council as a macOS application
|
|
28
28
|
install --uninstall Remove AI Council from Applications
|
|
@@ -32,15 +32,15 @@ const cli = meow(`
|
|
|
32
32
|
|
|
33
33
|
Options
|
|
34
34
|
--council, -c Path to council directory (default: ./council/)
|
|
35
|
-
--
|
|
35
|
+
--councilors Specific councilor directory paths (space-separated)
|
|
36
36
|
--rounds, -r Number of discussion rounds (default: 2)
|
|
37
37
|
--output, -o Output directory (default: ./output)
|
|
38
38
|
--format, -f Output format: md, json, or both (default: both)
|
|
39
39
|
--mode, -m Discussion mode: freeform or debate (default: freeform)
|
|
40
|
-
freeform — open group chat; every
|
|
40
|
+
freeform — open group chat; every councilor sees the
|
|
41
41
|
full conversation history on every turn
|
|
42
42
|
debate — structured argument; round 1 is constructive
|
|
43
|
-
(each
|
|
43
|
+
(each councilor argues blind), then rebuttal
|
|
44
44
|
rounds see only the constructives + previous
|
|
45
45
|
round; speaker order is shuffled each round;
|
|
46
46
|
interim summaries after every round
|
|
@@ -50,7 +50,7 @@ const cli = meow(`
|
|
|
50
50
|
Examples
|
|
51
51
|
$ council discuss "Should we pivot to enterprise?" --rounds 3
|
|
52
52
|
$ council discuss "Should AI be open source?" --mode debate --rounds 3
|
|
53
|
-
$ council discuss ./topic.md --
|
|
53
|
+
$ council discuss ./topic.md --councilors ./council/strategist ./council/critic
|
|
54
54
|
$ council list --council ./council/
|
|
55
55
|
$ council config scan
|
|
56
56
|
$ council config scan ~/projects/myapp/.env ~/other/.env
|
|
@@ -64,7 +64,7 @@ const cli = meow(`
|
|
|
64
64
|
shortFlag: "c",
|
|
65
65
|
default: "./council/",
|
|
66
66
|
},
|
|
67
|
-
|
|
67
|
+
councilors: {
|
|
68
68
|
type: "string",
|
|
69
69
|
isMultiple: true,
|
|
70
70
|
},
|
|
@@ -122,8 +122,8 @@ switch (command) {
|
|
|
122
122
|
console.error("Error: --mode must be freeform or debate");
|
|
123
123
|
process.exit(1);
|
|
124
124
|
}
|
|
125
|
-
render(_jsx(DiscussCommand, { topic: topic, councilDir: resolve(cli.flags.council),
|
|
126
|
-
? cli.flags.
|
|
125
|
+
render(_jsx(DiscussCommand, { topic: topic, councilDir: resolve(cli.flags.council), councilorPaths: cli.flags.councilors && cli.flags.councilors.length > 0
|
|
126
|
+
? cli.flags.councilors.map((p) => resolve(p))
|
|
127
127
|
: undefined, rounds: cli.flags.rounds, outputDir: resolve(cli.flags.output), format: format, infographic: cli.flags.infographic, mode: mode }));
|
|
128
128
|
break;
|
|
129
129
|
}
|
|
@@ -135,14 +135,14 @@ switch (command) {
|
|
|
135
135
|
case "list":
|
|
136
136
|
render(_jsx(ListCommand, { councilDir: resolve(cli.flags.council) }));
|
|
137
137
|
break;
|
|
138
|
-
case "
|
|
138
|
+
case "councilor": {
|
|
139
139
|
const sub = cli.input[1];
|
|
140
140
|
if (!sub || !["add", "remove", "list"].includes(sub)) {
|
|
141
|
-
console.error("Usage: council
|
|
141
|
+
console.error("Usage: council councilor <add|remove|list> [target]");
|
|
142
142
|
process.exit(1);
|
|
143
143
|
}
|
|
144
144
|
const target = cli.input[2];
|
|
145
|
-
render(_jsx(
|
|
145
|
+
render(_jsx(CouncilorCommand, { subcommand: sub, target: target, yes: cli.flags.yes }));
|
|
146
146
|
break;
|
|
147
147
|
}
|
|
148
148
|
case "gui":
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.tsx"],"names":[],"mappings":";;AAEA,OAAO,eAAe,CAAC;AAEvB,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC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AAU,EAAE,GAAiC,EAC7C,UAAU,EAAE,UAAU,EACtB,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,GAAG,GAClB,CACH,CAAC;QACF,MAAM;IACR,CAAC;IAED;QACE,GAAG,CAAC,QAAQ,EAAE,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
import { Box, Text } from "ink";
|
|
4
|
+
import Spinner from "ink-spinner";
|
|
5
|
+
import { getRegistry, addLocalCouncilor, addRemoteCouncilor, removeCouncilor, } from "../core/councilor-registry.js";
|
|
6
|
+
import { readFile } from "node:fs/promises";
|
|
7
|
+
import { join } from "node:path";
|
|
8
|
+
import { homedir } from "node:os";
|
|
9
|
+
import { existsSync } from "node:fs";
|
|
10
|
+
function isUrl(s) {
|
|
11
|
+
return s.startsWith("http://") || s.startsWith("https://") || s.endsWith(".git");
|
|
12
|
+
}
|
|
13
|
+
export function CouncilorCommand({ subcommand, target, yes }) {
|
|
14
|
+
const [status, setStatus] = useState("loading");
|
|
15
|
+
const [message, setMessage] = useState("");
|
|
16
|
+
const [registry, setRegistry] = useState({});
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
async function run() {
|
|
19
|
+
try {
|
|
20
|
+
switch (subcommand) {
|
|
21
|
+
case "add": {
|
|
22
|
+
if (!target) {
|
|
23
|
+
setMessage("Error: Please provide a path or URL.\n $ council councilor add <path-or-url>");
|
|
24
|
+
setStatus("error");
|
|
25
|
+
process.exitCode = 1;
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
if (isUrl(target)) {
|
|
29
|
+
setMessage(`Cloning ${target}...`);
|
|
30
|
+
const results = await addRemoteCouncilor(target);
|
|
31
|
+
const lines = results.map((r) => ` ${r.id} — ${r.name}`).join("\n");
|
|
32
|
+
setMessage(`Registered ${results.length} councilor${results.length > 1 ? "s" : ""} from git:\n${lines}`);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
const result = await addLocalCouncilor(target);
|
|
36
|
+
setMessage(`Registered: ${result.id} — ${result.name}`);
|
|
37
|
+
}
|
|
38
|
+
setStatus("done");
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
case "remove": {
|
|
42
|
+
if (!target) {
|
|
43
|
+
setMessage("Error: Please provide a councilor id.\n $ council councilor remove <id>");
|
|
44
|
+
setStatus("error");
|
|
45
|
+
process.exitCode = 1;
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
await removeCouncilor(target, yes);
|
|
49
|
+
setMessage(`Removed: ${target}`);
|
|
50
|
+
setStatus("done");
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
case "list": {
|
|
54
|
+
const configPath = join(homedir(), ".ai-council", "config.json");
|
|
55
|
+
let config = { backends: {} };
|
|
56
|
+
try {
|
|
57
|
+
config = JSON.parse(await readFile(configPath, "utf-8"));
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
// no config
|
|
61
|
+
}
|
|
62
|
+
const reg = getRegistry(config);
|
|
63
|
+
setRegistry(reg);
|
|
64
|
+
setStatus("done");
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
catch (err) {
|
|
70
|
+
setMessage(err instanceof Error ? err.message : String(err));
|
|
71
|
+
setStatus("error");
|
|
72
|
+
process.exitCode = 1;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
run();
|
|
76
|
+
}, []);
|
|
77
|
+
if (status === "loading" && subcommand === "add") {
|
|
78
|
+
return (_jsxs(Box, { children: [_jsx(Text, { color: "green", children: _jsx(Spinner, { type: "dots" }) }), _jsxs(Text, { children: [" ", message || "Processing..."] })] }));
|
|
79
|
+
}
|
|
80
|
+
if (status === "error") {
|
|
81
|
+
return _jsxs(Text, { color: "red", children: ["Error: ", message] });
|
|
82
|
+
}
|
|
83
|
+
if (subcommand === "list") {
|
|
84
|
+
const entries = Object.entries(registry);
|
|
85
|
+
if (entries.length === 0) {
|
|
86
|
+
return _jsx(Text, { dimColor: true, children: "No registered councilors. Use `council councilor add` to register one." });
|
|
87
|
+
}
|
|
88
|
+
return (_jsxs(Box, { flexDirection: "column", paddingY: 1, children: [_jsxs(Text, { bold: true, children: ["Registered Councilors (", entries.length, ")"] }), _jsx(Text, { children: " " }), entries.map(([id, entry]) => {
|
|
89
|
+
const onDisk = existsSync(join(entry.path, "ABOUT.md"));
|
|
90
|
+
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsxs(Text, { children: [_jsx(Text, { bold: true, color: "cyan", children: id }), " ", _jsxs(Text, { dimColor: true, children: ["[", entry.source, "]"] }), !onDisk && _jsx(Text, { color: "red", children: " (missing)" })] }), _jsxs(Text, { dimColor: true, children: [" ", entry.path] }), entry.url && _jsxs(Text, { dimColor: true, children: [" ", entry.url] })] }, id));
|
|
91
|
+
})] }));
|
|
92
|
+
}
|
|
93
|
+
if (status === "done") {
|
|
94
|
+
return _jsx(Text, { color: "green", children: message });
|
|
95
|
+
}
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=councilor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"councilor.js","sourceRoot":"","sources":["../../src/commands/councilor.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,GAChB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,E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AO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE;oBAC3B,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC;oBACxD,OAAO,CACL,MAAC,GAAG,IAAU,aAAa,EAAC,QAAQ,EAAC,YAAY,EAAE,CAAC,aAClD,MAAC,IAAI,eACH,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAC,MAAM,YAAE,EAAE,GAAQ,EAClC,GAAG,EACJ,MAAC,IAAI,IAAC,QAAQ,wBAAG,KAAK,CAAC,MAAM,SAAS,EACrC,CAAC,MAAM,IAAI,KAAC,IAAI,IAAC,KAAK,EAAC,KAAK,2BAAkB,IAC1C,EACP,MAAC,IAAI,IAAC,QAAQ,yBAAI,KAAK,CAAC,IAAI,IAAQ,EACnC,KAAK,CAAC,GAAG,IAAI,MAAC,IAAI,IAAC,QAAQ,yBAAI,KAAK,CAAC,GAAG,IAAQ,KARzC,EAAE,CASN,CACP,CAAC;gBACJ,CAAC,CAAC,IACE,CACP,CAAC;IACJ,CAAC;IAED,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,OAAO,KAAC,IAAI,IAAC,KAAK,EAAC,OAAO,YAAE,OAAO,GAAQ,CAAC;IAC9C,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
interface Props {
|
|
2
2
|
topic: string;
|
|
3
3
|
councilDir: string;
|
|
4
|
-
|
|
4
|
+
councilorPaths?: string[];
|
|
5
5
|
rounds: number;
|
|
6
6
|
outputDir: string;
|
|
7
7
|
format: "md" | "json" | "both";
|
|
8
8
|
infographic?: boolean;
|
|
9
9
|
mode?: "freeform" | "debate";
|
|
10
10
|
}
|
|
11
|
-
export declare function DiscussCommand({ topic, councilDir,
|
|
11
|
+
export declare function DiscussCommand({ topic, councilDir, councilorPaths, rounds, outputDir, format, infographic: generateInfographicFlag, mode, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export {};
|
package/dist/commands/discuss.js
CHANGED
|
@@ -6,16 +6,16 @@ import { readFile } from "node:fs/promises";
|
|
|
6
6
|
import { existsSync } from "node:fs";
|
|
7
7
|
import { join } from "node:path";
|
|
8
8
|
import { homedir } from "node:os";
|
|
9
|
-
import {
|
|
10
|
-
import { getRegisteredPaths } from "../core/
|
|
9
|
+
import { loadCouncilors, loadSpecificCouncilors } from "../core/councilor-loader.js";
|
|
10
|
+
import { getRegisteredPaths } from "../core/councilor-registry.js";
|
|
11
11
|
import { runConversation } from "../core/conversation-engine.js";
|
|
12
12
|
import { writeOutput } from "../core/output-formatter.js";
|
|
13
13
|
import { saveToHistory } from "../core/history.js";
|
|
14
14
|
import { runSecretary } from "../core/secretary.js";
|
|
15
15
|
import { generateInfographic } from "../core/infographic.js";
|
|
16
16
|
import { log } from "../core/logger.js";
|
|
17
|
-
export function DiscussCommand({ topic, councilDir,
|
|
18
|
-
const [status, setStatus] = useState("Loading
|
|
17
|
+
export function DiscussCommand({ topic, councilDir, councilorPaths, rounds, outputDir, format, infographic: generateInfographicFlag, mode = "freeform", }) {
|
|
18
|
+
const [status, setStatus] = useState("Loading councilors...");
|
|
19
19
|
const [currentSpeaker, setCurrentSpeaker] = useState(null);
|
|
20
20
|
const [currentRound, setCurrentRound] = useState(0);
|
|
21
21
|
const [completedTurns, setCompletedTurns] = useState([]);
|
|
@@ -37,7 +37,7 @@ export function DiscussCommand({ topic, councilDir, counsellorPaths, rounds, out
|
|
|
37
37
|
resolvedTopic = await readFile(topic, "utf-8");
|
|
38
38
|
topicSource = "file";
|
|
39
39
|
}
|
|
40
|
-
// Load config and
|
|
40
|
+
// Load config and councilors
|
|
41
41
|
let cfg = { backends: {} };
|
|
42
42
|
let registeredPaths = [];
|
|
43
43
|
try {
|
|
@@ -45,16 +45,16 @@ export function DiscussCommand({ topic, councilDir, counsellorPaths, rounds, out
|
|
|
45
45
|
registeredPaths = getRegisteredPaths(cfg);
|
|
46
46
|
}
|
|
47
47
|
catch { /* no config */ }
|
|
48
|
-
const
|
|
49
|
-
? await
|
|
50
|
-
: await
|
|
51
|
-
setStatus(`Starting ${mode === "debate" ? "debate" : "discussion"} with ${
|
|
48
|
+
const councilors = councilorPaths?.length
|
|
49
|
+
? await loadSpecificCouncilors(councilorPaths)
|
|
50
|
+
: await loadCouncilors(councilDir, registeredPaths);
|
|
51
|
+
setStatus(`Starting ${mode === "debate" ? "debate" : "discussion"} with ${councilors.length} councilor${councilors.length > 1 ? "s" : ""} over ${rounds} round${rounds > 1 ? "s" : ""}`);
|
|
52
52
|
const onEvent = (event) => {
|
|
53
53
|
switch (event.type) {
|
|
54
54
|
case "turn_start":
|
|
55
55
|
setCurrentRound(event.round);
|
|
56
|
-
setCurrentSpeaker(event.
|
|
57
|
-
setStatus(`Round ${event.round} — ${event.
|
|
56
|
+
setCurrentSpeaker(event.councilorName);
|
|
57
|
+
setStatus(`Round ${event.round} — ${event.councilorName} is speaking...`);
|
|
58
58
|
break;
|
|
59
59
|
case "turn_complete":
|
|
60
60
|
setCompletedTurns((prev) => [...prev, event.turn]);
|
|
@@ -75,14 +75,14 @@ export function DiscussCommand({ topic, councilDir, counsellorPaths, rounds, out
|
|
|
75
75
|
setActiveRoundSummary("");
|
|
76
76
|
break;
|
|
77
77
|
case "error":
|
|
78
|
-
setError(`Error from ${event.
|
|
78
|
+
setError(`Error from ${event.councilorName}: ${event.error}`);
|
|
79
79
|
break;
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
82
|
const result = await runConversation({
|
|
83
83
|
topic: resolvedTopic,
|
|
84
84
|
topicSource,
|
|
85
|
-
|
|
85
|
+
councilors,
|
|
86
86
|
rounds,
|
|
87
87
|
onEvent,
|
|
88
88
|
mode,
|
|
@@ -149,6 +149,6 @@ export function DiscussCommand({ topic, councilDir, counsellorPaths, rounds, out
|
|
|
149
149
|
if (done) {
|
|
150
150
|
return (_jsxs(Box, { flexDirection: "column", paddingY: 1, children: [_jsx(Text, { color: "green", children: "Discussion complete!" }), _jsxs(Text, { children: [completedTurns.length, " turns across ", currentRound, " round", currentRound > 1 ? "s" : ""] }), _jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { bold: true, children: "Output files:" }), outputFiles.map((f) => (_jsxs(Text, { color: "cyan", children: [" ", f] }, f)))] }), Object.keys(roundSummaries).length > 0 && (_jsx(Box, { flexDirection: "column", marginTop: 1, children: Object.entries(roundSummaries).map(([round, summary]) => (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsxs(Text, { bold: true, color: "yellow", children: ["Round ", round, " Summary:"] }), _jsx(Text, { children: summary })] }, round))) })), summaryStatus === "complete" && summaryText && (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { bold: true, color: "blue", children: "Secretary's Summary:" }), _jsx(Text, { children: summaryText })] })), infographicSaved && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "magenta", children: "Infographic saved to history." }) }))] }));
|
|
151
151
|
}
|
|
152
|
-
return (_jsxs(Box, { flexDirection: "column", paddingY: 1, children: [_jsxs(Box, { children: [_jsx(Text, { color: "green", children: _jsx(Spinner, { type: "dots" }) }), _jsxs(Text, { children: [" ", status] })] }), completedTurns.length > 0 && (_jsx(Box, { flexDirection: "column", marginTop: 1, children: completedTurns.slice(-3).map((turn, i) => (_jsxs(Text, { dimColor: true, children: ["Round ", turn.round, " \u2014 ", turn.
|
|
152
|
+
return (_jsxs(Box, { flexDirection: "column", paddingY: 1, children: [_jsxs(Box, { children: [_jsx(Text, { color: "green", children: _jsx(Spinner, { type: "dots" }) }), _jsxs(Text, { children: [" ", status] })] }), completedTurns.length > 0 && (_jsx(Box, { flexDirection: "column", marginTop: 1, children: completedTurns.slice(-3).map((turn, i) => (_jsxs(Text, { dimColor: true, children: ["Round ", turn.round, " \u2014 ", turn.councilorName, ": ", turn.content.slice(0, 80), "..."] }, i))) })), activeRoundSummary && (_jsx(Box, { flexDirection: "column", marginTop: 1, children: _jsxs(Text, { color: "yellow", dimColor: true, children: [activeRoundSummary.slice(0, 120), "..."] }) }))] }));
|
|
153
153
|
}
|
|
154
154
|
//# sourceMappingURL=discuss.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discuss.js","sourceRoot":"","sources":["../../src/commands/discuss.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"discuss.js","sourceRoot":"","sources":["../../src/commands/discuss.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC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text, { color: "red", children: ["Error: ", error] });
|
|
37
37
|
}
|
|
38
38
|
if (detail) {
|
|
39
|
-
return (_jsxs(Box, { flexDirection: "column", paddingY: 1, children: [_jsxs(Text, { bold: true, children: ["Topic: ", detail.topic] }), _jsxs(Text, { dimColor: true, children: [detail.
|
|
39
|
+
return (_jsxs(Box, { flexDirection: "column", paddingY: 1, children: [_jsxs(Text, { bold: true, children: ["Topic: ", detail.topic] }), _jsxs(Text, { dimColor: true, children: [detail.councilors.map(c => c.name).join(", "), " | ", detail.rounds, " round", detail.rounds > 1 ? "s" : "", " | ", new Date(detail.startedAt).toLocaleString()] }), _jsx(Box, { flexDirection: "column", marginTop: 1, children: detail.turns.map((turn, i) => (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsxs(Text, { bold: true, color: "cyan", children: ["[", turn.councilorName, "] Round ", turn.round] }), _jsx(Text, { children: turn.content })] }, i))) })] }));
|
|
40
40
|
}
|
|
41
41
|
if (entries.length === 0) {
|
|
42
42
|
return _jsx(Text, { dimColor: true, children: "No discussion history found." });
|
|
43
43
|
}
|
|
44
|
-
return (_jsxs(Box, { flexDirection: "column", paddingY: 1, children: [_jsx(Text, { bold: true, children: "Discussion History" }), _jsx(Box, { flexDirection: "column", marginTop: 1, children: entries.map((entry) => (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsxs(Text, { children: [_jsx(Text, { bold: true, children: entry.topic.slice(0, 60) }), entry.topic.length > 60 ? "..." : ""] }), _jsxs(Text, { dimColor: true, children: [new Date(entry.startedAt).toLocaleString(), " | ", entry.
|
|
44
|
+
return (_jsxs(Box, { flexDirection: "column", paddingY: 1, children: [_jsx(Text, { bold: true, children: "Discussion History" }), _jsx(Box, { flexDirection: "column", marginTop: 1, children: entries.map((entry) => (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsxs(Text, { children: [_jsx(Text, { bold: true, children: entry.topic.slice(0, 60) }), entry.topic.length > 60 ? "..." : ""] }), _jsxs(Text, { dimColor: true, children: [new Date(entry.startedAt).toLocaleString(), " | ", entry.councilors.join(", "), " | ", entry.rounds, " round", entry.rounds > 1 ? "s" : ""] }), _jsxs(Text, { color: "gray", children: ["ID: ", entry.id] })] }, entry.id))) })] }));
|
|
45
45
|
}
|
|
46
46
|
//# sourceMappingURL=history.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history.js","sourceRoot":"","sources":["../../src/commands/history.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAQlE,MAAM,UAAU,cAAc,CAAC,EAAE,EAAE,EAAS;IAC1C,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC7C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAiB,EAAE,CAAC,CAAC;IAC3D,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAA4B,IAAI,CAAC,CAAC;IAEtE,SAAS,CAAC,GAAG,EAAE;QACb,KAAK,UAAU,GAAG;YAChB,IAAI,CAAC;gBACH,IAAI,EAAE,EAAE,CAAC;oBACP,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,EAAE,CAAC,CAAC;oBACzC,SAAS,CAAC,MAAM,CAAC,CAAC;gBACpB,CAAC;qBAAM,CAAC;oBACN,MAAM,IAAI,GAAG,MAAM,WAAW,EAAE,CAAC;oBACjC,UAAU,CAAC,IAAI,CAAC,CAAC;gBACnB,CAAC;YACH,CAAC;YAAC,OAA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,EAAC,QAAQ,EAAC,SAAS,EAAE,CAAC,YACrC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CACtB,MAAC,GAAG,IAAgB,aAAa,EAAC,QAAQ,EAAC,YAAY,EAAE,CAAC,aACxD,MAAC,IAAI,eACH,KAAC,IAAI,IAAC,IAAI,kBAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,GAAQ,EAC3C,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAChC,EACP,MAAC,IAAI,IAAC,QAAQ,mBACX,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,cAAc,EAAE,SAAK,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,SAAK,KAAK,CAAC,MAAM,YAAQ,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAC1H,EACP,MAAC,IAAI,IAAC,KAAK,EAAC,MAAM,qBAAM,KAAK,CAAC,EAAE,IAAQ,KARhC,KAAK,CAAC,EAAE,CASZ,CACP,CAAC,GACE,IACF,CACP,CAAC;AACJ,CAAC"}
|
package/dist/commands/list.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
3
|
import { Box, Text } from "ink";
|
|
4
|
-
import {
|
|
5
|
-
import { getRegisteredPaths } from "../core/
|
|
4
|
+
import { loadCouncilors } from "../core/councilor-loader.js";
|
|
5
|
+
import { getRegisteredPaths } from "../core/councilor-registry.js";
|
|
6
6
|
import { readFile } from "node:fs/promises";
|
|
7
7
|
import { join } from "node:path";
|
|
8
8
|
import { homedir } from "node:os";
|
|
9
9
|
export function ListCommand({ councilDir }) {
|
|
10
|
-
const [
|
|
10
|
+
const [councilors, setCouncilors] = useState([]);
|
|
11
11
|
const [error, setError] = useState(null);
|
|
12
12
|
const [loading, setLoading] = useState(true);
|
|
13
13
|
useEffect(() => {
|
|
@@ -18,11 +18,11 @@ export function ListCommand({ councilDir }) {
|
|
|
18
18
|
}
|
|
19
19
|
catch { /* no config */ }
|
|
20
20
|
const paths = getRegisteredPaths(config);
|
|
21
|
-
return
|
|
21
|
+
return loadCouncilors(councilDir, paths);
|
|
22
22
|
}
|
|
23
23
|
load()
|
|
24
24
|
.then((c) => {
|
|
25
|
-
|
|
25
|
+
setCouncilors(c);
|
|
26
26
|
setLoading(false);
|
|
27
27
|
})
|
|
28
28
|
.catch((err) => {
|
|
@@ -31,10 +31,10 @@ export function ListCommand({ councilDir }) {
|
|
|
31
31
|
});
|
|
32
32
|
}, []);
|
|
33
33
|
if (loading)
|
|
34
|
-
return _jsx(Text, { children: "Loading
|
|
34
|
+
return _jsx(Text, { children: "Loading councilors..." });
|
|
35
35
|
if (error) {
|
|
36
36
|
return _jsxs(Text, { color: "red", children: ["Error: ", error] });
|
|
37
37
|
}
|
|
38
|
-
return (_jsxs(Box, { flexDirection: "column", paddingY: 1, children: [_jsxs(Text, { bold: true, children: ["Available
|
|
38
|
+
return (_jsxs(Box, { flexDirection: "column", paddingY: 1, children: [_jsxs(Text, { bold: true, children: ["Available Councilors (", councilors.length, ") from ", councilDir] }), _jsx(Text, { children: " " }), councilors.map((c) => (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsxs(Text, { children: [_jsx(Text, { bold: true, color: "cyan", children: c.frontmatter.name }), " ", _jsxs(Text, { dimColor: true, children: ["(", c.id, ")"] })] }), _jsxs(Text, { children: [" ", c.frontmatter.description] }), _jsxs(Text, { dimColor: true, children: [" ", "Backend: ", c.frontmatter.backend, c.frontmatter.model ? ` (${c.frontmatter.model})` : "", " | Interests:", " ", c.frontmatter.interests.join(", ")] })] }, c.id)))] }));
|
|
39
39
|
}
|
|
40
40
|
//# sourceMappingURL=list.js.map
|