crysk 0.7.0 → 0.8.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 -23
- package/dist/SKILL-1q3658n0.md +74 -0
- package/dist/SKILL-25j4q9b8.md +143 -0
- package/dist/SKILL-4747bhne.md +143 -0
- package/dist/SKILL-4jc3sv23.md +74 -0
- package/dist/SKILL-c0492rch.md +540 -0
- package/dist/SKILL-d1nzkhhr.md +74 -0
- package/dist/SKILL-f8p7kvx0.md +143 -0
- package/dist/SKILL-gxd45g38.md +553 -0
- package/dist/SKILL-rec41991.md +66 -0
- package/dist/SKILL-zze8zj5g.md +536 -0
- package/dist/cli.js +24658 -24654
- package/dist/index.js +492 -463
- package/dist/opencode-ci-qrcv7a99.md +106 -0
- package/dist/opencode-ci-rdpcc7xc.md +106 -0
- package/dist/opencode-ci-yt0k74t0.md +106 -0
- package/dist/workflow-andv2dvm.yml +158 -0
- package/package.json +1 -1
- package/prompts/default/PROVENANCE.md +1 -0
- package/skills/crysk/SKILL.md +6 -6
- package/skills/crysk-ci-setup/SKILL.md +32 -33
- package/skills/crysk-ci-setup/assets/workflow.yml +5 -10
- package/skills/crysk-ci-setup/references/ci-admission.md +5 -5
- package/skills/crysk-ci-setup/references/opencode-ci.md +6 -6
- package/skills/crysk-loop/SKILL.md +37 -54
- package/skills/crysk-pr/SKILL.md +1 -1
- package/src/asset-manifest.ts +0 -6
- package/src/assets.ts +1 -4
- package/src/brand.ts +20 -30
- package/src/ci/gates.ts +155 -201
- package/src/ci/outcome.ts +4 -31
- package/src/ci/platform-limits.ts +135 -0
- package/src/ci/platform-report.ts +212 -126
- package/src/ci/platform.ts +28 -26
- package/src/ci/reporter.ts +25 -26
- package/src/ci/review-admission.ts +1 -2
- package/src/ci/review-levels.ts +12 -53
- package/src/ci/setup.ts +96 -66
- package/src/ci/trace-bundle.ts +11 -27
- package/src/ci/trace-transcripts.ts +4 -6
- package/src/ci/trigger.ts +3 -5
- package/src/cli.ts +6 -5
- package/src/commands/ci-setup-questions.ts +2 -55
- package/src/commands/ci-setup.ts +2 -26
- package/src/commands/triage.ts +131 -38
- package/src/commands/usage.ts +0 -1
- package/src/compare/compare.ts +3 -3
- package/src/compare/floor-test.ts +30 -201
- package/src/config/config.ts +6 -30
- package/src/diversity/accounting.ts +0 -26
- package/src/diversity/benchmark.ts +1 -17
- package/src/diversity/identity.ts +0 -14
- package/src/diversity/pipeline-integration.ts +0 -29
- package/src/doctor.ts +3 -6
- package/src/execution/claude-session-trace.ts +7 -2
- package/src/execution/contracts.ts +15 -9
- package/src/execution/harness.ts +165 -187
- package/src/execution/spend-limiter.ts +39 -131
- package/src/execution/usage-facts.ts +397 -0
- package/src/execution/usage-normalized.ts +33 -86
- package/src/harness/materiality-judge.ts +0 -5
- package/src/harness/pipeline-plan.ts +0 -3
- package/src/harness/replay-rows.ts +0 -5
- package/src/harness/route-runner.ts +2 -2
- package/src/harness/single-step.ts +3 -9
- package/src/index.ts +1 -1
- package/src/mcp/preflight.ts +2 -2
- package/src/model/catalog.ts +1 -3
- package/src/model/free-discovery.ts +11 -78
- package/src/model/model-name.ts +14 -4
- package/src/model/profiles/claude.ts +1 -2
- package/src/model/profiles/openai.ts +1 -2
- package/src/model/profiles.ts +1 -2
- package/src/model/provider-capabilities.ts +16 -55
- package/src/model/routing.ts +39 -36
- package/src/pr/admission.ts +6 -6
- package/src/pr/answered-findings.ts +8 -4
- package/src/pr/ci-publish.ts +0 -2
- package/src/pr/discovery.ts +4 -25
- package/src/pr/plan.ts +40 -121
- package/src/pr/pr-status.ts +14 -2
- package/src/pr/preflight.ts +15 -12
- package/src/pr/publish-outcome.ts +1 -19
- package/src/pr/review-pr.ts +10 -47
- package/src/pr/target.ts +76 -82
- package/src/production-runtime.ts +52 -114
- package/src/progress.ts +0 -54
- package/src/rereview/prepare.ts +4 -1
- package/src/rereview/state.ts +1 -1
- package/src/review/boundary.ts +4 -8
- package/src/review/drafts.ts +3 -3
- package/src/review/findings-conformance.ts +1 -1
- package/src/review/findings.ts +0 -4
- package/src/review/pipeline.ts +57 -395
- package/src/review/preflight.ts +162 -201
- package/src/review/prompt-set.ts +0 -2
- package/src/review/report.ts +2 -162
- package/src/review/review.ts +16 -65
- package/src/review/route-preflight.ts +3 -35
- package/src/review/run.ts +37 -73
- package/src/review/size-gate.ts +3 -3
- package/src/review/spec.ts +6 -11
- package/src/review/step-runner.ts +4 -4
- package/src/runner-authority.ts +10 -9
- package/src/security/credential-broker.ts +5 -6
- package/src/server/preflight.ts +0 -1
- package/src/server/server.ts +17 -6
- package/src/store/activity.ts +1 -2
- package/src/store/backfill-preflight.ts +0 -3
- package/src/store/backfill.ts +0 -1
- package/src/store/metrics-preflight.ts +4 -14
- package/src/store/metrics.ts +5 -5
- package/src/store/preflight.ts +0 -13
- package/src/store/store.ts +11 -12
- package/src/transport-registry.ts +6 -30
- package/src/transports/claude-code-cli.ts +149 -215
- package/src/transports/opencode-client.ts +4 -24
- package/src/transports/opencode-sdk.ts +17 -112
- package/src/triage/plain-reply.ts +37 -0
- package/src/ui/activity.ts +1 -6
- package/src/ui/config-edit.ts +14 -67
- package/src/ui/config.ts +3 -8
- package/src/ui/plan.ts +11 -198
- package/src/ui/progress.ts +3 -49
- package/src/ui/result.ts +18 -77
- package/src/ui/review-menu.ts +3 -12
- package/src/ui/select.ts +9 -79
- package/src/updater.ts +1 -1
- package/src/usage.ts +1 -7
- package/prompts/default/deep-review-parity.md +0 -152
- package/prompts/scout.md +0 -140
- package/src/ci/platform-estimate.ts +0 -111
- package/src/review/scout.ts +0 -323
package/src/rereview/prepare.ts
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
parseAdjudicationMarker,
|
|
14
14
|
trustedAdjudicator,
|
|
15
15
|
} from "#triage/adjudication";
|
|
16
|
+
import { withPlainAppliedReplies } from "#triage/plain-reply";
|
|
16
17
|
import { parseTriageMarker } from "#triage/triage";
|
|
17
18
|
import {
|
|
18
19
|
classifyPrior,
|
|
@@ -985,10 +986,12 @@ export function enrichPriorsFromThreads(input: {
|
|
|
985
986
|
platformActor?: string;
|
|
986
987
|
}): PriorRecord[] {
|
|
987
988
|
const bound = bindPriorsToPosted(input.priors, input.posted);
|
|
989
|
+
// triage-without-skill S1: a plain `applied` reply is the triage it implies (triage/plain-reply.ts).
|
|
990
|
+
const replies = withPlainAppliedReplies(input.replies);
|
|
988
991
|
return input.priors.map((prior) => {
|
|
989
992
|
const parent = bound.get(prior.id);
|
|
990
993
|
if (parent === undefined) return prior;
|
|
991
|
-
const thread =
|
|
994
|
+
const thread = replies.filter(
|
|
992
995
|
(reply) => reply.in_reply_to_id === parent.id,
|
|
993
996
|
);
|
|
994
997
|
let triage: PriorTriage | null = prior.triage;
|
package/src/rereview/state.ts
CHANGED
|
@@ -511,7 +511,7 @@ export function assembleLive(input: {
|
|
|
511
511
|
// matching is a 5-line window, so a different issue can sit there, and the
|
|
512
512
|
// gate fails closed.
|
|
513
513
|
// A real fix leaves the count when the re-review VERIFIES it gone, and
|
|
514
|
-
// `/
|
|
514
|
+
// `/crysk override` covers a team that accepts the finding.
|
|
515
515
|
// A self-asserted triage tag never leaves the count (S7). `misclassified`
|
|
516
516
|
// lands as `re-tiered` (classifyPrior), and its tier is the author's claim,
|
|
517
517
|
// not the pipeline's, so it is not evidence. A dismissal the adjudicator upheld
|
package/src/review/boundary.ts
CHANGED
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
// untrusted block cannot be wrapped under an invented tag name.
|
|
23
23
|
export type BoundaryTag =
|
|
24
24
|
| "patch"
|
|
25
|
-
| "scout_leads"
|
|
26
25
|
| "finding"
|
|
27
26
|
| "findings"
|
|
28
27
|
| "gotchas"
|
|
@@ -82,16 +81,13 @@ export function selectBoundaryNonce(
|
|
|
82
81
|
);
|
|
83
82
|
}
|
|
84
83
|
|
|
85
|
-
// EMPTY CONTENT RENDERS TO THE EMPTY STRING, never to an empty tag pair
|
|
86
|
-
//
|
|
87
|
-
//
|
|
88
|
-
// (`review/scout.ts`'s note on M6), and an empty priors list must likewise leave no
|
|
89
|
-
// trace in a system prompt. A `<scout_leads nonce></scout_leads nonce>` pair
|
|
90
|
-
// would break both.
|
|
84
|
+
// EMPTY CONTENT RENDERS TO THE EMPTY STRING, never to an empty tag pair: an
|
|
85
|
+
// empty priors list must leave no trace in a system prompt, and a
|
|
86
|
+
// `<priors nonce></priors nonce>` pair would be one.
|
|
91
87
|
//
|
|
92
88
|
// Throwing on a forged nonce is the last line of defence, not the first: every
|
|
93
89
|
// block whose content can arrive after the nonce was committed is guarded by
|
|
94
|
-
// the driver before it reaches here (see `
|
|
90
|
+
// the driver before it reaches here (see `runRefuter`), because
|
|
95
91
|
// a throw at prompt-composition time would kill a paid run. A throw that does
|
|
96
92
|
// escape means a block reached composition unguarded — which is a defect to
|
|
97
93
|
// see, not one to paper over by shipping a forgeable boundary.
|
package/src/review/drafts.ts
CHANGED
|
@@ -41,11 +41,11 @@ export interface HunterDraft {
|
|
|
41
41
|
// not invent a failure, and must not invent a pass by stamping a 0 it did
|
|
42
42
|
// not see. OpenCode stamps the count (including 0). Claude Code derives it from
|
|
43
43
|
// the CLI result's `num_turns` (#299) and omits it when that is not a valid
|
|
44
|
-
// integer.
|
|
44
|
+
// integer.
|
|
45
45
|
//
|
|
46
46
|
// Only a parsed `{ findings: [...] }` can trip it. The refuter and verifier
|
|
47
|
-
// emit `results
|
|
48
|
-
//
|
|
47
|
+
// emit `results` and the summarizer `prose`/`score`; none has a `findings`
|
|
48
|
+
// array, so none of them is reached.
|
|
49
49
|
export function isVacuousHunt(input: {
|
|
50
50
|
readonly tools: readonly string[];
|
|
51
51
|
readonly toolInvocations: number | undefined;
|
|
@@ -21,7 +21,7 @@ const FINDING_V11_BAD_HUNTER =
|
|
|
21
21
|
'{"id":"F001","category":1,"path":"src/a.ts","line":1,"severity":"BLOCKER","evidence_class":"deterministic","refuter_verdict":"not_submitted","causal_disposition":"introduced","claim":"x","proof_refs":[],"hunter":"Security","tier":"blocking","hops_used":0,"hop_trail":[],"dedupe_key":"k"}';
|
|
22
22
|
|
|
23
23
|
const TELEMETRY =
|
|
24
|
-
'{"index_ms":1,"index_mode":"fresh","index_disk_mb":1,"wall_ms":1,"tokens_in":1,"tokens_out":1,"tokens_total":2
|
|
24
|
+
'{"index_ms":1,"index_mode":"fresh","index_disk_mb":1,"wall_ms":1,"tokens_in":1,"tokens_out":1,"tokens_total":2}';
|
|
25
25
|
|
|
26
26
|
function envelope(
|
|
27
27
|
schemaVersion: string,
|
package/src/review/findings.ts
CHANGED
|
@@ -112,10 +112,6 @@ export interface Telemetry {
|
|
|
112
112
|
tokens_in: number;
|
|
113
113
|
tokens_out: number;
|
|
114
114
|
tokens_total: number;
|
|
115
|
-
cost_usd_est: number;
|
|
116
|
-
// True when at least one spend reservation ended unresolved_remote — the
|
|
117
|
-
// reported cost is a floor of known spend, not a closed total.
|
|
118
|
-
cost_usd_est_is_floor?: boolean;
|
|
119
115
|
// Engine v2 populates this per step (it runs one session per agent). The
|
|
120
116
|
// original best-effort caveat (reconciliation R3) still applies to v1
|
|
121
117
|
// documents: absence must never fail validation.
|