the-high-council 0.8.2 → 0.8.3
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/.env.example +6 -6
- package/CONTRIBUTING.md +12 -60
- package/PERSONAS.md +1 -1
- package/README.md +205 -131
- package/TROUBLESHOOTING.md +5 -6
- package/chains/advise-single-deepseek.json +2 -2
- package/chains/advise-single-glm-flash.json +3 -3
- package/chains/daily7-sub-a.json +161 -0
- package/chains/mock-layered.json +69 -0
- package/chains/plan-china-high-council.json +312 -0
- package/chains/plan-china-medium-council.json +244 -0
- package/chains/plan-china-mini-council.json +181 -0
- package/chains/plan-claude-council.json +151 -0
- package/chains/plan-default-opro-council.json +250 -0
- package/chains/plan-high-council.json +327 -0
- package/chains/plan-medium-council.json +255 -0
- package/chains/plan-mini-council-sol-session.json +186 -0
- package/chains/plan-mini-council.json +186 -0
- package/chains/verify.json +1 -1
- package/package.json +3 -2
- package/schemas/report-v1.json +212 -14
- package/src/advice-brief.js +6 -4
- package/src/advice-guards.js +33 -2
- package/src/advice-retention.json +138 -75
- package/src/advice-send-context.js +31 -0
- package/src/advise.js +5 -2
- package/src/answer-back.js +34 -8
- package/src/answered-by.js +183 -0
- package/src/api.js +41 -18
- package/src/argued.js +6 -2
- package/src/audit.js +27 -3
- package/src/backed-round-choices.js +15 -0
- package/src/board-export.js +3 -2
- package/src/budget.js +2 -6
- package/src/cache-integrity.js +4 -0
- package/src/cap-input.js +48 -0
- package/src/cap-screen.js +72 -0
- package/src/chain-lint.js +132 -15
- package/src/chain-name.js +23 -11
- package/src/chain.js +1611 -308
- package/src/cli.js +1391 -367
- package/src/conflict-decider.js +129 -0
- package/src/conflict-detector.js +60 -0
- package/src/container-text.js +34 -0
- package/src/context-files.js +2 -1
- package/src/contract-cli.js +2 -1
- package/src/contract-lint.js +2 -2
- package/src/contract-record.js +4 -2
- package/src/cost-forecast.js +13 -7
- package/src/cost.js +131 -35
- package/src/council-replay.js +17 -6
- package/src/criteria-ledger.js +19 -1
- package/src/criteria-lock.js +1 -1
- package/src/deep-dive.js +5 -3
- package/src/default-cap.js +9 -0
- package/src/denied-models.js +10 -3
- package/src/dissent-digest.js +13 -6
- package/src/draft-disputes.js +70 -1
- package/src/dry-run.js +10 -3
- package/src/env-file.js +60 -9
- package/src/errors.js +29 -14
- package/src/exit-codes.js +14 -0
- package/src/fence.js +3 -2
- package/src/from-run-files.js +6 -0
- package/src/gate-cli.js +67 -13
- package/src/gate-ledger.js +4 -1
- package/src/gate.js +169 -13
- package/src/git.js +10 -0
- package/src/handoff-contract-text.js +30 -0
- package/src/handoff-from-run.js +97 -21
- package/src/handoff-prompt.js +10 -3
- package/src/hidden-chars.js +86 -0
- package/src/invocation.js +2 -1
- package/src/key-redaction.js +2 -2
- package/src/lab-safety.js +42 -0
- package/src/layers.js +120 -0
- package/src/mcp/advice.js +36 -34
- package/src/mcp/price-raise.js +87 -0
- package/src/mcp/progress-wait.js +45 -0
- package/src/mcp/run-end.js +17 -0
- package/src/mcp/server.js +393 -103
- package/src/mcp/tree-block.js +52 -0
- package/src/mcp/tree-decide.js +61 -0
- package/src/mcp/tree-members.js +17 -0
- package/src/mcp/tree-status.js +87 -0
- package/src/mcp/untrusted.js +12 -6
- package/src/mcp/usd-limit.js +40 -0
- package/src/metrics.js +12 -6
- package/src/milestones.js +1 -1
- package/src/objection-ledger.js +153 -0
- package/src/old-plan.js +93 -0
- package/src/outbound-scan.js +9 -3
- package/src/overseer-rounds.js +185 -0
- package/src/pii-gate.js +6 -4
- package/src/pii-mode.js +24 -0
- package/src/policy.js +66 -5
- package/src/price-limits.js +75 -0
- package/src/price-pin.js +69 -0
- package/src/price-raise.js +111 -0
- package/src/price-refused.js +168 -0
- package/src/price-table.js +146 -0
- package/src/pricing.json +107 -29
- package/src/providers.js +186 -45
- package/src/reasoning-table.json +134 -27
- package/src/reasoning.js +76 -14
- package/src/rematch.js +51 -18
- package/src/replay.js +2 -1
- package/src/report-shape.js +107 -5
- package/src/resume-brief.js +9 -1
- package/src/resume-ceiling.js +9 -0
- package/src/return-path.js +11 -3
- package/src/review-notes-lane.js +61 -0
- package/src/review-notes.js +207 -0
- package/src/roles.js +266 -15
- package/src/run-budget.js +20 -11
- package/src/run-contract-check.js +33 -0
- package/src/run-files.js +72 -5
- package/src/run-lock.js +141 -25
- package/src/run-preflight.js +224 -0
- package/src/run-state.js +1 -0
- package/src/run-status.js +82 -26
- package/src/seat-key.js +60 -0
- package/src/secret-patterns.js +91 -2
- package/src/security-review.js +8 -4
- package/src/send-path-refusals.js +4 -2
- package/src/send-path.js +40 -6
- package/src/spend-reservations.js +8 -2
- package/src/spend.js +144 -29
- package/src/stage-cache.js +96 -0
- package/src/stage-contract.js +11 -2
- package/src/stage-submission.js +36 -10
- package/src/stage-system.js +112 -0
- package/src/start-cap.js +121 -0
- package/src/start-scope.js +56 -0
- package/src/stop-files.js +22 -3
- package/src/superseded-n.js +22 -0
- package/src/superseded.js +26 -11
- package/src/table-reasons.js +7 -0
- package/src/table-rows.js +48 -0
- package/src/terminal-safe.js +15 -0
- package/src/thin-contract-check.js +8 -2
- package/src/tools.js +87 -28
- package/src/tree-abandon.js +72 -0
- package/src/tree-accept.js +172 -0
- package/src/tree-advice-parse.js +54 -0
- package/src/tree-advice-record.js +178 -0
- package/src/tree-advice-route.js +189 -0
- package/src/tree-advice.js +87 -0
- package/src/tree-affected.js +87 -0
- package/src/tree-approve-session.js +98 -0
- package/src/tree-approve.js +128 -0
- package/src/tree-blocked-child.js +89 -0
- package/src/tree-budget.js +618 -0
- package/src/tree-bundle-input.js +105 -0
- package/src/tree-ceiling.js +57 -0
- package/src/tree-chain-limits.js +114 -0
- package/src/tree-check.js +262 -0
- package/src/tree-choice.js +199 -0
- package/src/tree-cli.js +123 -0
- package/src/tree-close.js +175 -0
- package/src/tree-context-refs.js +90 -0
- package/src/tree-continuation.js +209 -0
- package/src/tree-decide-accept.js +156 -0
- package/src/tree-decide-session.js +222 -0
- package/src/tree-decide-size.js +77 -0
- package/src/tree-decide-stop.js +467 -0
- package/src/tree-decide.js +716 -0
- package/src/tree-decision-event.js +7 -0
- package/src/tree-deps.js +121 -0
- package/src/tree-derive-load.js +177 -0
- package/src/tree-derive.js +396 -0
- package/src/tree-detect.js +67 -0
- package/src/tree-expansion.js +161 -0
- package/src/tree-fan-out.js +10 -0
- package/src/tree-files.js +57 -0
- package/src/tree-frontier.js +418 -0
- package/src/tree-gate.js +98 -0
- package/src/tree-handoff.js +532 -0
- package/src/tree-identity.js +53 -0
- package/src/tree-loop.js +464 -0
- package/src/tree-member-cover.js +37 -0
- package/src/tree-member.js +346 -0
- package/src/tree-obligation.js +56 -0
- package/src/tree-person-stop.js +66 -0
- package/src/tree-pii-mode.js +68 -0
- package/src/tree-price-stop.js +55 -0
- package/src/tree-projection.js +88 -0
- package/src/tree-qid.js +47 -0
- package/src/tree-readiness.js +78 -0
- package/src/tree-ready.js +555 -0
- package/src/tree-rebuild.js +143 -0
- package/src/tree-record.js +255 -0
- package/src/tree-recovery.js +181 -0
- package/src/tree-redirect.js +57 -0
- package/src/tree-register.js +104 -0
- package/src/tree-report.js +92 -0
- package/src/tree-restore.js +155 -0
- package/src/tree-resume.js +301 -0
- package/src/tree-reuse-load.js +234 -0
- package/src/tree-reuse-wire.js +74 -0
- package/src/tree-reuse.js +299 -0
- package/src/tree-root-replan.js +149 -0
- package/src/tree-root-task.js +35 -0
- package/src/tree-root-unstarted.js +13 -0
- package/src/tree-run.js +278 -0
- package/src/tree-session-draft.js +91 -0
- package/src/tree-split-changed.js +43 -0
- package/src/tree-split.js +304 -0
- package/src/tree-start.js +294 -0
- package/src/tree-status.js +224 -0
- package/src/tree-stop-marker.js +10 -0
- package/src/tree-stop-view.js +112 -0
- package/src/tree-stop.js +314 -0
- package/src/tree-task-pin.js +61 -0
- package/src/tree-transitions.js +1726 -0
- package/src/tree-ways-on.js +14 -0
- package/src/ui/app.js +2 -2
- package/src/ui/server.js +26 -5
- package/src/unknown-flag.js +132 -0
- package/src/unpriced.js +3 -3
- package/src/usd-figure.js +9 -0
- package/src/verdict-envelope.js +95 -0
- package/src/verdict-headline.js +76 -0
- package/src/verdict-stats.js +11 -4
- package/types/index.d.ts +18 -8
- package/chains/advise-premium.json +0 -144
- package/chains/cheap-7-v2.json +0 -154
- package/chains/coder-gate-v1.json +0 -74
- package/chains/coder-gate-v2.json +0 -71
- package/chains/eu-only.json +0 -62
- package/chains/plan-daily-7.json +0 -293
- package/chains/plan-debate-roles-c1.json +0 -116
- package/chains/plan-highest-7.json +0 -327
- package/chains/plan-lanes-4.json +0 -95
- package/chains/plan-open-7.json +0 -128
- package/chains/plan-premium-7.json +0 -149
- package/chains/security-review-only.json +0 -29
- package/chains/single-vendor-anthropic.json +0 -69
- package/chains/single-vendor-openai.json +0 -58
- package/chains/us-only.json +0 -65
package/.env.example
CHANGED
|
@@ -13,11 +13,11 @@ ZAI_API_KEY=
|
|
|
13
13
|
|
|
14
14
|
# Default per-run spend ceiling in USD. Overridden per run by --max-usd.
|
|
15
15
|
# A run stops cleanly before any stage that could take it past this, and
|
|
16
|
-
# resumes with a higher ceiling. Unset means $7
|
|
17
|
-
#
|
|
16
|
+
# resumes with a higher ceiling. Unset means $7 for a chain with no paid seat;
|
|
17
|
+
# a paid chain asks you to type its limit (this value is only the suggestion).
|
|
18
|
+
# --max-usd none works for a chain with no paid seat only.
|
|
18
19
|
MAX_USD_PER_RUN=7
|
|
19
20
|
|
|
20
|
-
# Optional settings (README "Setup" lists them all):
|
|
21
|
-
#
|
|
22
|
-
# for a local proxy in front of a keyed provider
|
|
23
|
-
# COUNCIL_PERSONAS_FILE, AUDIT_HMAC_KEY_FILE.
|
|
21
|
+
# Optional settings (README "Setup" lists them all): COUNCIL_MAX_USD_LIMIT (a ceiling: the MCP server's tools cannot lift it and the limit you type for a paid run, or the total you type for a paid tree (`council tree start --max-usd`, `council tree decide --amend-cap`), cannot go above it), OLLAMA_API_KEY, AUDIT_HMAC_KEY_FILE.
|
|
22
|
+
# Six settings are NOT read from a .env (the CLI prints a notice and ignores them there): set them in the real environment:
|
|
23
|
+
# COUNCIL_ADVICE_SENSITIVITY_FLOOR, COUNCIL_ADVICE_CHAINS_DIR, COUNCIL_WORKDIR, COUNCIL_PERSONAS_FILE, COUNCIL_PII_GATE and COUNCIL_ALLOW_LOOPBACK_KEY_HOST=1 (for a local proxy in front of a keyed provider).
|
package/CONTRIBUTING.md
CHANGED
|
@@ -1,68 +1,20 @@
|
|
|
1
1
|
# Contributing
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
an unscoped PR costs more of that time than it saves. The four shapes below are pre-scoped and
|
|
5
|
-
easy to land; a PR outside them is welcome but will take longer to review, since it needs a scope
|
|
6
|
-
discussion first.
|
|
3
|
+
The most useful help right now: tell us what your runs cost.
|
|
7
4
|
|
|
8
|
-
##
|
|
5
|
+
## Send a run cost
|
|
9
6
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
in `node --test`, real calls are opt-in and cost real money.
|
|
7
|
+
After a paid run, type `council --spend --days 30` in your project folder. Then
|
|
8
|
+
[open an issue](https://github.com/muad-yasin/the-high-council-mcp/issues/new) titled "Run cost: <chain>" with
|
|
9
|
+
that run's line, your version (`council --version`) and roughly how long your task was. Never paste your task,
|
|
10
|
+
your plan or a folder path. Your figure goes into the README's [Pricing](README.md#pricing) table.
|
|
15
11
|
|
|
16
|
-
|
|
17
|
-
which stages. `council doctor --chain chains/<yours>.json` lints it (the same rules every run
|
|
18
|
-
applies, including the denied-model and `key-host` rules), and `council doctor` prices it
|
|
19
|
-
worst-case, both with zero network calls; run both against your new file before opening a PR. Look at `chains/cheap-7-v2.json` or `chains/verify.json` as a starting
|
|
20
|
-
shape depending on whether you want a debate-and-panel chain or a single-critic chain.
|
|
12
|
+
## Code
|
|
21
13
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
real API call. See the existing branches in `callMock` - `mock-unreadable`,
|
|
26
|
-
`mock-provider-error` - for the shape: a model name that triggers one deterministic scripted
|
|
27
|
-
reply, documented with which real-world failure it stands in for.
|
|
14
|
+
Bug, docs and typo fixes are always welcome. For anything bigger, open an issue first. Quickest to review: a
|
|
15
|
+
provider adapter, a chain config, a mock fixture or a skill change. `npm test` runs offline for $0 and checks
|
|
16
|
+
the project's rules (no Grok, reasoning never lowered, prompt wording only in `src/roles.js`).
|
|
28
17
|
|
|
29
|
-
|
|
30
|
-
a good proposal names the failure it prevents, where that failure was seen, and what the rule
|
|
31
|
-
should say. Skills are generic and public, so a change also passes the same leftover-content
|
|
32
|
-
check every skill shipped through: no project names, internal paths, private model or session
|
|
33
|
-
names, or third-party text copied in.
|
|
18
|
+
Two things are settled: bring-your-own-key only, and no claim about output quality until it is measured.
|
|
34
19
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
These checks run in `npm test`, so they will fail a PR rather than surprise it in review:
|
|
38
|
-
|
|
39
|
-
- **No xAI/Grok seat in any chain.** Chain lint's `denied-model` rule refuses it, with no override.
|
|
40
|
-
- **A shipped chain's seats reason at high.** Chain lint's `reasoning-not-high` rule refuses a
|
|
41
|
-
setting that lowers a seat's reasoning effort.
|
|
42
|
-
- **Prompt wording lives in `src/roles.js` only.** Changing it fails `test/prompt-pin.test.js` on
|
|
43
|
-
purpose; say in the PR what the prompt now tells the model and why, and the maintainer re-records
|
|
44
|
-
the pin.
|
|
45
|
-
- **Documents that list what the repo holds are checked against it.** `skills/README.md`,
|
|
46
|
-
`docs/skills.html` and the landing page (`docs/index.html`) are compared with the repo by tests;
|
|
47
|
-
a failing one names the document to update.
|
|
48
|
-
- **Run output is never committed.** `runs/` is gitignored; keep it that way.
|
|
49
|
-
|
|
50
|
-
Two stances, where a PR is closed rather than scoped: bring-your-own-key only (no default key,
|
|
51
|
-
proxy or hosted path), and no claim about output quality until something has been measured.
|
|
52
|
-
|
|
53
|
-
## Everything else
|
|
54
|
-
|
|
55
|
-
Bug fixes, docs fixes, and typo fixes are always welcome with no scoping step. Anything larger -
|
|
56
|
-
a new CLI command, a new stage, a change to what a chain's JSON schema can express - should start
|
|
57
|
-
as an issue describing what it's for, before the PR, so review time isn't spent re-deriving scope
|
|
58
|
-
from a diff.
|
|
59
|
-
|
|
60
|
-
## Running the tests
|
|
61
|
-
|
|
62
|
-
npm test # the whole suite
|
|
63
|
-
node --test test/chain.test.js # one file
|
|
64
|
-
node --test --test-name-pattern 'parseJson: raw newline' # one test
|
|
65
|
-
|
|
66
|
-
Offline, no API key, no network call, no cost. The whole suite is over 2,000 tests and takes
|
|
67
|
-
several minutes; run the files you touched first. `node --test` matches the project's own test
|
|
68
|
-
runner - no additional test framework to install.
|
|
20
|
+
Security issues: [contact@sower-industries.de](mailto:contact@sower-industries.de).
|
package/PERSONAS.md
CHANGED
|
@@ -25,7 +25,7 @@ here is a secondary association in a reader's mind, not a legal one - worth havi
|
|
|
25
25
|
not worth revisiting a decision already made.
|
|
26
26
|
|
|
27
27
|
A `role.persona` key that is not in the set in use is sent as a bare name, with no voice
|
|
28
|
-
directive. `plan-premium-7` seats two such keys, `hypatia` and `avicenna`, next to the five
|
|
28
|
+
directive. The retired `plan-premium-7` (in `chains/outdated/`) seats two such keys, `hypatia` and `avicenna`, next to the five
|
|
29
29
|
defaults: without a persona file of your own they reach the debate prompt as those names alone.
|
|
30
30
|
|
|
31
31
|
**You can replace the whole set.** `loadPersonas()` in `src/personas.js` reads an operator-supplied
|