@sjawhar/claude-envoy 0.0.0 → 1.0.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/.claude-plugin/plugin.json +6 -0
- package/.mcp.json +11 -0
- package/.omp-plugin/plugin.json +6 -0
- package/AGENTS.md +343 -0
- package/README.md +639 -0
- package/bin/dispatch +6 -0
- package/bin/envoy-channel.ts +9 -0
- package/bin/envoy-send.ts +33 -0
- package/dist/THIRD_PARTY_NOTICES +816 -0
- package/dist/dispatch.js +27707 -0
- package/dist/envoy-channel.js +57695 -0
- package/dist/session-hook.js +26328 -0
- package/dist/session-title-hook.js +116 -0
- package/hooks/hooks.json +60 -0
- package/hooks/session-hook.ts +512 -0
- package/hooks/session-title-hook.ts +46 -0
- package/legion/.claude-plugin/plugin.json +4 -0
- package/legion/agents/deep-worker.md +68 -0
- package/legion/agents/oracle.md +35 -0
- package/legion/agents/plan-gap-analyst.md +65 -0
- package/legion/agents/plan-reviewer.md +104 -0
- package/legion/agents/thermonuclear-code-quality.md +30 -0
- package/legion/agents/thermonuclear-deep-review.md +30 -0
- package/legion/hooks/hooks.json +89 -0
- package/legion/skills/ce-simplify-code/LICENSE +21 -0
- package/legion/skills/ce-simplify-code/SKILL.md +66 -0
- package/legion/skills/ce-simplify-code/references/personas/code-quality-reviewer.md +17 -0
- package/legion/skills/ce-simplify-code/references/personas/code-reuse-reviewer.md +7 -0
- package/legion/skills/ce-simplify-code/references/personas/efficiency-reviewer.md +11 -0
- package/legion/skills/leading-a-work-stream/SKILL.md +96 -0
- package/legion/skills/leading-a-work-stream/references/daily-plan.md +8 -0
- package/legion/skills/leading-a-work-stream/references/decision-rights.md +6 -0
- package/legion/skills/leading-a-work-stream/references/direction-and-coaching.md +13 -0
- package/legion/skills/leading-a-work-stream/references/dispatch-upkeep.md +8 -0
- package/legion/skills/leading-a-work-stream/references/sources.md +9 -0
- package/legion/skills/leading-a-work-stream/references/speed-tick.md +44 -0
- package/legion/skills/leading-a-work-stream/references/user-quotes.md +7 -0
- package/legion/skills/legion-architect/SKILL.md +86 -0
- package/legion/skills/legion-architect/references/acceptance.md +208 -0
- package/legion/skills/legion-architect/references/decomposition.md +129 -0
- package/legion/skills/legion-architect/references/design-gate.md +206 -0
- package/legion/skills/legion-architect/references/merge-notices.md +91 -0
- package/legion/skills/legion-architect/references/wake-routing.md +41 -0
- package/legion/skills/legion-controller/SKILL.md +151 -0
- package/legion/skills/legion-controller/references/admission.md +22 -0
- package/legion/skills/legion-controller/references/backlog-stewardship.md +101 -0
- package/legion/skills/legion-controller/references/daily-report.md +75 -0
- package/legion/skills/legion-controller/references/escalation.md +82 -0
- package/legion/skills/legion-controller/references/finding-asks.md +181 -0
- package/legion/skills/legion-controller/references/parked-decisions.md +198 -0
- package/legion/skills/legion-controller/references/session.md +100 -0
- package/legion/skills/legion-controller/references/slack-mentions.md +154 -0
- package/legion/skills/legion-controller/references/triage.md +96 -0
- package/legion/skills/legion-controller/references/wakes.md +132 -0
- package/legion/skills/legion-oracle/SKILL.md +48 -0
- package/legion/skills/legion-retro/SKILL.md +112 -0
- package/legion/skills/legion-retro/references/learnings.md +60 -0
- package/legion/skills/legion-retro/references/pr-body-content.md +56 -0
- package/legion/skills/legion-worker/SKILL.md +69 -0
- package/legion/skills/legion-worker/references/cleanup-deletion.md +22 -0
- package/legion/skills/legion-worker/references/conflicts-and-rewrites.md +164 -0
- package/legion/skills/legion-worker/references/default-branch-check.md +53 -0
- package/legion/skills/legion-worker/references/findings.md +199 -0
- package/legion/skills/legion-worker/references/merge-gate.md +353 -0
- package/legion/skills/legion-worker/references/pr-body.md +218 -0
- package/legion/skills/legion-worker/references/review-threads.md +77 -0
- package/legion/skills/legion-worker/references/systematic-rename.md +19 -0
- package/legion/skills/legion-worker/references/tools.md +708 -0
- package/legion/skills/thermonuclear-code-quality/LICENSE +21 -0
- package/legion/skills/thermonuclear-code-quality/SKILL.md +60 -0
- package/legion/skills/thermonuclear-deep-review/LICENSE +21 -0
- package/legion/skills/thermonuclear-deep-review/SKILL.md +80 -0
- package/package.json +49 -1
- package/scripts/build-inputs.txt +84 -0
- package/scripts/build.ts +415 -0
- package/scripts/check-packed-skills.sh +50 -0
- package/scripts/pack-skills.sh +146 -0
- package/scripts/smoke-channel.sh +178 -0
- package/scripts/smoke-clear-rebind.sh +164 -0
- package/scripts/smoke-session-title.sh +245 -0
- package/scripts/verify-build.sh +88 -0
- package/skills/agent-secrets/SKILL.md +180 -0
- package/skills/asd-ste100/LICENSE +21 -0
- package/skills/asd-ste100/SKILL.md +140 -0
- package/skills/asd-ste100/examples/before-after.md +92 -0
- package/skills/asd-ste100/references/writing-rules.md +59 -0
- package/skills/dispatch/SKILL.md +89 -0
- package/skills/dispatch-first/SKILL.md +46 -0
- package/skills/dispatch-writing-specs/SKILL.md +80 -0
- package/skills/envoy/SKILL.md +82 -0
- package/skills/envoy/references/check-settlement.md +62 -0
- package/skills/envoy/references/deliveries.md +67 -0
- package/skills/envoy/references/legion.md +14 -0
- package/skills/envoy/references/roles.md +12 -0
- package/skills/envoy/references/sources.md +41 -0
- package/skills/outside-message/SKILL.md +111 -0
- package/skills/plain-words/SKILL.md +88 -0
- package/src/channel-forwarder.ts +262 -0
- package/src/claude-channel.ts +705 -0
- package/src/claude-session.ts +38 -0
- package/src/envoy-channel-server.ts +2115 -0
- package/src/envoy-client.ts +26 -0
- package/src/envoy-off.ts +62 -0
- package/src/legion-claim.ts +211 -0
- package/src/legion-inbox.ts +110 -0
- package/src/legion-phase-hook.ts +554 -0
- package/src/legion-tool.ts +69 -0
- package/src/replay-state.ts +97 -0
- package/src/send-arguments.ts +13 -0
- package/src/session-identity.ts +165 -0
- package/src/session-state.ts +142 -0
- package/src/session-title.ts +251 -0
- package/src/subscription-topics.ts +16 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Cursor
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: thermonuclear-code-quality
|
|
3
|
+
description: Use when asked for a thermonuclear code-quality review or a deep maintainability audit of a branch or PR diff. Also use when asked to review abstraction quality, oversized files or ad-hoc branching growth.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Thermonuclear Code Quality
|
|
8
|
+
|
|
9
|
+
If this skill disagrees with the code, a command's output or its `--help`, follow those and say which line of this skill is wrong.
|
|
10
|
+
|
|
11
|
+
Make your own scratch with `mktemp -d` and delete only the paths you made, each by its exact
|
|
12
|
+
path. Never delete by a glob in a shared directory: every role of this issue writes into the same
|
|
13
|
+
`$TMPDIR` on the issue's volume, so a sweep like `rm -rf "$TMPDIR"/tmp.*` deletes directories
|
|
14
|
+
another role has open.
|
|
15
|
+
|
|
16
|
+
This is a maintainability review of one diff: the current branch's changes, or the range you are given. Every remedy keeps behavior the same and removes code or concepts, or moves code where a reader finds it without reading the rest of the file, because a behavior change is work for `skill://thermonuclear-deep-review`, not a cleanup. The table's last two rows change ordering or failure behavior: say so in the finding.
|
|
17
|
+
|
|
18
|
+
## Report
|
|
19
|
+
|
|
20
|
+
The first line is the verdict, with the short sha of the head you reviewed (`git rev-parse --short=8 HEAD`, or the sha your brief names when you have no shell):
|
|
21
|
+
|
|
22
|
+
- `Verdict: APPROVE at <sha>` when no finding stands.
|
|
23
|
+
- `Verdict: CHANGES at <sha>` when one does.
|
|
24
|
+
|
|
25
|
+
Put nothing before it: a PR gate reads only the first line of a posted report.
|
|
26
|
+
|
|
27
|
+
Then one entry per finding: `path:line`, the smell, the cost it adds, and the remedy, so the author can act on it without asking. Report few findings, each one you are sure of: a long list hides the ones that block. Order them so the costliest is read first: step 2's structural regressions and missed code-judo moves, then rows 2-3, 7-8, 1, 9-10, then the rest. Write each as a plain request: `this adds another special-case branch to an already busy flow. Move it into its own function.`
|
|
28
|
+
|
|
29
|
+
## Steps
|
|
30
|
+
|
|
31
|
+
1. Read the diff and each changed file around its hunks. Flag lines the diff adds or changes, and existing code it makes harder to follow, such as a function it lengthens or adds a branch or parameter to. A finding on code the diff leaves alone blocks the PR for work it did not cause.
|
|
32
|
+
2. Look for the code-judo move first: a restructure onto the existing architecture that deletes whole branches, helpers, modes, conditionals or layers. A structural fix often removes the line-level findings with it.
|
|
33
|
+
3. For a refactor, count the concepts (the types, functions, flags and modes) a reader must know before and after. A move that keeps the count is not a simplification: say so, rather than accept a cleaner version of the same idea. When the problem is structural, do not suggest a rename, which hides the finding that matters.
|
|
34
|
+
4. Check every hunk against the table below, because each row is a smell this review blocks on. For file size, compare `git show <base>:<path> | wc -l` with `wc -l <path>`; `<base>` is the range start your brief names, else `git merge-base HEAD origin/<default branch>`.
|
|
35
|
+
5. Before you report a finding, quote its line at the reviewed head. For a boundary, type or duplicate-helper claim, also read the callers (`grep` the symbol) and the existing helper you name. A finding built on a misread costs the author a round.
|
|
36
|
+
6. Report only a cost you can name (the table's Cost column). A preference or a micro-optimization with no such cost is not a finding. When a structural finding exists, leave out naming and style nits, because they bury it.
|
|
37
|
+
7. Ask for a new abstraction (a type, module or policy object) only when the code shows two real callers or two ways it will change. With one, the abstraction is the thin wrapper row 6 flags.
|
|
38
|
+
|
|
39
|
+
## Smells and remedies
|
|
40
|
+
|
|
41
|
+
| Smell | Cost | Remedy |
|
|
42
|
+
|---|---|---|
|
|
43
|
+
| The PR pushes a file from under 1000 lines to over 1000 | more to scan for every change | Decompose it first into helpers, modules or local abstractions. Accept the growth only when the PR names the caller or constraint that keeps the code in that file. |
|
|
44
|
+
| Ad-hoc conditionals, special cases, one-off booleans, nullable modes or flags in unrelated or busy flows. A branch for one input value in the middle of a busy function. A branch whose name or comment says it is temporary. | each later change reads every branch | Reframe the state model so the conditionals disappear, not only move to one place. Make the special case part of a simpler default flow. Else move it into its own function, or behind an abstraction step 7 allows. |
|
|
45
|
+
| Repeated conditionals or condition chains | each new case edits every chain | A typed model or an explicit dispatcher. |
|
|
46
|
+
| Copy-pasted logic or duplicate branches | a fix lands in one copy | Extract a helper or pure function. Collapse into one flow. |
|
|
47
|
+
| Hacky, brittle or "magic" behavior, such as reading a value by its string form or position. Generic mechanisms that hide simple data-shape assumptions. | the assumption breaks with no error | Direct code that states the assumption: a typed field, a named constant, an explicit check. |
|
|
48
|
+
| Thin wrappers, identity abstractions, pass-through helpers | one more layer to cross | Delete the layer. |
|
|
49
|
+
| Unnecessary optionality, `unknown`, `any`, casts, loose ad-hoc objects. A silent fallback over an unclear invariant. | the type hides what the value is | Explicit typed models or shared contracts, so the control flow gets simpler. |
|
|
50
|
+
| Feature logic in shared paths. Implementation details leaking through APIs. Logic in the wrong file, layer or package. | every caller of the shared path pays | Move it to the package whose existing code already reads or writes that data (`grep` its type). |
|
|
51
|
+
| A bespoke helper where the repository already has one that does the same | two helpers drift apart | Reuse the existing helper; name it as `path:line`. |
|
|
52
|
+
| A module that became more coupled (a new import of another package), stateful (new module-level state) or hard to scan. Orchestration mixed with business logic. | a change to one concern touches the others | Split into focused modules. Separate orchestration from business logic. |
|
|
53
|
+
| Independent work run in sequence | an order nothing needs | Run it in parallel, only when the parallel code is also simpler. |
|
|
54
|
+
| Related updates that can leave state half-applied | a failure leaves state no code expects | A more atomic flow. |
|
|
55
|
+
|
|
56
|
+
## Approval bar
|
|
57
|
+
|
|
58
|
+
- A structural regression, a hacky or magic abstraction, a boundary leak, or a missed obvious decomposition blocks whatever the PR says, because no evidence makes the code easier to change.
|
|
59
|
+
- Every other finding blocks, and the verdict is CHANGES, unless the PR gives evidence that the simpler form fails: a caller it breaks, a measured cost, or a constraint outside the diff that the PR names with `path:line` or a link. "It works" and "tests pass" are no such evidence, because this review judges structure, not behavior.
|
|
60
|
+
- State a blocking finding as blocking, directly and without rudeness. A "maybe" or "consider" finding reads as optional and gets skipped.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Cursor
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: thermonuclear-deep-review
|
|
3
|
+
description: Use when asked for a thermonuclear or deep review, or for a security and correctness audit of a branch or PR diff. Covers bugs, breaking changes, security issues, developer-experience regressions and feature-gate leaks.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Thermonuclear Deep Review
|
|
8
|
+
|
|
9
|
+
If this skill disagrees with the code, a command's output or its `--help`, follow those and say which line of this skill is wrong.
|
|
10
|
+
|
|
11
|
+
Make your own scratch with `mktemp -d` and delete only the paths you made, each by its exact
|
|
12
|
+
path. Never delete by a glob in a shared directory: every role of this issue writes into the same
|
|
13
|
+
`$TMPDIR` on the issue's volume, so a sweep like `rm -rf "$TMPDIR"/tmp.*` deletes directories
|
|
14
|
+
another role has open.
|
|
15
|
+
|
|
16
|
+
## Verdict
|
|
17
|
+
|
|
18
|
+
The first line of the report is the verdict, in exactly this form, because a PR gate reads only that line:
|
|
19
|
+
|
|
20
|
+
- `Verdict: CHANGES at <sha>` when the report has a Medium or High finding.
|
|
21
|
+
- `Verdict: APPROVE at <sha>` when it has none. Minor findings do not block.
|
|
22
|
+
|
|
23
|
+
Priority: trace each finding end to end first. Minor changes no behavior, hides no error and breaks no gate; any other finding is Medium, or High when the report holds its trace, because developers who get false High findings stop listening.
|
|
24
|
+
|
|
25
|
+
`<sha>`: `git rev-parse --short=8 HEAD` at the head you reviewed, or the sha your brief names when you have no shell.
|
|
26
|
+
|
|
27
|
+
## Scope
|
|
28
|
+
|
|
29
|
+
Audit the checked-out branch. Report issues in code its diff adds or modifies, in the unchanged consumers check 2 finds, and in the PR body's claims (check 6), because the author fixes only this diff and the diff never shows them.
|
|
30
|
+
|
|
31
|
+
## Checks
|
|
32
|
+
|
|
33
|
+
1. **Breakage.** Trace each change through its callers and contracts, across packages and modules, because breaks show outside the changed lines.
|
|
34
|
+
2. **Consumers.** For each behavior the diff changes, name its consumers and show that each one still works. Behaviors: log level, status code, exception type, metric or field name, payload shape, identity or uniqueness key, timing, retry, default. Tracing callers misses consumers, many outside the diff, the package or the repository:
|
|
35
|
+
- alert and monitor predicates (a monitor on `status:error` stops when a line goes down to WARNING)
|
|
36
|
+
- log-level contracts, structured-log field names, log-derived metric filters
|
|
37
|
+
- status codes and error-type strings in request logs, webhooks and audit records
|
|
38
|
+
- identity or uniqueness keys that a persistence layer arbitrates on
|
|
39
|
+
- dashboards, SLOs, saved queries, downstream parsers
|
|
40
|
+
|
|
41
|
+
If you cannot find a consumer, say so, because an assumed-away consumer breaks silently. A change that removes its own alarm is High, because it also removes the signal that would catch it.
|
|
42
|
+
3. **Developer experience.** Find changes to how developers run or build the code locally, because no test catches them. Examples: where or how the code reads secrets, new or renamed environment variables, remapped ports or networking, a new script that must run for a feature to keep working. Not a break: a new alternative way to run or build, or a new package-manager dependency, unless it needs a step the README or AGENTS.md does not list, such as a manual install from a website or app store.
|
|
43
|
+
4. **Feature leaks.** Trace each feature flag or internal-only check and its callers, because a leak ships a feature to users a gate excludes.
|
|
44
|
+
5. **Intended breakage.** A high-risk effect the PR body names and bounds (who it affects, how to undo it) is not a defect, because the author chose it. Report one it does not, or one that removes a safeguard or feature gate.
|
|
45
|
+
6. **PR body claims.** Attack each safety or correctness claim in the PR body, because the diff does not show whether a claim in prose is true. Attack these first:
|
|
46
|
+
- Order, not coverage: after a pipeline sanitizes, can any later pass create or recreate what the sanitizer neutralized?
|
|
47
|
+
- An input called safe because another program escapes it depends on that program: rate the finding as if it did not.
|
|
48
|
+
|
|
49
|
+
## Security Guidelines
|
|
50
|
+
|
|
51
|
+
For each row whose surface the diff touches, answer with a file:line citation, because an answer without one cannot be checked.
|
|
52
|
+
|
|
53
|
+
| Tag | If the diff touches… | Answer, with file:line |
|
|
54
|
+
| --- | --- | --- |
|
|
55
|
+
| `authz` | an authorization or refusal check, or a new route, command, or tool | who may call it, who may not, where the diff enforces that, and what the unauthorized caller gets |
|
|
56
|
+
| `secret` | a token, grant, secret file, credential helper, or its lifetime | what widened: who can read it, for how long, in which process |
|
|
57
|
+
| `untrusted-input` | a subprocess, argv, path, template, or query built from text an outside party controls (an issue body, a PR comment, a webhook payload, model output) | the boundary that neutralizes it, and whether any later pass can re-create what it neutralized (order, not coverage) |
|
|
58
|
+
| `prompt` | a prompt that embeds untrusted text into an agent's instructions | what delimits the untrusted region, and what the agent may do if it obeys that text (OWASP LLM01 prompt injection, LLM06 excessive agency) |
|
|
59
|
+
| `supply-chain` | a dependency, lockfile, base image, or GitHub Action | the version, the pin (a digest or a SHA checked against its tag), and the permissions the workflow runs with |
|
|
60
|
+
| `sandbox` | a sandbox or pod manifest, a capability, or a network policy | which isolation property changed, and against whom |
|
|
61
|
+
| `agent-def` | an agent definition, skill, role prompt, `.omp/` config, or `AGENTS.md` | whether this diff can steer its own reviewers, and, if so, what a reviewer must check by hand |
|
|
62
|
+
| `transport` | TLS or certificate verification, a signature, an HMAC, a randomness source, or a read or write that untrusted input sizes with no bound | what changed, the check or bound it relies on, and the ASVS identifier it maps to |
|
|
63
|
+
|
|
64
|
+
- Cite an OWASP ASVS v5.0.0 identifier where one applies (`v5.0.0-1.2.5` style), so the author can find it.
|
|
65
|
+
- A security finding with no stated exploit path is hardening, ranked Minor. One that states an exploit path is its own finding at its real priority, so no exploit is filed as optional.
|
|
66
|
+
- Report at most two hardening items, ranked, and put the rest in one paragraph, so they do not bury findings.
|
|
67
|
+
- Start each security finding with its row's tag, `Security[<tag>]:`, so readers can count findings by row.
|
|
68
|
+
- End the report with one `Security:` line, because the Legion reviewer copies it: each touched row's tag and its answer with file:line, or `Security: no sensitive surface in this diff.` when the diff touches none.
|
|
69
|
+
|
|
70
|
+
## Findings
|
|
71
|
+
|
|
72
|
+
- Never report a finding whose open question you can settle by reading code, because the author cannot act on a guess. When you cannot settle it, say what you searched and where.
|
|
73
|
+
|
|
74
|
+
## PR discussion
|
|
75
|
+
|
|
76
|
+
Only after your own audit, so others' findings do not steer it, and only with a Medium or High finding on a branch that has a PR:
|
|
77
|
+
|
|
78
|
+
1. Read the PR/MR's comments and review comments, bots' included, with `gh` or `glab`.
|
|
79
|
+
2. Check their findings in the code: a comment is not evidence. Include the valid ones you missed; for one you share, add their evidence if yours lacks it.
|
|
80
|
+
3. Mark each finding that came from that discussion, so readers can tell it from yours.
|
package/package.json
CHANGED
|
@@ -1 +1,49 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"name": "@sjawhar/claude-envoy",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
|
+
"description": "Claude Code channel plugin for Legion's Envoy bus",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"files": [
|
|
8
|
+
".claude-plugin/**",
|
|
9
|
+
".mcp.json",
|
|
10
|
+
".omp-plugin/**",
|
|
11
|
+
"bin/**",
|
|
12
|
+
"dist/**",
|
|
13
|
+
"hooks/**",
|
|
14
|
+
"legion/**",
|
|
15
|
+
"scripts/**",
|
|
16
|
+
"skills/**",
|
|
17
|
+
"src/**",
|
|
18
|
+
"README.md",
|
|
19
|
+
"AGENTS.md"
|
|
20
|
+
],
|
|
21
|
+
"legion": {
|
|
22
|
+
"daemonApiVersion": 49
|
|
23
|
+
},
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "https://github.com/cybermonklabs/legion"
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"channel": "bun bin/envoy-channel.ts",
|
|
30
|
+
"verify-build": "bash scripts/verify-build.sh",
|
|
31
|
+
"prepack": "bash scripts/pack-skills.sh",
|
|
32
|
+
"postpack": "bash scripts/pack-skills.sh --restore",
|
|
33
|
+
"typecheck": "bunx tsc --noEmit",
|
|
34
|
+
"test": "bun test --timeout=60000",
|
|
35
|
+
"lint": "bunx biome check src/ hooks/ scripts/"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@biomejs/biome": "^2.3.14",
|
|
39
|
+
"@legion/contracts": "0.10.0",
|
|
40
|
+
"@legion/envoy-client": "0.1.0",
|
|
41
|
+
"@legion/pi-shared": "0.1.0",
|
|
42
|
+
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
43
|
+
"bun-types": "latest",
|
|
44
|
+
"ky": "^2.0.2",
|
|
45
|
+
"nats": "^2.29.2",
|
|
46
|
+
"typescript": "^5.3.0",
|
|
47
|
+
"zod": "4.3.6"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Every git pathspec whose files can change the Claude Code plugin's build (dist/ and legion/,
|
|
2
|
+
# built by scripts/build.ts and checked by scripts/verify-build.sh).
|
|
3
|
+
#
|
|
4
|
+
# Format: one git pathspec per line, relative to the repository root. A line that is empty or
|
|
5
|
+
# starts with # is ignored. Nothing else is special: a pathspec line holds the pathspec alone, with
|
|
6
|
+
# no trailing comment.
|
|
7
|
+
#
|
|
8
|
+
# Who reads it:
|
|
9
|
+
# - a person, and release.yaml's $CLAUDE_ENVOY_VERSION_ARGS, which carries this list's package
|
|
10
|
+
# and content paths by hand: the release's version is bumped from the commits since the newest
|
|
11
|
+
# claude-envoy-v* tag that touch them, so a source missing from both is one no release
|
|
12
|
+
# publishes a new version for. A path added or dropped here is owed the same change there.
|
|
13
|
+
# The toolchain entries below (.bun-version, bunfig.toml, bun.lock, the root package.json, the
|
|
14
|
+
# .gitattributes files and the .github paths) are not among them, as no plugin's version
|
|
15
|
+
# arguments carry theirs: a lockfile or runner change alone releases nothing, and the next
|
|
16
|
+
# source commit publishes whatever it built.
|
|
17
|
+
# - tests/build-inputs.test.ts, which runs the build and fails when a file the bundles or the
|
|
18
|
+
# Legion plugin read is not matched: each bundle's sources, the manifest, tsconfig and license
|
|
19
|
+
# files of each workspace package they reach, the lockfile, root manifest and patches that decide
|
|
20
|
+
# what bun install puts in node_modules, and the skills and agents buildLegionPlugin reads. The
|
|
21
|
+
# rest is listed by hand and no test checks it: .bun-version, bunfig.toml, the
|
|
22
|
+
# .gitattributes files, scripts/third-party-notices.ts (and any other module build.ts imports
|
|
23
|
+
# from outside the packages below), scripts/pi-plugin-prepack.sh and the three .github paths at
|
|
24
|
+
# the end. A change that makes build.ts or verify-build.sh read a new file adds it here.
|
|
25
|
+
#
|
|
26
|
+
# The rule: whole package directories are listed and only known non-inputs are excluded, so a file
|
|
27
|
+
# nobody thought of counts as an input. That is the safe direction: a false "changed" costs one
|
|
28
|
+
# extra patch release, while a false "unchanged" leaves npm's newest release behind its inputs
|
|
29
|
+
# with nothing queued to catch it up.
|
|
30
|
+
#
|
|
31
|
+
# This file is inside packages/claude-envoy, listed below, so a change to the list is itself an
|
|
32
|
+
# input change.
|
|
33
|
+
|
|
34
|
+
# build.ts assertPinnedBun refuses any other Bun; .github/actions/setup-bun installs this version.
|
|
35
|
+
.bun-version
|
|
36
|
+
|
|
37
|
+
# bun install: decides node_modules, which the bundles inline and whose licenses the notices carry.
|
|
38
|
+
bun.lock
|
|
39
|
+
package.json
|
|
40
|
+
bunfig.toml
|
|
41
|
+
patches
|
|
42
|
+
|
|
43
|
+
# .gitattributes decides the bytes a checkout holds, which the bundler then reads.
|
|
44
|
+
.gitattributes
|
|
45
|
+
packages/.gitattributes
|
|
46
|
+
|
|
47
|
+
# The bundles' sources and the workspace packages they reach: sources, manifests, tsconfig, license
|
|
48
|
+
# and notice files (scripts/third-party-notices.ts). Also this package's build.ts, verify-build.sh
|
|
49
|
+
# and this list.
|
|
50
|
+
packages/claude-envoy
|
|
51
|
+
packages/envoy-client
|
|
52
|
+
packages/contracts
|
|
53
|
+
packages/pi-shared
|
|
54
|
+
packages/broker-client
|
|
55
|
+
|
|
56
|
+
# The build's outputs themselves, not inputs.
|
|
57
|
+
:(exclude)packages/claude-envoy/dist
|
|
58
|
+
:(exclude)packages/claude-envoy/legion
|
|
59
|
+
|
|
60
|
+
# Known non-inputs inside the packages above: changelogs, guides and tests, which no build reads.
|
|
61
|
+
:(exclude,glob)packages/*/.changes/**
|
|
62
|
+
:(exclude,glob)packages/*/CHANGELOG.md
|
|
63
|
+
:(exclude,glob)packages/*/AGENTS.md
|
|
64
|
+
:(exclude,glob)packages/*/README.md
|
|
65
|
+
:(exclude,glob)packages/*/tests/**
|
|
66
|
+
:(exclude,glob)packages/*/test/**
|
|
67
|
+
:(exclude,glob)packages/**/__tests__/**
|
|
68
|
+
:(exclude,glob)packages/**/*.test.ts
|
|
69
|
+
|
|
70
|
+
# build.ts buildLegionPlugin converts these into legion/agents.
|
|
71
|
+
packages/pi-legion/agents
|
|
72
|
+
|
|
73
|
+
# scripts/pi-plugin-prepack.sh --stage-skills stages pi-legion's skills into legion/skills. All of
|
|
74
|
+
# skills/ rather than pi-legion's share, so the partition is kept in that script alone.
|
|
75
|
+
skills
|
|
76
|
+
|
|
77
|
+
# build.ts runs these: the notices of the inlined packages, and the skill staging.
|
|
78
|
+
scripts/third-party-notices.ts
|
|
79
|
+
scripts/pi-plugin-prepack.sh
|
|
80
|
+
|
|
81
|
+
# The build jobs run these through verify-build.sh, which runs check-built.
|
|
82
|
+
.github/scripts/check-private-names.sh
|
|
83
|
+
.github/scripts/release-push.sh
|
|
84
|
+
.github/actions/setup-bun
|