opencode-swarm 7.13.0 → 7.13.2
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/dist/cli/index.js +2 -6
- package/dist/config/evidence-schema.d.ts +13 -13
- package/dist/config/schema.d.ts +4 -4
- package/dist/index.js +151 -108
- package/dist/tools/convene-council.d.ts +3 -3
- package/dist/tools/submit-phase-council-verdicts.d.ts +3 -3
- package/package.json +1 -1
- package/dist/__tests__/acknowledge-spec-drift.test.d.ts +0 -1
- package/dist/__tests__/cli-version.adversarial.test.d.ts +0 -1
- package/dist/__tests__/cli-version.test.d.ts +0 -1
- package/dist/__tests__/conflict-resolution.test.d.ts +0 -1
- package/dist/__tests__/convene-general-council.test.d.ts +0 -12
- package/dist/__tests__/critic_drift_verifier-whitelist.test.d.ts +0 -1
- package/dist/__tests__/critic_hallucination_verifier-whitelist.test.d.ts +0 -1
- package/dist/__tests__/disagreement-detector.test.d.ts +0 -7
- package/dist/__tests__/evidence-lock.adversarial.test.d.ts +0 -8
- package/dist/__tests__/evidence-lock.test.d.ts +0 -6
- package/dist/__tests__/gate-evidence.adversarial.test.d.ts +0 -7
- package/dist/__tests__/general-council-service.test.d.ts +0 -7
- package/dist/__tests__/lint-spec.test.d.ts +0 -1
- package/dist/__tests__/preflight-phase.test.d.ts +0 -1
- package/dist/__tests__/qa-gate-hardening.test.d.ts +0 -12
- package/dist/__tests__/req-coverage.test.d.ts +0 -1
- package/dist/__tests__/security-adversarial.test.d.ts +0 -1
- package/dist/__tests__/sounding-board-parser.test.d.ts +0 -1
- package/dist/__tests__/spec-hash.test.d.ts +0 -1
- package/dist/__tests__/spec-schema.test.d.ts +0 -1
- package/dist/__tests__/web-search-provider.test.d.ts +0 -6
- package/dist/__tests__/write-drift-evidence-requirement-coverage.test.d.ts +0 -4
- package/dist/adversarial-tests.test.d.ts +0 -1
- package/dist/agents/architect-permission.adversarial.test.d.ts +0 -5
- package/dist/agents/architect.commands-list.adversarial.test.d.ts +0 -1
- package/dist/agents/architect.commands-list.test.d.ts +0 -1
- package/dist/agents/architect.dark-matter.test.d.ts +0 -1
- package/dist/agents/architect.designer-gate.test.d.ts +0 -1
- package/dist/agents/architect.skip-aliases.test.d.ts +0 -1
- package/dist/agents/coder.test.d.ts +0 -1
- package/dist/agents/council-prompts.test.d.ts +0 -9
- package/dist/agents/council-registration.test.d.ts +0 -23
- package/dist/agents/explorer-consumer-contract.test.d.ts +0 -1
- package/dist/agents/explorer-role-boundary.test.d.ts +0 -1
- package/dist/agents/prompt-namespace.test.d.ts +0 -1
- package/dist/agents/reviewer.test.d.ts +0 -1
- package/dist/agents/test-engineer.adversarial.test.d.ts +0 -5
- package/dist/agents/test-engineer.security.test.d.ts +0 -1
- package/dist/background/trigger.vulnerability.test.d.ts +0 -1
- package/dist/commands/archive.error-handling.test.d.ts +0 -9
- package/dist/commands/benchmark.error-handling.test.d.ts +0 -7
- package/dist/commands/brainstorm.test.d.ts +0 -1
- package/dist/commands/clashes-with-native-cc.test.d.ts +0 -10
- package/dist/commands/command-adapters.security.test.d.ts +0 -14
- package/dist/commands/command-names.test.d.ts +0 -1
- package/dist/commands/commands.test.d.ts +0 -1
- package/dist/commands/conflict-registry.structural.test.d.ts +0 -1
- package/dist/commands/conflict-registry.test.d.ts +0 -5
- package/dist/commands/council.test.d.ts +0 -4
- package/dist/commands/curate.test.d.ts +0 -1
- package/dist/commands/dark-matter.error-handling.test.d.ts +0 -1
- package/dist/commands/first-run.test.d.ts +0 -11
- package/dist/commands/full-auto-config-guard.test.d.ts +0 -7
- package/dist/commands/full-auto-discoverability.test.d.ts +0 -8
- package/dist/commands/full-auto-registration.test.d.ts +0 -5
- package/dist/commands/full-auto-sessionid.test.d.ts +0 -5
- package/dist/commands/full-auto.regression.test.d.ts +0 -10
- package/dist/commands/full-auto.test.d.ts +0 -6
- package/dist/commands/handoff.error-handling.adversarial.test.d.ts +0 -1
- package/dist/commands/handoff.error-handling.test.d.ts +0 -1
- package/dist/commands/index.help-text.test.d.ts +0 -1
- package/dist/commands/index.not-found.adversarial.test.d.ts +0 -12
- package/dist/commands/index.not-found.test.d.ts +0 -11
- package/dist/commands/qa-gates.test.d.ts +0 -1
- package/dist/commands/registration-parity.test.d.ts +0 -1
- package/dist/commands/registry-documentation.test.d.ts +0 -1
- package/dist/commands/registry-type.test.d.ts +0 -1
- package/dist/commands/registry.find-similar.adversarial.test.d.ts +0 -1
- package/dist/commands/registry.find-similar.test.d.ts +0 -1
- package/dist/commands/registry.test.d.ts +0 -1
- package/dist/commands/shortcut-routing.test.d.ts +0 -11
- package/dist/commands/simulate.report-write.adversarial.test.d.ts +0 -1
- package/dist/commands/simulate.report-write.test.d.ts +0 -1
- package/dist/commands/turbo-registration.test.d.ts +0 -5
- package/dist/commands/turbo-sessionid.test.d.ts +0 -5
- package/dist/commands/turbo.regression.test.d.ts +0 -11
- package/dist/commands/turbo.test.d.ts +0 -5
- package/dist/config/constants.architect-whitelist.test.d.ts +0 -1
- package/dist/config/constants.security.test.d.ts +0 -1
- package/dist/council/__tests__/council-evidence-writer.adversarial.test.d.ts +0 -6
- package/dist/db/global-db.test.d.ts +0 -7
- package/dist/db/project-db.test.d.ts +0 -4
- package/dist/db/qa-gate-profile.test.d.ts +0 -4
- package/dist/diff/__tests__/semantic-classifier.test.d.ts +0 -1
- package/dist/diff/__tests__/summary-generator.test.d.ts +0 -1
- package/dist/gate-evidence.test.d.ts +0 -1
- package/dist/hooks/__tests__/repo-graph-builder.test.d.ts +0 -12
- package/dist/hooks/__tests__/semantic-diff-injection.test.d.ts +0 -1
- package/dist/hooks/agent-activity.test.d.ts +0 -1
- package/dist/hooks/cc-command-intercept.test.d.ts +0 -1
- package/dist/hooks/curator-drift-advisory.test.d.ts +0 -1
- package/dist/hooks/delegation-gate.evidence.test.d.ts +0 -4
- package/dist/hooks/delegation-gate.getEvidenceTaskId.test.d.ts +0 -20
- package/dist/hooks/delegation-gate.plan-fallback-security.test.d.ts +0 -13
- package/dist/hooks/delegation-gate.plan-fallback.test.d.ts +0 -5
- package/dist/hooks/delegation-gate.seed-state.test.d.ts +0 -1
- package/dist/hooks/delegation-gate.turbo-evidence.test.d.ts +0 -8
- package/dist/hooks/delegation-gate.verify.test.d.ts +0 -11
- package/dist/hooks/delegation-ledger.test.d.ts +0 -11
- package/dist/hooks/diff-scope.test.d.ts +0 -1
- package/dist/hooks/incremental-verify.test.d.ts +0 -1
- package/dist/hooks/loop-detector.test.d.ts +0 -1
- package/dist/hooks/scope-guard-throw-behavior.test.d.ts +0 -15
- package/dist/hooks/scope-guard.adversarial.test.d.ts +0 -1
- package/dist/hooks/scope-guard.test.d.ts +0 -14
- package/dist/hooks/self-review.test.d.ts +0 -14
- package/dist/hooks/slop-detector.adversarial.test.d.ts +0 -1
- package/dist/hooks/slop-detector.test.d.ts +0 -1
- package/dist/hooks/spawn-helper.test.d.ts +0 -1
- package/dist/hooks/watchdog.integration.test.d.ts +0 -9
- package/dist/index.adversarial-bootstrap.test.d.ts +0 -1
- package/dist/index.bootstrap-adversarial.test.d.ts +0 -1
- package/dist/index.bootstrap-directory.test.d.ts +0 -1
- package/dist/model-fallback.adversarial.test.d.ts +0 -22
- package/dist/model-fallback.test.d.ts +0 -12
- package/dist/mutation/__tests__/engine.adversarial.test.d.ts +0 -1
- package/dist/mutation/__tests__/engine.test.d.ts +0 -1
- package/dist/mutation/__tests__/equivalence.adversarial.test.d.ts +0 -1
- package/dist/mutation/__tests__/equivalence.test.d.ts +0 -1
- package/dist/mutation/__tests__/gate.adversarial.test.d.ts +0 -1
- package/dist/mutation/__tests__/gate.test.d.ts +0 -1
- package/dist/mutation/__tests__/generator.test.d.ts +0 -1
- package/dist/parallel/dispatcher/noop-dispatcher.test.d.ts +0 -10
- package/dist/plan/checkpoint.test.d.ts +0 -1
- package/dist/plan/ledger-integrity.test.d.ts +0 -5
- package/dist/plan/ledger-snapshot-adversarial.test.d.ts +0 -1
- package/dist/plan/ledger.test.d.ts +0 -1
- package/dist/plan/manager.cas-backoff.test.d.ts +0 -10
- package/dist/plan/manager.ledger-aware.test.d.ts +0 -1
- package/dist/plan/manager.loadplan-validation-guard.test.d.ts +0 -13
- package/dist/plan/manager.update-task-status.test.d.ts +0 -1
- package/dist/plan/migration-revert.regression.test.d.ts +0 -8
- package/dist/prm/__tests__/course-correction.test.d.ts +0 -1
- package/dist/prm/__tests__/escalation-queue-drain.test.d.ts +0 -1
- package/dist/prm/__tests__/escalation.test.d.ts +0 -1
- package/dist/prm/__tests__/index.test.d.ts +0 -1
- package/dist/prm/__tests__/integration.test.d.ts +0 -1
- package/dist/prm/__tests__/pattern-detector.test.d.ts +0 -5
- package/dist/prm/__tests__/replay.test.d.ts +0 -1
- package/dist/prm/__tests__/trajectory-store.test.d.ts +0 -7
- package/dist/sast/semgrep.test.d.ts +0 -1
- package/dist/scope/scope-persistence.test.d.ts +0 -13
- package/dist/services/compaction-service.test.d.ts +0 -1
- package/dist/services/config-doctor.security.test.d.ts +0 -1
- package/dist/services/config-doctor.test.d.ts +0 -1
- package/dist/services/status-service.turbo-indicator.test.d.ts +0 -5
- package/dist/services/tool-doctor.test.d.ts +0 -1
- package/dist/state.agent-run-context.test.d.ts +0 -10
- package/dist/state.rehydrate.test.d.ts +0 -1
- package/dist/state.rehydration-adversarial.test.d.ts +0 -1
- package/dist/state.rehydration-integration.test.d.ts +0 -1
- package/dist/state.session-restart.test.d.ts +0 -7
- package/dist/state.telemetry.test.d.ts +0 -1
- package/dist/telemetry.test.d.ts +0 -1
- package/dist/test-impact/__tests__/analyzer-import-fix.adversarial.test.d.ts +0 -1
- package/dist/test-impact/__tests__/analyzer-import-fix.test.d.ts +0 -1
- package/dist/test-impact/__tests__/analyzer.adversarial.test.d.ts +0 -1
- package/dist/test-impact/__tests__/analyzer.test.d.ts +0 -1
- package/dist/test-impact/__tests__/council-fixes.test.d.ts +0 -1
- package/dist/test-impact/__tests__/failure-classifier.adversarial.test.d.ts +0 -1
- package/dist/test-impact/__tests__/failure-classifier.test.d.ts +0 -1
- package/dist/test-impact/__tests__/flaky-detector.adversarial.test.d.ts +0 -1
- package/dist/test-impact/__tests__/flaky-detector.test.d.ts +0 -1
- package/dist/test-impact/__tests__/history-store.adversarial.test.d.ts +0 -1
- package/dist/test-impact/__tests__/history-store.test.d.ts +0 -1
- package/dist/test-impact/__tests__/test-impact.adversarial.test.d.ts +0 -1
- package/dist/test-impact/__tests__/test-impact.test.d.ts +0 -1
- package/dist/tools/__tests__/barrel-exports.test.d.ts +0 -1
- package/dist/tools/__tests__/diff-ast-fallback.test.d.ts +0 -1
- package/dist/tools/__tests__/diff-markdown-summary.test.d.ts +0 -1
- package/dist/tools/__tests__/diff-semantic.test.d.ts +0 -1
- package/dist/tools/__tests__/diff-summary.adversarial.test.d.ts +0 -1
- package/dist/tools/__tests__/diff-summary.test.d.ts +0 -1
- package/dist/tools/__tests__/mutation-test.adversarial.test.d.ts +0 -1
- package/dist/tools/__tests__/mutation-test.sourcefiles.test.d.ts +0 -1
- package/dist/tools/__tests__/mutation-test.test.d.ts +0 -1
- package/dist/tools/__tests__/repo-graph-walk.test.d.ts +0 -16
- package/dist/tools/__tests__/test-runner-history.test.d.ts +0 -1
- package/dist/tools/__tests__/test-runner-impact.adversarial.test.d.ts +0 -1
- package/dist/tools/__tests__/test-runner-impact.test.d.ts +0 -1
- package/dist/tools/__tests__/test-runner-source-files.test.d.ts +0 -1
- package/dist/tools/barrel-export-check-gate-status.test.d.ts +0 -6
- package/dist/tools/batch-symbols.test.d.ts +0 -1
- package/dist/tools/check-gate-status.adversarial.test.d.ts +0 -1
- package/dist/tools/check-gate-status.gates.test.d.ts +0 -1
- package/dist/tools/check-gate-status.plugin-registration.test.d.ts +0 -1
- package/dist/tools/curator-analyze.test.d.ts +0 -1
- package/dist/tools/knowledge-tools.integration.test.d.ts +0 -1
- package/dist/tools/mutation-test.security.test.d.ts +0 -1
- package/dist/tools/plugin-registration-adversarial.test.d.ts +0 -1
- package/dist/tools/resolve-working-directory.test.d.ts +0 -1
- package/dist/tools/save-plan.subdirectory-rejection.test.d.ts +0 -1
- package/dist/tools/search.adversarial.test.d.ts +0 -1
- package/dist/tools/search.test.d.ts +0 -1
- package/dist/tools/suggest-patch.adversarial.test.d.ts +0 -1
- package/dist/tools/suggest-patch.test.d.ts +0 -1
- package/dist/tools/test-runner.security-adversarial.test.d.ts +0 -5
- package/dist/tools/update-task-status.adversarial.test.d.ts +0 -13
- package/dist/tools/update-task-status.gates.test.d.ts +0 -1
- package/dist/tools/update-task-status.test.d.ts +0 -1
- package/dist/tools/update-task-status.turbo-bypass.test.d.ts +0 -1
- package/dist/tools/verify-six-tools-registration.test.d.ts +0 -9
- package/dist/tools/write-mutation-evidence.test.d.ts +0 -1
- package/dist/transient-retry.test.d.ts +0 -10
- package/dist/utils/__tests__/bun-compat.test.d.ts +0 -11
- package/dist/utils/__tests__/timeout.test.d.ts +0 -12
package/dist/cli/index.js
CHANGED
|
@@ -34,7 +34,7 @@ var package_default;
|
|
|
34
34
|
var init_package = __esm(() => {
|
|
35
35
|
package_default = {
|
|
36
36
|
name: "opencode-swarm",
|
|
37
|
-
version: "7.13.
|
|
37
|
+
version: "7.13.2",
|
|
38
38
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
39
39
|
main: "dist/index.js",
|
|
40
40
|
types: "dist/index.d.ts",
|
|
@@ -49482,11 +49482,7 @@ function writeProjectConfigIfMissing(cwd) {
|
|
|
49482
49482
|
return;
|
|
49483
49483
|
}
|
|
49484
49484
|
ensureDir(opencodeDir);
|
|
49485
|
-
|
|
49486
|
-
agents: { ...DEFAULT_AGENT_CONFIGS },
|
|
49487
|
-
default_agent: "architect"
|
|
49488
|
-
};
|
|
49489
|
-
saveJson(projectConfigPath, starterConfig);
|
|
49485
|
+
saveJson(projectConfigPath, { agents: {} });
|
|
49490
49486
|
console.log("\u2713 Created project config at:", projectConfigPath);
|
|
49491
49487
|
} catch (error93) {
|
|
49492
49488
|
console.warn("\u26A0 Could not create project config \u2014 installation will continue:");
|
|
@@ -71,8 +71,8 @@ export declare const ReviewEvidenceSchema: z.ZodObject<{
|
|
|
71
71
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
72
72
|
type: z.ZodLiteral<"review">;
|
|
73
73
|
risk: z.ZodEnum<{
|
|
74
|
-
medium: "medium";
|
|
75
74
|
low: "low";
|
|
75
|
+
medium: "medium";
|
|
76
76
|
high: "high";
|
|
77
77
|
critical: "critical";
|
|
78
78
|
}>;
|
|
@@ -292,8 +292,8 @@ export type PlaceholderEvidence = z.infer<typeof PlaceholderEvidenceSchema>;
|
|
|
292
292
|
export declare const SastFindingSchema: z.ZodObject<{
|
|
293
293
|
rule_id: z.ZodString;
|
|
294
294
|
severity: z.ZodEnum<{
|
|
295
|
-
medium: "medium";
|
|
296
295
|
low: "low";
|
|
296
|
+
medium: "medium";
|
|
297
297
|
high: "high";
|
|
298
298
|
critical: "critical";
|
|
299
299
|
}>;
|
|
@@ -322,8 +322,8 @@ export declare const SastEvidenceSchema: z.ZodObject<{
|
|
|
322
322
|
findings: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
323
323
|
rule_id: z.ZodString;
|
|
324
324
|
severity: z.ZodEnum<{
|
|
325
|
-
medium: "medium";
|
|
326
325
|
low: "low";
|
|
326
|
+
medium: "medium";
|
|
327
327
|
high: "high";
|
|
328
328
|
critical: "critical";
|
|
329
329
|
}>;
|
|
@@ -350,8 +350,8 @@ export declare const SastEvidenceSchema: z.ZodObject<{
|
|
|
350
350
|
new_findings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
351
351
|
rule_id: z.ZodString;
|
|
352
352
|
severity: z.ZodEnum<{
|
|
353
|
-
medium: "medium";
|
|
354
353
|
low: "low";
|
|
354
|
+
medium: "medium";
|
|
355
355
|
high: "high";
|
|
356
356
|
critical: "critical";
|
|
357
357
|
}>;
|
|
@@ -366,8 +366,8 @@ export declare const SastEvidenceSchema: z.ZodObject<{
|
|
|
366
366
|
pre_existing_findings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
367
367
|
rule_id: z.ZodString;
|
|
368
368
|
severity: z.ZodEnum<{
|
|
369
|
-
medium: "medium";
|
|
370
369
|
low: "low";
|
|
370
|
+
medium: "medium";
|
|
371
371
|
high: "high";
|
|
372
372
|
critical: "critical";
|
|
373
373
|
}>;
|
|
@@ -527,8 +527,8 @@ export declare const EvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
527
527
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
528
528
|
type: z.ZodLiteral<"review">;
|
|
529
529
|
risk: z.ZodEnum<{
|
|
530
|
-
medium: "medium";
|
|
531
530
|
low: "low";
|
|
531
|
+
medium: "medium";
|
|
532
532
|
high: "high";
|
|
533
533
|
critical: "critical";
|
|
534
534
|
}>;
|
|
@@ -746,8 +746,8 @@ export declare const EvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
746
746
|
findings: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
747
747
|
rule_id: z.ZodString;
|
|
748
748
|
severity: z.ZodEnum<{
|
|
749
|
-
medium: "medium";
|
|
750
749
|
low: "low";
|
|
750
|
+
medium: "medium";
|
|
751
751
|
high: "high";
|
|
752
752
|
critical: "critical";
|
|
753
753
|
}>;
|
|
@@ -774,8 +774,8 @@ export declare const EvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
774
774
|
new_findings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
775
775
|
rule_id: z.ZodString;
|
|
776
776
|
severity: z.ZodEnum<{
|
|
777
|
-
medium: "medium";
|
|
778
777
|
low: "low";
|
|
778
|
+
medium: "medium";
|
|
779
779
|
high: "high";
|
|
780
780
|
critical: "critical";
|
|
781
781
|
}>;
|
|
@@ -790,8 +790,8 @@ export declare const EvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
790
790
|
pre_existing_findings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
791
791
|
rule_id: z.ZodString;
|
|
792
792
|
severity: z.ZodEnum<{
|
|
793
|
-
medium: "medium";
|
|
794
793
|
low: "low";
|
|
794
|
+
medium: "medium";
|
|
795
795
|
high: "high";
|
|
796
796
|
critical: "critical";
|
|
797
797
|
}>;
|
|
@@ -946,8 +946,8 @@ export declare const EvidenceBundleSchema: z.ZodObject<{
|
|
|
946
946
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
947
947
|
type: z.ZodLiteral<"review">;
|
|
948
948
|
risk: z.ZodEnum<{
|
|
949
|
-
medium: "medium";
|
|
950
949
|
low: "low";
|
|
950
|
+
medium: "medium";
|
|
951
951
|
high: "high";
|
|
952
952
|
critical: "critical";
|
|
953
953
|
}>;
|
|
@@ -1165,8 +1165,8 @@ export declare const EvidenceBundleSchema: z.ZodObject<{
|
|
|
1165
1165
|
findings: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1166
1166
|
rule_id: z.ZodString;
|
|
1167
1167
|
severity: z.ZodEnum<{
|
|
1168
|
-
medium: "medium";
|
|
1169
1168
|
low: "low";
|
|
1169
|
+
medium: "medium";
|
|
1170
1170
|
high: "high";
|
|
1171
1171
|
critical: "critical";
|
|
1172
1172
|
}>;
|
|
@@ -1193,8 +1193,8 @@ export declare const EvidenceBundleSchema: z.ZodObject<{
|
|
|
1193
1193
|
new_findings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1194
1194
|
rule_id: z.ZodString;
|
|
1195
1195
|
severity: z.ZodEnum<{
|
|
1196
|
-
medium: "medium";
|
|
1197
1196
|
low: "low";
|
|
1197
|
+
medium: "medium";
|
|
1198
1198
|
high: "high";
|
|
1199
1199
|
critical: "critical";
|
|
1200
1200
|
}>;
|
|
@@ -1209,8 +1209,8 @@ export declare const EvidenceBundleSchema: z.ZodObject<{
|
|
|
1209
1209
|
pre_existing_findings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1210
1210
|
rule_id: z.ZodString;
|
|
1211
1211
|
severity: z.ZodEnum<{
|
|
1212
|
-
medium: "medium";
|
|
1213
1212
|
low: "low";
|
|
1213
|
+
medium: "medium";
|
|
1214
1214
|
high: "high";
|
|
1215
1215
|
critical: "critical";
|
|
1216
1216
|
}>;
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -257,8 +257,8 @@ export declare const PhaseCompleteConfigSchema: z.ZodObject<{
|
|
|
257
257
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
258
258
|
required_agents: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
259
259
|
reviewer: "reviewer";
|
|
260
|
-
coder: "coder";
|
|
261
260
|
test_engineer: "test_engineer";
|
|
261
|
+
coder: "coder";
|
|
262
262
|
}>>>;
|
|
263
263
|
require_docs: z.ZodDefault<z.ZodBoolean>;
|
|
264
264
|
policy: z.ZodDefault<z.ZodEnum<{
|
|
@@ -287,9 +287,9 @@ export type ReviewPassesConfig = z.infer<typeof ReviewPassesConfigSchema>;
|
|
|
287
287
|
export declare const AdversarialDetectionConfigSchema: z.ZodObject<{
|
|
288
288
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
289
289
|
policy: z.ZodDefault<z.ZodEnum<{
|
|
290
|
-
warn: "warn";
|
|
291
290
|
gate: "gate";
|
|
292
291
|
ignore: "ignore";
|
|
292
|
+
warn: "warn";
|
|
293
293
|
}>>;
|
|
294
294
|
pairs: z.ZodDefault<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>>>;
|
|
295
295
|
}, z.core.$strip>;
|
|
@@ -762,8 +762,8 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
762
762
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
763
763
|
required_agents: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
764
764
|
reviewer: "reviewer";
|
|
765
|
-
coder: "coder";
|
|
766
765
|
test_engineer: "test_engineer";
|
|
766
|
+
coder: "coder";
|
|
767
767
|
}>>>;
|
|
768
768
|
require_docs: z.ZodDefault<z.ZodBoolean>;
|
|
769
769
|
policy: z.ZodDefault<z.ZodEnum<{
|
|
@@ -949,9 +949,9 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
949
949
|
adversarial_detection: z.ZodOptional<z.ZodObject<{
|
|
950
950
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
951
951
|
policy: z.ZodDefault<z.ZodEnum<{
|
|
952
|
-
warn: "warn";
|
|
953
952
|
gate: "gate";
|
|
954
953
|
ignore: "ignore";
|
|
954
|
+
warn: "warn";
|
|
955
955
|
}>>;
|
|
956
956
|
pairs: z.ZodDefault<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>>>;
|
|
957
957
|
}, z.core.$strip>>;
|
package/dist/index.js
CHANGED
|
@@ -33,7 +33,7 @@ var package_default;
|
|
|
33
33
|
var init_package = __esm(() => {
|
|
34
34
|
package_default = {
|
|
35
35
|
name: "opencode-swarm",
|
|
36
|
-
version: "7.13.
|
|
36
|
+
version: "7.13.2",
|
|
37
37
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
38
38
|
main: "dist/index.js",
|
|
39
39
|
types: "dist/index.d.ts",
|
|
@@ -67021,7 +67021,14 @@ __export(exports_doc_scan, {
|
|
|
67021
67021
|
});
|
|
67022
67022
|
import * as crypto7 from "node:crypto";
|
|
67023
67023
|
import * as fs47 from "node:fs";
|
|
67024
|
-
import {
|
|
67024
|
+
import {
|
|
67025
|
+
mkdir as mkdir11,
|
|
67026
|
+
readdir as readdir5,
|
|
67027
|
+
readFile as readFile11,
|
|
67028
|
+
realpath as realpath2,
|
|
67029
|
+
stat as stat6,
|
|
67030
|
+
writeFile as writeFile10
|
|
67031
|
+
} from "node:fs/promises";
|
|
67025
67032
|
import * as path70 from "node:path";
|
|
67026
67033
|
function normalizeSeparators(filePath) {
|
|
67027
67034
|
return filePath.replace(/\\/g, "/");
|
|
@@ -67102,8 +67109,8 @@ async function scanDocIndex(directory) {
|
|
|
67102
67109
|
for (const file3 of existingManifest.files) {
|
|
67103
67110
|
try {
|
|
67104
67111
|
const fullPath = path70.join(directory, file3.path);
|
|
67105
|
-
const
|
|
67106
|
-
if (
|
|
67112
|
+
const stat7 = fs47.statSync(fullPath);
|
|
67113
|
+
if (stat7.mtimeMs > file3.mtime) {
|
|
67107
67114
|
cacheValid = false;
|
|
67108
67115
|
break;
|
|
67109
67116
|
}
|
|
@@ -67117,66 +67124,90 @@ async function scanDocIndex(directory) {
|
|
|
67117
67124
|
}
|
|
67118
67125
|
}
|
|
67119
67126
|
} catch {}
|
|
67127
|
+
const resolvedDirectory = await realpath2(directory).catch(() => directory);
|
|
67120
67128
|
const discoveredFiles = [];
|
|
67121
|
-
let
|
|
67122
|
-
|
|
67123
|
-
|
|
67124
|
-
} catch {
|
|
67125
|
-
const manifest2 = {
|
|
67126
|
-
schema_version: 1,
|
|
67127
|
-
scanned_at: new Date().toISOString(),
|
|
67128
|
-
files: []
|
|
67129
|
-
};
|
|
67130
|
-
return { manifest: manifest2, cached: false };
|
|
67131
|
-
}
|
|
67132
|
-
const entries = rawEntries.filter((e) => typeof e === "string");
|
|
67133
|
-
for (const entry of entries) {
|
|
67134
|
-
const fullPath = path70.join(directory, entry);
|
|
67135
|
-
let stat6;
|
|
67129
|
+
let rootReadable = false;
|
|
67130
|
+
const walkDir = async (dir) => {
|
|
67131
|
+
let entries;
|
|
67136
67132
|
try {
|
|
67137
|
-
|
|
67133
|
+
entries = await readdir5(dir, { withFileTypes: true });
|
|
67134
|
+
if (dir === directory)
|
|
67135
|
+
rootReadable = true;
|
|
67138
67136
|
} catch {
|
|
67139
|
-
|
|
67137
|
+
return;
|
|
67140
67138
|
}
|
|
67141
|
-
|
|
67142
|
-
|
|
67143
|
-
|
|
67144
|
-
|
|
67145
|
-
|
|
67146
|
-
if (
|
|
67147
|
-
|
|
67148
|
-
|
|
67139
|
+
for (const entry of entries) {
|
|
67140
|
+
if (discoveredFiles.length >= MAX_INDEXED_FILES)
|
|
67141
|
+
return;
|
|
67142
|
+
const isDir = entry.isDirectory();
|
|
67143
|
+
let isFile = entry.isFile();
|
|
67144
|
+
if (entry.isSymbolicLink()) {
|
|
67145
|
+
try {
|
|
67146
|
+
const symlinkPath = path70.join(dir, entry.name);
|
|
67147
|
+
const resolved = await realpath2(symlinkPath);
|
|
67148
|
+
const rel = path70.relative(resolvedDirectory, resolved);
|
|
67149
|
+
if (rel.startsWith("..") || path70.isAbsolute(rel))
|
|
67150
|
+
continue;
|
|
67151
|
+
const targetStat = await stat6(symlinkPath);
|
|
67152
|
+
isFile = targetStat.isFile();
|
|
67153
|
+
} catch {
|
|
67154
|
+
continue;
|
|
67155
|
+
}
|
|
67149
67156
|
}
|
|
67150
|
-
|
|
67151
|
-
|
|
67152
|
-
|
|
67153
|
-
|
|
67154
|
-
|
|
67155
|
-
skipThisFile = true;
|
|
67156
|
-
break;
|
|
67157
|
+
if (isDir) {
|
|
67158
|
+
if (!SKIP_DIRECTORIES3.has(entry.name)) {
|
|
67159
|
+
await walkDir(path70.join(dir, entry.name));
|
|
67160
|
+
}
|
|
67161
|
+
continue;
|
|
67157
67162
|
}
|
|
67163
|
+
if (!isFile)
|
|
67164
|
+
continue;
|
|
67165
|
+
const fullPath = path70.join(dir, entry.name);
|
|
67166
|
+
const relPath = normalizeSeparators(path70.relative(directory, fullPath));
|
|
67167
|
+
let skipThisFile = false;
|
|
67168
|
+
for (const pattern of SKIP_PATTERNS) {
|
|
67169
|
+
if (pattern.test(relPath)) {
|
|
67170
|
+
skipThisFile = true;
|
|
67171
|
+
break;
|
|
67172
|
+
}
|
|
67173
|
+
}
|
|
67174
|
+
if (skipThisFile)
|
|
67175
|
+
continue;
|
|
67176
|
+
if (!matchesDocPattern(relPath, allPatterns))
|
|
67177
|
+
continue;
|
|
67178
|
+
let fileStat;
|
|
67179
|
+
try {
|
|
67180
|
+
fileStat = await stat6(fullPath);
|
|
67181
|
+
} catch {
|
|
67182
|
+
continue;
|
|
67183
|
+
}
|
|
67184
|
+
let content;
|
|
67185
|
+
try {
|
|
67186
|
+
content = await readFile11(fullPath, "utf-8");
|
|
67187
|
+
} catch {
|
|
67188
|
+
continue;
|
|
67189
|
+
}
|
|
67190
|
+
const { title, summary } = extractTitleAndSummary(content, path70.basename(relPath));
|
|
67191
|
+
discoveredFiles.push({
|
|
67192
|
+
path: relPath,
|
|
67193
|
+
title,
|
|
67194
|
+
summary,
|
|
67195
|
+
lines: content.split(`
|
|
67196
|
+
`).length,
|
|
67197
|
+
mtime: fileStat.mtimeMs
|
|
67198
|
+
});
|
|
67158
67199
|
}
|
|
67159
|
-
|
|
67160
|
-
|
|
67161
|
-
|
|
67162
|
-
|
|
67163
|
-
|
|
67164
|
-
|
|
67165
|
-
|
|
67166
|
-
|
|
67167
|
-
|
|
67168
|
-
|
|
67169
|
-
}
|
|
67170
|
-
const { title, summary } = extractTitleAndSummary(content, path70.basename(entry));
|
|
67171
|
-
const lineCount = content.split(`
|
|
67172
|
-
`).length;
|
|
67173
|
-
discoveredFiles.push({
|
|
67174
|
-
path: entry,
|
|
67175
|
-
title,
|
|
67176
|
-
summary,
|
|
67177
|
-
lines: lineCount,
|
|
67178
|
-
mtime: stat6.mtimeMs
|
|
67179
|
-
});
|
|
67200
|
+
};
|
|
67201
|
+
await walkDir(directory);
|
|
67202
|
+
if (!rootReadable) {
|
|
67203
|
+
return {
|
|
67204
|
+
manifest: {
|
|
67205
|
+
schema_version: 1,
|
|
67206
|
+
scanned_at: new Date().toISOString(),
|
|
67207
|
+
files: []
|
|
67208
|
+
},
|
|
67209
|
+
cached: false
|
|
67210
|
+
};
|
|
67180
67211
|
}
|
|
67181
67212
|
discoveredFiles.sort((a, b) => a.path.toLowerCase().localeCompare(b.path.toLowerCase()));
|
|
67182
67213
|
let truncated = false;
|
|
@@ -67325,7 +67356,13 @@ var init_doc_scan = __esm(() => {
|
|
|
67325
67356
|
"dist",
|
|
67326
67357
|
"build",
|
|
67327
67358
|
".next",
|
|
67328
|
-
"vendor"
|
|
67359
|
+
"vendor",
|
|
67360
|
+
"bazel-out",
|
|
67361
|
+
"bazel-bin",
|
|
67362
|
+
"bazel-genfiles",
|
|
67363
|
+
"bazel-testlogs",
|
|
67364
|
+
".gradle",
|
|
67365
|
+
"target"
|
|
67329
67366
|
]);
|
|
67330
67367
|
SKIP_PATTERNS = [/\.test\./, /\.spec\./, /\.d\.ts$/];
|
|
67331
67368
|
CONSTRAINT_PATTERNS = [
|
|
@@ -74786,6 +74823,12 @@ function createSystemEnhancerHook(config3, directory) {
|
|
|
74786
74823
|
output.system.push(text);
|
|
74787
74824
|
injectedTokens += tokens;
|
|
74788
74825
|
};
|
|
74826
|
+
if (_input.sessionID) {
|
|
74827
|
+
const sessionAgent = swarmState.activeAgent.get(_input.sessionID);
|
|
74828
|
+
if (sessionAgent && OPENCODE_NATIVE_AGENTS.has(sessionAgent.toLowerCase())) {
|
|
74829
|
+
return;
|
|
74830
|
+
}
|
|
74831
|
+
}
|
|
74789
74832
|
const maxInjectionTokens = config3.context_budget?.max_injection_tokens ?? 4000;
|
|
74790
74833
|
let injectedTokens = 0;
|
|
74791
74834
|
const contextContent = await readSwarmFileAsync(directory, "context.md");
|
|
@@ -76448,22 +76491,22 @@ function classifyPathRisk(filePath, context) {
|
|
|
76448
76491
|
}
|
|
76449
76492
|
})();
|
|
76450
76493
|
const withinProjectRoot = isWithinDirectory(absolute, context.directory) && isWithinDirectory(resolvedAbsolute, context.directory);
|
|
76451
|
-
const
|
|
76494
|
+
const relative16 = path72.relative(context.directory, absolute).replace(/\\/g, "/");
|
|
76452
76495
|
let withinDeclaredScope = null;
|
|
76453
76496
|
if (Array.isArray(context.declaredScope)) {
|
|
76454
76497
|
withinDeclaredScope = context.declaredScope.length === 0 ? false : context.declaredScope.some((scope) => {
|
|
76455
76498
|
const s = normalizePath3(scope);
|
|
76456
76499
|
if (!s)
|
|
76457
76500
|
return false;
|
|
76458
|
-
return
|
|
76501
|
+
return relative16 === s || relative16.startsWith(`${s}/`);
|
|
76459
76502
|
});
|
|
76460
76503
|
}
|
|
76461
76504
|
const highRiskBuild = HIGH_RISK_BUILD_PATHS.some((entry) => {
|
|
76462
76505
|
const e = normalizePath3(entry);
|
|
76463
76506
|
if (e.endsWith("/")) {
|
|
76464
|
-
return
|
|
76507
|
+
return relative16.startsWith(e);
|
|
76465
76508
|
}
|
|
76466
|
-
return
|
|
76509
|
+
return relative16 === e || relative16.startsWith(`${e}/`);
|
|
76467
76510
|
});
|
|
76468
76511
|
return {
|
|
76469
76512
|
withinProjectRoot,
|
|
@@ -78932,8 +78975,8 @@ async function cleanupOldTrajectoryFiles(directory, maxAgeDays = 7) {
|
|
|
78932
78975
|
continue;
|
|
78933
78976
|
const filePath = path79.join(dirPath, entry.name);
|
|
78934
78977
|
try {
|
|
78935
|
-
const
|
|
78936
|
-
if (now -
|
|
78978
|
+
const stat8 = await fs57.stat(filePath);
|
|
78979
|
+
if (now - stat8.mtimeMs > cutoffMs) {
|
|
78937
78980
|
await fs57.unlink(filePath);
|
|
78938
78981
|
}
|
|
78939
78982
|
} catch {}
|
|
@@ -80773,8 +80816,8 @@ async function executeCompletionVerify(args2, directory) {
|
|
|
80773
80816
|
const normalizedPath = filePath.replace(/\\/g, "/");
|
|
80774
80817
|
const resolvedPath = path84.resolve(directory, normalizedPath);
|
|
80775
80818
|
const projectRoot = path84.resolve(directory);
|
|
80776
|
-
const
|
|
80777
|
-
const withinProject =
|
|
80819
|
+
const relative19 = path84.relative(projectRoot, resolvedPath);
|
|
80820
|
+
const withinProject = relative19 === "" || !relative19.startsWith("..") && !path84.isAbsolute(relative19);
|
|
80778
80821
|
if (!withinProject) {
|
|
80779
80822
|
blockedTasks.push({
|
|
80780
80823
|
task_id: task.id,
|
|
@@ -80949,8 +80992,8 @@ function estimateCyclomaticComplexity(content) {
|
|
|
80949
80992
|
}
|
|
80950
80993
|
function getComplexityForFile(filePath) {
|
|
80951
80994
|
try {
|
|
80952
|
-
const
|
|
80953
|
-
if (
|
|
80995
|
+
const stat8 = fs63.statSync(filePath);
|
|
80996
|
+
if (stat8.size > MAX_FILE_SIZE_BYTES4) {
|
|
80954
80997
|
return null;
|
|
80955
80998
|
}
|
|
80956
80999
|
const content = fs63.readFileSync(filePath, "utf-8");
|
|
@@ -81151,8 +81194,8 @@ async function computeDuplicationRatio(files, workingDir) {
|
|
|
81151
81194
|
continue;
|
|
81152
81195
|
}
|
|
81153
81196
|
try {
|
|
81154
|
-
const
|
|
81155
|
-
if (
|
|
81197
|
+
const stat8 = fs63.statSync(fullPath);
|
|
81198
|
+
if (stat8.size > MAX_FILE_SIZE_BYTES4) {
|
|
81156
81199
|
continue;
|
|
81157
81200
|
}
|
|
81158
81201
|
const content = fs63.readFileSync(fullPath, "utf-8");
|
|
@@ -81612,8 +81655,8 @@ async function getGitChurn(days, directory) {
|
|
|
81612
81655
|
}
|
|
81613
81656
|
function getComplexityForFile2(filePath) {
|
|
81614
81657
|
try {
|
|
81615
|
-
const
|
|
81616
|
-
if (
|
|
81658
|
+
const stat8 = fs64.statSync(filePath);
|
|
81659
|
+
if (stat8.size > MAX_FILE_SIZE_BYTES5) {
|
|
81617
81660
|
return null;
|
|
81618
81661
|
}
|
|
81619
81662
|
const content = fs64.readFileSync(filePath, "utf-8");
|
|
@@ -81809,7 +81852,7 @@ import {
|
|
|
81809
81852
|
appendFileSync as appendFileSync9,
|
|
81810
81853
|
existsSync as existsSync45,
|
|
81811
81854
|
mkdirSync as mkdirSync21,
|
|
81812
|
-
readFileSync as
|
|
81855
|
+
readFileSync as readFileSync36,
|
|
81813
81856
|
writeFileSync as writeFileSync14
|
|
81814
81857
|
} from "node:fs";
|
|
81815
81858
|
import { join as join72 } from "node:path";
|
|
@@ -81852,7 +81895,7 @@ function writeCouncilEvidence(workingDir, synthesis) {
|
|
|
81852
81895
|
const existingRoot = Object.create(null);
|
|
81853
81896
|
if (existsSync45(filePath)) {
|
|
81854
81897
|
try {
|
|
81855
|
-
const parsed = JSON.parse(
|
|
81898
|
+
const parsed = JSON.parse(readFileSync36(filePath, "utf-8"));
|
|
81856
81899
|
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
|
|
81857
81900
|
safeAssignOwnProps(existingRoot, parsed);
|
|
81858
81901
|
}
|
|
@@ -82119,7 +82162,7 @@ function buildPhaseCouncilFeedback(phaseNumber, phaseSummary, verdict, vetoedBy,
|
|
|
82119
82162
|
}
|
|
82120
82163
|
|
|
82121
82164
|
// src/council/criteria-store.ts
|
|
82122
|
-
import { existsSync as existsSync46, mkdirSync as mkdirSync22, readFileSync as
|
|
82165
|
+
import { existsSync as existsSync46, mkdirSync as mkdirSync22, readFileSync as readFileSync37, writeFileSync as writeFileSync15 } from "node:fs";
|
|
82123
82166
|
import { join as join73 } from "node:path";
|
|
82124
82167
|
var COUNCIL_DIR = ".swarm/council";
|
|
82125
82168
|
function writeCriteria(workingDir, taskId, criteria) {
|
|
@@ -82137,7 +82180,7 @@ function readCriteria(workingDir, taskId) {
|
|
|
82137
82180
|
if (!existsSync46(filePath))
|
|
82138
82181
|
return null;
|
|
82139
82182
|
try {
|
|
82140
|
-
const parsed = JSON.parse(
|
|
82183
|
+
const parsed = JSON.parse(readFileSync37(filePath, "utf-8"));
|
|
82141
82184
|
if (parsed && typeof parsed === "object" && typeof parsed.taskId === "string" && Array.isArray(parsed.criteria)) {
|
|
82142
82185
|
return parsed;
|
|
82143
82186
|
}
|
|
@@ -83785,8 +83828,8 @@ function readEvidenceFiles(evidenceDir, _cwd) {
|
|
|
83785
83828
|
if (!resolvedPath.startsWith(evidenceDirResolved)) {
|
|
83786
83829
|
continue;
|
|
83787
83830
|
}
|
|
83788
|
-
const
|
|
83789
|
-
if (!
|
|
83831
|
+
const stat8 = fs69.lstatSync(filePath);
|
|
83832
|
+
if (!stat8.isFile()) {
|
|
83790
83833
|
continue;
|
|
83791
83834
|
}
|
|
83792
83835
|
} catch {
|
|
@@ -84470,9 +84513,9 @@ function findSourceFiles2(dir, files = [], stats = { skippedDirs: [], skippedFil
|
|
|
84470
84513
|
continue;
|
|
84471
84514
|
}
|
|
84472
84515
|
const fullPath = path93.join(dir, entry);
|
|
84473
|
-
let
|
|
84516
|
+
let stat8;
|
|
84474
84517
|
try {
|
|
84475
|
-
|
|
84518
|
+
stat8 = fs71.statSync(fullPath);
|
|
84476
84519
|
} catch (e) {
|
|
84477
84520
|
stats.fileErrors.push({
|
|
84478
84521
|
path: fullPath,
|
|
@@ -84480,9 +84523,9 @@ function findSourceFiles2(dir, files = [], stats = { skippedDirs: [], skippedFil
|
|
|
84480
84523
|
});
|
|
84481
84524
|
continue;
|
|
84482
84525
|
}
|
|
84483
|
-
if (
|
|
84526
|
+
if (stat8.isDirectory()) {
|
|
84484
84527
|
findSourceFiles2(fullPath, files, stats);
|
|
84485
|
-
} else if (
|
|
84528
|
+
} else if (stat8.isFile()) {
|
|
84486
84529
|
const ext = path93.extname(fullPath).toLowerCase();
|
|
84487
84530
|
if (SUPPORTED_EXTENSIONS3.includes(ext)) {
|
|
84488
84531
|
files.push(fullPath);
|
|
@@ -84577,8 +84620,8 @@ var imports = createSwarmTool({
|
|
|
84577
84620
|
if (consumers.length >= MAX_CONSUMERS)
|
|
84578
84621
|
break;
|
|
84579
84622
|
try {
|
|
84580
|
-
const
|
|
84581
|
-
if (
|
|
84623
|
+
const stat8 = fs71.statSync(filePath);
|
|
84624
|
+
if (stat8.size > MAX_FILE_SIZE_BYTES7) {
|
|
84582
84625
|
skippedFileCount++;
|
|
84583
84626
|
continue;
|
|
84584
84627
|
}
|
|
@@ -88154,8 +88197,8 @@ async function placeholderScan(input, directory) {
|
|
|
88154
88197
|
}
|
|
88155
88198
|
let content;
|
|
88156
88199
|
try {
|
|
88157
|
-
const
|
|
88158
|
-
if (
|
|
88200
|
+
const stat8 = fs76.statSync(fullPath);
|
|
88201
|
+
if (stat8.size > MAX_FILE_SIZE) {
|
|
88159
88202
|
continue;
|
|
88160
88203
|
}
|
|
88161
88204
|
content = fs76.readFileSync(fullPath, "utf-8");
|
|
@@ -90021,13 +90064,13 @@ function validatePath(inputPath, baseDir, workspaceDir) {
|
|
|
90021
90064
|
resolved = path102.resolve(baseDir, inputPath);
|
|
90022
90065
|
}
|
|
90023
90066
|
const workspaceResolved = path102.resolve(workspaceDir);
|
|
90024
|
-
let
|
|
90067
|
+
let relative23;
|
|
90025
90068
|
if (isWinAbs) {
|
|
90026
|
-
|
|
90069
|
+
relative23 = path102.win32.relative(workspaceResolved, resolved);
|
|
90027
90070
|
} else {
|
|
90028
|
-
|
|
90071
|
+
relative23 = path102.relative(workspaceResolved, resolved);
|
|
90029
90072
|
}
|
|
90030
|
-
if (
|
|
90073
|
+
if (relative23.startsWith("..")) {
|
|
90031
90074
|
return "path traversal detected";
|
|
90032
90075
|
}
|
|
90033
90076
|
return null;
|
|
@@ -90270,14 +90313,14 @@ async function runSecretscanWithFiles(files, directory) {
|
|
|
90270
90313
|
skippedFiles++;
|
|
90271
90314
|
continue;
|
|
90272
90315
|
}
|
|
90273
|
-
let
|
|
90316
|
+
let stat8;
|
|
90274
90317
|
try {
|
|
90275
|
-
|
|
90318
|
+
stat8 = fs80.statSync(file3);
|
|
90276
90319
|
} catch {
|
|
90277
90320
|
skippedFiles++;
|
|
90278
90321
|
continue;
|
|
90279
90322
|
}
|
|
90280
|
-
if (
|
|
90323
|
+
if (stat8.size > MAX_FILE_SIZE_BYTES9) {
|
|
90281
90324
|
skippedFiles++;
|
|
90282
90325
|
continue;
|
|
90283
90326
|
}
|
|
@@ -91042,8 +91085,8 @@ function readTouchedFiles(evidenceDir, phase, cwd) {
|
|
|
91042
91085
|
for (const entry of entries) {
|
|
91043
91086
|
const entryPath = path104.join(evidenceDir, entry);
|
|
91044
91087
|
try {
|
|
91045
|
-
const
|
|
91046
|
-
if (!
|
|
91088
|
+
const stat8 = fs81.statSync(entryPath);
|
|
91089
|
+
if (!stat8.isDirectory()) {
|
|
91047
91090
|
continue;
|
|
91048
91091
|
}
|
|
91049
91092
|
} catch {
|
|
@@ -91063,11 +91106,11 @@ function readTouchedFiles(evidenceDir, phase, cwd) {
|
|
|
91063
91106
|
if (!resolvedPath.startsWith(evidenceDirResolved + path104.sep)) {
|
|
91064
91107
|
continue;
|
|
91065
91108
|
}
|
|
91066
|
-
const
|
|
91067
|
-
if (!
|
|
91109
|
+
const stat8 = fs81.lstatSync(evidenceFilePath);
|
|
91110
|
+
if (!stat8.isFile()) {
|
|
91068
91111
|
continue;
|
|
91069
91112
|
}
|
|
91070
|
-
if (
|
|
91113
|
+
if (stat8.size > MAX_FILE_SIZE_BYTES9) {
|
|
91071
91114
|
continue;
|
|
91072
91115
|
}
|
|
91073
91116
|
} catch {
|
|
@@ -91489,8 +91532,8 @@ async function executeSavePlan(args2, fallbackDir) {
|
|
|
91489
91532
|
if (process.env.SWARM_SKIP_SPEC_GATE !== "1") {
|
|
91490
91533
|
const specPath = path105.join(targetWorkspace, ".swarm", "spec.md");
|
|
91491
91534
|
try {
|
|
91492
|
-
const
|
|
91493
|
-
specMtime =
|
|
91535
|
+
const stat8 = await fs82.promises.stat(specPath);
|
|
91536
|
+
specMtime = stat8.mtime.toISOString();
|
|
91494
91537
|
const content = await fs82.promises.readFile(specPath, "utf8");
|
|
91495
91538
|
specHash = crypto10.createHash("sha256").update(content).digest("hex");
|
|
91496
91539
|
} catch {
|
|
@@ -94266,7 +94309,7 @@ init_loader();
|
|
|
94266
94309
|
import {
|
|
94267
94310
|
existsSync as existsSync65,
|
|
94268
94311
|
mkdirSync as mkdirSync28,
|
|
94269
|
-
readFileSync as
|
|
94312
|
+
readFileSync as readFileSync54,
|
|
94270
94313
|
renameSync as renameSync18,
|
|
94271
94314
|
unlinkSync as unlinkSync14,
|
|
94272
94315
|
writeFileSync as writeFileSync22
|
|
@@ -94403,7 +94446,7 @@ var submit_phase_council_verdicts = createSwarmTool({
|
|
|
94403
94446
|
function getPhaseMutationGapFinding(phaseNumber, workingDir) {
|
|
94404
94447
|
const mutationGatePath = path112.join(workingDir, ".swarm", "evidence", String(phaseNumber), "mutation-gate.json");
|
|
94405
94448
|
try {
|
|
94406
|
-
const raw =
|
|
94449
|
+
const raw = readFileSync54(mutationGatePath, "utf-8");
|
|
94407
94450
|
const parsed = JSON.parse(raw);
|
|
94408
94451
|
const gateEntry = (parsed.entries ?? []).find((entry) => entry?.type === "mutation-gate");
|
|
94409
94452
|
if (!gateEntry) {
|
|
@@ -96027,15 +96070,15 @@ function findSourceFiles3(dir, files = []) {
|
|
|
96027
96070
|
continue;
|
|
96028
96071
|
}
|
|
96029
96072
|
const fullPath = path118.join(dir, entry);
|
|
96030
|
-
let
|
|
96073
|
+
let stat8;
|
|
96031
96074
|
try {
|
|
96032
|
-
|
|
96075
|
+
stat8 = fs90.statSync(fullPath);
|
|
96033
96076
|
} catch {
|
|
96034
96077
|
continue;
|
|
96035
96078
|
}
|
|
96036
|
-
if (
|
|
96079
|
+
if (stat8.isDirectory()) {
|
|
96037
96080
|
findSourceFiles3(fullPath, files);
|
|
96038
|
-
} else if (
|
|
96081
|
+
} else if (stat8.isFile()) {
|
|
96039
96082
|
if (isSupportedExtension(fullPath)) {
|
|
96040
96083
|
files.push(fullPath);
|
|
96041
96084
|
}
|
|
@@ -96132,8 +96175,8 @@ var todo_extract = createSwarmTool({
|
|
|
96132
96175
|
return JSON.stringify(errorResult, null, 2);
|
|
96133
96176
|
}
|
|
96134
96177
|
const filesToScan = [];
|
|
96135
|
-
const
|
|
96136
|
-
if (
|
|
96178
|
+
const stat8 = fs90.statSync(scanPath);
|
|
96179
|
+
if (stat8.isFile()) {
|
|
96137
96180
|
if (isSupportedExtension(scanPath)) {
|
|
96138
96181
|
filesToScan.push(scanPath);
|
|
96139
96182
|
} else {
|