opencode-swarm 6.27.1 → 8.0.0-beta.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 +40 -1179
- package/dist/{agents/architect.d.ts → architect.d.ts} +1 -5
- package/dist/checkpoint.d.ts +7 -0
- package/dist/cli/index.js +11353 -20907
- package/dist/co-change-analyzer.d.ts +1 -0
- package/dist/compat.d.ts +12 -0
- package/dist/config-doctor.d.ts +1 -0
- package/dist/{config/loader.d.ts → config.d.ts} +6 -11
- package/dist/detector.d.ts +7 -0
- package/dist/diagnose-service.d.ts +1 -0
- package/dist/evidence-schema.d.ts +2 -0
- package/dist/evidence-service.d.ts +1 -0
- package/dist/export-service.d.ts +1 -0
- package/dist/handoff-service.d.ts +1 -0
- package/dist/history-service.d.ts +1 -0
- package/dist/hive-promoter.d.ts +2 -0
- package/dist/index.d.ts +1 -15
- package/dist/index.js +49007 -48213
- package/dist/knowledge-migrator.d.ts +2 -0
- package/dist/knowledge-store.d.ts +1 -0
- package/dist/knowledge-types.d.ts +1 -0
- package/dist/knowledge-validator.d.ts +2 -0
- package/dist/loader.d.ts +1 -0
- package/dist/manager.d.ts +1 -0
- package/dist/models.d.ts +1 -0
- package/dist/plan-service.d.ts +1 -0
- package/dist/preflight-service.d.ts +1 -0
- package/dist/profiles.d.ts +7 -0
- package/dist/register.d.ts +36 -0
- package/dist/schema.d.ts +2 -0
- package/dist/snapshot-writer.d.ts +1 -0
- package/dist/state.d.ts +1 -292
- package/dist/status-service.d.ts +15 -0
- package/dist/telemetry/src/events.d.ts +308 -0
- package/dist/telemetry/src/guards.d.ts +14 -0
- package/dist/telemetry/src/index.d.ts +4 -0
- package/dist/telemetry/src/version.d.ts +1 -0
- package/dist/utils.d.ts +1 -0
- package/dist/write-retro.d.ts +1 -0
- package/package.json +12 -13
- package/LICENSE +0 -21
- package/dist/__tests__/security-adversarial.test.d.ts +0 -1
- package/dist/agents/architect-permission.adversarial.test.d.ts +0 -5
- package/dist/agents/architect.turbo-banner.test.d.ts +0 -1
- package/dist/agents/coder.d.ts +0 -2
- package/dist/agents/critic.d.ts +0 -3
- package/dist/agents/designer.d.ts +0 -2
- package/dist/agents/docs.d.ts +0 -2
- package/dist/agents/explorer.d.ts +0 -3
- package/dist/agents/index.d.ts +0 -27
- package/dist/agents/reviewer.d.ts +0 -5
- package/dist/agents/sme.d.ts +0 -2
- package/dist/agents/test-engineer.adversarial.test.d.ts +0 -5
- package/dist/agents/test-engineer.d.ts +0 -2
- package/dist/agents/test-engineer.security.test.d.ts +0 -1
- package/dist/background/circuit-breaker.d.ts +0 -149
- package/dist/background/event-bus.d.ts +0 -60
- package/dist/background/evidence-summary-integration.d.ts +0 -73
- package/dist/background/index.d.ts +0 -22
- package/dist/background/manager.d.ts +0 -122
- package/dist/background/plan-sync-worker.d.ts +0 -122
- package/dist/background/queue.d.ts +0 -117
- package/dist/background/status-artifact.d.ts +0 -115
- package/dist/background/trigger.d.ts +0 -179
- package/dist/background/trigger.vulnerability.test.d.ts +0 -1
- package/dist/background/worker.d.ts +0 -92
- package/dist/cli/index.d.ts +0 -6
- package/dist/commands/checkpoint.d.ts +0 -5
- package/dist/commands/command-adapters.security.test.d.ts +0 -14
- package/dist/commands/commands.test.d.ts +0 -1
- package/dist/commands/config.d.ts +0 -5
- package/dist/commands/curate.test.d.ts +0 -1
- package/dist/commands/index.d.ts +0 -39
- 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.d.ts +0 -37
- package/dist/config/evidence-schema.d.ts +0 -1152
- package/dist/config/index.d.ts +0 -9
- package/dist/config/plan-schema.d.ts +0 -151
- package/dist/config/schema.d.ts +0 -700
- package/dist/context/role-filter.d.ts +0 -27
- package/dist/context/zone-classifier.d.ts +0 -17
- package/dist/diff/ast-diff.d.ts +0 -20
- package/dist/evidence/index.d.ts +0 -2
- package/dist/evidence/manager.d.ts +0 -74
- package/dist/gate-evidence.d.ts +0 -70
- package/dist/gate-evidence.test.d.ts +0 -1
- package/dist/git/branch.d.ts +0 -50
- package/dist/git/index.d.ts +0 -22
- package/dist/git/pr.d.ts +0 -28
- package/dist/hooks/adversarial-detector.d.ts +0 -34
- package/dist/hooks/agent-activity.d.ts +0 -38
- package/dist/hooks/co-change-suggester.d.ts +0 -51
- package/dist/hooks/compaction-customizer.d.ts +0 -11
- package/dist/hooks/context-budget.d.ts +0 -34
- package/dist/hooks/context-scoring.d.ts +0 -70
- package/dist/hooks/curator-drift.d.ts +0 -30
- package/dist/hooks/curator-types.d.ts +0 -99
- package/dist/hooks/curator.d.ts +0 -70
- package/dist/hooks/dark-matter-detector.d.ts +0 -38
- package/dist/hooks/delegation-gate.d.ts +0 -53
- package/dist/hooks/delegation-gate.evidence.test.d.ts +0 -4
- 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-sanitizer.d.ts +0 -24
- package/dist/hooks/delegation-tracker.d.ts +0 -14
- package/dist/hooks/extractors.d.ts +0 -53
- package/dist/hooks/guardrails.d.ts +0 -73
- package/dist/hooks/hive-promoter.d.ts +0 -40
- package/dist/hooks/index.d.ts +0 -16
- package/dist/hooks/knowledge-curator.d.ts +0 -22
- package/dist/hooks/knowledge-injector.d.ts +0 -20
- package/dist/hooks/knowledge-migrator.d.ts +0 -10
- package/dist/hooks/knowledge-reader.d.ts +0 -22
- package/dist/hooks/knowledge-store.d.ts +0 -20
- package/dist/hooks/knowledge-types.d.ts +0 -117
- package/dist/hooks/knowledge-validator.d.ts +0 -28
- package/dist/hooks/message-priority.d.ts +0 -105
- package/dist/hooks/messages-transform.d.ts +0 -13
- package/dist/hooks/model-limits.d.ts +0 -96
- package/dist/hooks/phase-monitor.d.ts +0 -22
- package/dist/hooks/pipeline-tracker.d.ts +0 -41
- package/dist/hooks/steering-consumed.d.ts +0 -30
- package/dist/hooks/system-enhancer.d.ts +0 -30
- package/dist/hooks/tool-summarizer.d.ts +0 -28
- package/dist/hooks/utils.d.ts +0 -20
- 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/knowledge/identity.d.ts +0 -25
- package/dist/knowledge/index.d.ts +0 -2
- package/dist/lang/detector.d.ts +0 -20
- package/dist/lang/grammars/tree-sitter-dart.wasm +0 -0
- package/dist/lang/grammars/tree-sitter-kotlin.wasm +0 -0
- package/dist/lang/grammars/tree-sitter-swift.wasm +0 -0
- package/dist/lang/index.d.ts +0 -4
- package/dist/lang/profiles.d.ts +0 -71
- package/dist/lang/registry.d.ts +0 -24
- package/dist/lang/runtime.d.ts +0 -35
- package/dist/output/agent-writer.d.ts +0 -27
- package/dist/output/index.d.ts +0 -1
- package/dist/parallel/dependency-graph.d.ts +0 -34
- package/dist/parallel/file-locks.d.ts +0 -33
- package/dist/parallel/index.d.ts +0 -4
- package/dist/parallel/meta-indexer.d.ts +0 -32
- package/dist/parallel/review-router.d.ts +0 -29
- package/dist/plan/index.d.ts +0 -1
- package/dist/plan/manager.d.ts +0 -40
- package/dist/plan/manager.update-task-status.test.d.ts +0 -1
- package/dist/quality/index.d.ts +0 -1
- package/dist/quality/metrics.d.ts +0 -20
- package/dist/sast/rules/c.d.ts +0 -9
- package/dist/sast/rules/csharp.d.ts +0 -9
- package/dist/sast/rules/go.d.ts +0 -9
- package/dist/sast/rules/index.d.ts +0 -72
- package/dist/sast/rules/java.d.ts +0 -9
- package/dist/sast/rules/javascript.d.ts +0 -9
- package/dist/sast/rules/php.d.ts +0 -9
- package/dist/sast/rules/python.d.ts +0 -9
- package/dist/sast/semgrep.d.ts +0 -68
- package/dist/sast/semgrep.test.d.ts +0 -1
- package/dist/sbom/cyclonedx.d.ts +0 -101
- package/dist/sbom/detectors/dart.d.ts +0 -7
- package/dist/sbom/detectors/dotnet.d.ts +0 -7
- package/dist/sbom/detectors/go.d.ts +0 -7
- package/dist/sbom/detectors/index.d.ts +0 -53
- package/dist/sbom/detectors/java.d.ts +0 -7
- package/dist/sbom/detectors/nodejs.d.ts +0 -7
- package/dist/sbom/detectors/python.d.ts +0 -7
- package/dist/sbom/detectors/rust.d.ts +0 -7
- package/dist/sbom/detectors/swift.d.ts +0 -7
- package/dist/services/config-doctor.d.ts +0 -125
- package/dist/services/config-doctor.security.test.d.ts +0 -1
- package/dist/services/config-doctor.test.d.ts +0 -1
- package/dist/services/context-budget-service.d.ts +0 -101
- package/dist/services/decision-drift-analyzer.d.ts +0 -96
- package/dist/services/diagnose-service.d.ts +0 -31
- package/dist/services/evidence-service.d.ts +0 -65
- package/dist/services/evidence-summary-service.d.ts +0 -75
- package/dist/services/export-service.d.ts +0 -23
- package/dist/services/handoff-service.d.ts +0 -61
- package/dist/services/history-service.d.ts +0 -35
- package/dist/services/index.d.ts +0 -13
- package/dist/services/plan-service.d.ts +0 -25
- package/dist/services/preflight-integration.d.ts +0 -38
- package/dist/services/preflight-service.d.ts +0 -62
- package/dist/services/run-memory.d.ts +0 -66
- package/dist/services/status-service.d.ts +0 -29
- package/dist/services/status-service.turbo-indicator.test.d.ts +0 -5
- package/dist/session/snapshot-reader.d.ts +0 -37
- package/dist/session/snapshot-writer.d.ts +0 -89
- package/dist/skills/index.d.ts +0 -30
- 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/summaries/index.d.ts +0 -2
- package/dist/summaries/manager.d.ts +0 -29
- package/dist/summaries/summarizer.d.ts +0 -38
- package/dist/tools/barrel-export-check-gate-status.test.d.ts +0 -6
- package/dist/tools/build-check.d.ts +0 -50
- package/dist/tools/check-gate-status.adversarial.test.d.ts +0 -1
- package/dist/tools/check-gate-status.d.ts +0 -7
- 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/checkpoint.d.ts +0 -2
- package/dist/tools/co-change-analyzer.d.ts +0 -45
- package/dist/tools/complexity-hotspots.d.ts +0 -2
- package/dist/tools/declare-scope.d.ts +0 -49
- package/dist/tools/diff.d.ts +0 -18
- package/dist/tools/domain-detector.d.ts +0 -6
- package/dist/tools/evidence-check.d.ts +0 -8
- package/dist/tools/file-extractor.d.ts +0 -9
- package/dist/tools/gitingest.d.ts +0 -18
- package/dist/tools/imports.d.ts +0 -5
- package/dist/tools/index.d.ts +0 -31
- package/dist/tools/knowledge-query.d.ts +0 -5
- package/dist/tools/lint.d.ts +0 -50
- package/dist/tools/phase-complete.d.ts +0 -25
- package/dist/tools/pkg-audit.d.ts +0 -2
- package/dist/tools/placeholder-scan.d.ts +0 -26
- package/dist/tools/plugin-registration-adversarial.test.d.ts +0 -1
- package/dist/tools/pre-check-batch.d.ts +0 -56
- package/dist/tools/quality-budget.d.ts +0 -24
- package/dist/tools/retrieve-summary.d.ts +0 -2
- package/dist/tools/sast-scan.d.ts +0 -60
- package/dist/tools/save-plan.d.ts +0 -63
- package/dist/tools/sbom-generate.d.ts +0 -26
- package/dist/tools/schema-drift.d.ts +0 -2
- package/dist/tools/secretscan.d.ts +0 -35
- package/dist/tools/symbols.d.ts +0 -2
- package/dist/tools/syntax-check.d.ts +0 -35
- package/dist/tools/test-runner.d.ts +0 -49
- package/dist/tools/test-runner.security-adversarial.test.d.ts +0 -5
- package/dist/tools/todo-extract.d.ts +0 -2
- package/dist/tools/tool-names.d.ts +0 -10
- package/dist/tools/update-task-status.d.ts +0 -74
- package/dist/tools/update-task-status.gates.test.d.ts +0 -1
- package/dist/tools/update-task-status.turbo-bypass.test.d.ts +0 -1
- package/dist/tools/write-retro.d.ts +0 -53
- package/dist/types/delegation.d.ts +0 -24
- package/dist/types/events.d.ts +0 -55
- package/dist/utils/errors.d.ts +0 -33
- package/dist/utils/index.d.ts +0 -4
- package/dist/utils/logger.d.ts +0 -3
- package/dist/utils/merge.d.ts +0 -5
- package/dist/utils/regex.d.ts +0 -30
- package/dist/utils/tool-output.d.ts +0 -10
- /package/dist/{commands/agents.d.ts → agents.d.ts} +0 -0
- /package/dist/{commands/analyze.d.ts → analyze.d.ts} +0 -0
- /package/dist/{commands/archive.d.ts → archive.d.ts} +0 -0
- /package/dist/{commands/benchmark.d.ts → benchmark.d.ts} +0 -0
- /package/dist/{commands/clarify.d.ts → clarify.d.ts} +0 -0
- /package/dist/{tools/create-tool.d.ts → create-tool.d.ts} +0 -0
- /package/dist/{commands/curate.d.ts → curate.d.ts} +0 -0
- /package/dist/{commands/dark-matter.d.ts → dark-matter.d.ts} +0 -0
- /package/dist/{commands/diagnose.d.ts → diagnose.d.ts} +0 -0
- /package/dist/{build/discovery.d.ts → discovery.d.ts} +0 -0
- /package/dist/{commands/doctor.d.ts → doctor.d.ts} +0 -0
- /package/dist/{commands/evidence.d.ts → evidence.d.ts} +0 -0
- /package/dist/{commands/export.d.ts → export.d.ts} +0 -0
- /package/dist/{commands/handoff.d.ts → handoff.d.ts} +0 -0
- /package/dist/{commands/history.d.ts → history.d.ts} +0 -0
- /package/dist/{commands/knowledge.d.ts → knowledge.d.ts} +0 -0
- /package/dist/{commands/plan.d.ts → plan.d.ts} +0 -0
- /package/dist/{commands/preflight.d.ts → preflight.d.ts} +0 -0
- /package/dist/{commands/promote.d.ts → promote.d.ts} +0 -0
- /package/dist/{commands/reset.d.ts → reset.d.ts} +0 -0
- /package/dist/{commands/retrieve.d.ts → retrieve.d.ts} +0 -0
- /package/dist/{commands/rollback.d.ts → rollback.d.ts} +0 -0
- /package/dist/{commands/simulate.d.ts → simulate.d.ts} +0 -0
- /package/dist/{commands/specify.d.ts → specify.d.ts} +0 -0
- /package/dist/{commands/status.d.ts → status.d.ts} +0 -0
- /package/dist/{commands/sync-plan.d.ts → sync-plan.d.ts} +0 -0
- /package/dist/{commands/turbo.d.ts → turbo.d.ts} +0 -0
- /package/dist/{commands/write_retro.d.ts → write_retro.d.ts} +0 -0
package/dist/lang/profiles.d.ts
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Language Profile Registry - Pure Data Types
|
|
3
|
-
*
|
|
4
|
-
* This file defines the LanguageProfile interface and LanguageRegistry class.
|
|
5
|
-
* No tool logic, no subprocess calls - pure data definitions only.
|
|
6
|
-
*/
|
|
7
|
-
export interface BuildCommand {
|
|
8
|
-
name: string;
|
|
9
|
-
cmd: string;
|
|
10
|
-
detectFile?: string;
|
|
11
|
-
priority: number;
|
|
12
|
-
}
|
|
13
|
-
export interface TestFramework {
|
|
14
|
-
name: string;
|
|
15
|
-
detect: string;
|
|
16
|
-
cmd: string;
|
|
17
|
-
priority: number;
|
|
18
|
-
}
|
|
19
|
-
export interface LintTool {
|
|
20
|
-
name: string;
|
|
21
|
-
detect: string;
|
|
22
|
-
cmd: string;
|
|
23
|
-
priority: number;
|
|
24
|
-
}
|
|
25
|
-
export interface LanguageProfile {
|
|
26
|
-
id: string;
|
|
27
|
-
displayName: string;
|
|
28
|
-
tier: 1 | 2 | 3;
|
|
29
|
-
extensions: string[];
|
|
30
|
-
treeSitter: {
|
|
31
|
-
grammarId: string;
|
|
32
|
-
wasmFile: string;
|
|
33
|
-
};
|
|
34
|
-
build: {
|
|
35
|
-
detectFiles: string[];
|
|
36
|
-
commands: BuildCommand[];
|
|
37
|
-
};
|
|
38
|
-
test: {
|
|
39
|
-
detectFiles: string[];
|
|
40
|
-
frameworks: TestFramework[];
|
|
41
|
-
};
|
|
42
|
-
lint: {
|
|
43
|
-
detectFiles: string[];
|
|
44
|
-
linters: LintTool[];
|
|
45
|
-
};
|
|
46
|
-
audit: {
|
|
47
|
-
detectFiles: string[];
|
|
48
|
-
command: string | null;
|
|
49
|
-
outputFormat: 'json' | 'text';
|
|
50
|
-
};
|
|
51
|
-
sast: {
|
|
52
|
-
nativeRuleSet: string | null;
|
|
53
|
-
semgrepSupport: 'ga' | 'beta' | 'experimental' | 'none';
|
|
54
|
-
};
|
|
55
|
-
prompts: {
|
|
56
|
-
coderConstraints: string[];
|
|
57
|
-
reviewerChecklist: string[];
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
export declare class LanguageRegistry {
|
|
61
|
-
private profiles;
|
|
62
|
-
private extensionIndex;
|
|
63
|
-
constructor();
|
|
64
|
-
register(profile: LanguageProfile): void;
|
|
65
|
-
get(id: string): LanguageProfile | undefined;
|
|
66
|
-
getById(id: string): LanguageProfile | undefined;
|
|
67
|
-
getByExtension(ext: string): LanguageProfile | undefined;
|
|
68
|
-
getAll(): LanguageProfile[];
|
|
69
|
-
getTier(tier: 1 | 2 | 3): LanguageProfile[];
|
|
70
|
-
}
|
|
71
|
-
export declare const LANGUAGE_REGISTRY: LanguageRegistry;
|
package/dist/lang/registry.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { type Parser } from './runtime';
|
|
2
|
-
export interface LanguageDefinition {
|
|
3
|
-
id: string;
|
|
4
|
-
extensions: string[];
|
|
5
|
-
commentNodes: string[];
|
|
6
|
-
}
|
|
7
|
-
export declare const languageDefinitions: LanguageDefinition[];
|
|
8
|
-
export declare function getLanguageForExtension(extension: string): LanguageDefinition | undefined;
|
|
9
|
-
export declare function listSupportedLanguages(): readonly LanguageDefinition[];
|
|
10
|
-
/**
|
|
11
|
-
* Get a parser for a specific file path
|
|
12
|
-
* Determines language from file extension, loads grammar, returns configured parser
|
|
13
|
-
*
|
|
14
|
-
* @param filePath - Absolute or relative path to the file
|
|
15
|
-
* @returns Parser instance or null if language not supported
|
|
16
|
-
*/
|
|
17
|
-
export declare function getParserForFile(filePath: string): Promise<Parser | null>;
|
|
18
|
-
/**
|
|
19
|
-
* Check if a file path has a supported language extension
|
|
20
|
-
*
|
|
21
|
-
* @param filePath - Path to check
|
|
22
|
-
* @returns true if extension is supported
|
|
23
|
-
*/
|
|
24
|
-
export declare function isSupportedFile(filePath: string): boolean;
|
package/dist/lang/runtime.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { Parser as ParserType } from 'web-tree-sitter';
|
|
2
|
-
export type Parser = ParserType;
|
|
3
|
-
/**
|
|
4
|
-
* Parser cache to avoid reloading grammars multiple times per session
|
|
5
|
-
*/
|
|
6
|
-
export declare const parserCache: Map<string, ParserType>;
|
|
7
|
-
/**
|
|
8
|
-
* Initialize a parser for the given language
|
|
9
|
-
* Loads WASM from dist/lang/grammars/ (copied during build)
|
|
10
|
-
*
|
|
11
|
-
* @param languageId - Language identifier (e.g., 'javascript', 'python')
|
|
12
|
-
* @returns Configured Parser instance
|
|
13
|
-
* @throws Error if WASM file not found or failed to load
|
|
14
|
-
*/
|
|
15
|
-
export declare function loadGrammar(languageId: string): Promise<ParserType>;
|
|
16
|
-
/**
|
|
17
|
-
* Check if a language grammar is available (WASM file exists)
|
|
18
|
-
* Does not load the grammar, just checks existence
|
|
19
|
-
*
|
|
20
|
-
* @param languageId - Language identifier
|
|
21
|
-
* @returns true if grammar is available
|
|
22
|
-
*/
|
|
23
|
-
export declare function isGrammarAvailable(languageId: string): Promise<boolean>;
|
|
24
|
-
/**
|
|
25
|
-
* Clear the parser cache (useful for testing)
|
|
26
|
-
*/
|
|
27
|
-
export declare function clearParserCache(): void;
|
|
28
|
-
/**
|
|
29
|
-
* Get list of initialized languages
|
|
30
|
-
*/
|
|
31
|
-
export declare function getInitializedLanguages(): string[];
|
|
32
|
-
/**
|
|
33
|
-
* Get list of supported language IDs
|
|
34
|
-
*/
|
|
35
|
-
export declare function getSupportedLanguages(): string[];
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export type AgentType = 'architect' | 'coder' | 'reviewer' | 'test_engineer' | 'explorer' | 'sme' | 'critic' | 'docs' | 'designer';
|
|
2
|
-
export type OutputType = 'review' | 'test' | 'research' | 'analysis' | 'summary';
|
|
3
|
-
export interface AgentOutputMetadata {
|
|
4
|
-
agent: AgentType;
|
|
5
|
-
type: OutputType;
|
|
6
|
-
taskId: string;
|
|
7
|
-
phase: number;
|
|
8
|
-
timestamp: string;
|
|
9
|
-
durationMs?: number;
|
|
10
|
-
success?: boolean;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Write agent output to persistent storage
|
|
14
|
-
* Output: .swarm/outputs/phase-N/task-N.M/{agent}-{type}-{timestamp}.md
|
|
15
|
-
*/
|
|
16
|
-
export declare function writeAgentOutput(directory: string, metadata: AgentOutputMetadata, content: string): Promise<string>;
|
|
17
|
-
/**
|
|
18
|
-
* Read agent output from persistent storage
|
|
19
|
-
*/
|
|
20
|
-
export declare function readAgentOutput(directory: string, phase: number, taskId: string): Promise<{
|
|
21
|
-
metadata: AgentOutputMetadata;
|
|
22
|
-
content: string;
|
|
23
|
-
}[]>;
|
|
24
|
-
/**
|
|
25
|
-
* List all agent outputs for a phase
|
|
26
|
-
*/
|
|
27
|
-
export declare function listAgentOutputs(directory: string, phase?: number): Promise<AgentOutputMetadata[]>;
|
package/dist/output/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { type AgentOutputMetadata, type AgentType, listAgentOutputs, type OutputType, readAgentOutput, writeAgentOutput, } from './agent-writer';
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export interface TaskNode {
|
|
2
|
-
id: string;
|
|
3
|
-
phase: number;
|
|
4
|
-
description: string;
|
|
5
|
-
depends: string[];
|
|
6
|
-
dependents: string[];
|
|
7
|
-
status: 'pending' | 'in_progress' | 'complete' | 'blocked';
|
|
8
|
-
}
|
|
9
|
-
export interface DependencyGraph {
|
|
10
|
-
tasks: Map<string, TaskNode>;
|
|
11
|
-
phases: Map<number, string[]>;
|
|
12
|
-
roots: string[];
|
|
13
|
-
leaves: string[];
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Parse plan.json and build dependency graph
|
|
17
|
-
*/
|
|
18
|
-
export declare function parseDependencyGraph(planPath: string): DependencyGraph;
|
|
19
|
-
/**
|
|
20
|
-
* Get tasks that can run in parallel (no unresolved dependencies)
|
|
21
|
-
*/
|
|
22
|
-
export declare function getRunnableTasks(graph: DependencyGraph): string[];
|
|
23
|
-
/**
|
|
24
|
-
* Check if a task is blocked (has incomplete dependencies)
|
|
25
|
-
*/
|
|
26
|
-
export declare function isTaskBlocked(graph: DependencyGraph, taskId: string): boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Get execution order (topological sort)
|
|
29
|
-
*/
|
|
30
|
-
export declare function getExecutionOrder(graph: DependencyGraph): string[];
|
|
31
|
-
/**
|
|
32
|
-
* Find all paths from root to a task
|
|
33
|
-
*/
|
|
34
|
-
export declare function getDependencyChain(graph: DependencyGraph, taskId: string): string[];
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export interface FileLock {
|
|
2
|
-
filePath: string;
|
|
3
|
-
agent: string;
|
|
4
|
-
taskId: string;
|
|
5
|
-
timestamp: string;
|
|
6
|
-
expiresAt: number;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Try to acquire a lock on a file
|
|
10
|
-
*/
|
|
11
|
-
export declare function tryAcquireLock(directory: string, filePath: string, agent: string, taskId: string): {
|
|
12
|
-
acquired: true;
|
|
13
|
-
lock: FileLock;
|
|
14
|
-
} | {
|
|
15
|
-
acquired: false;
|
|
16
|
-
existing?: FileLock;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Release a lock on a file
|
|
20
|
-
*/
|
|
21
|
-
export declare function releaseLock(directory: string, filePath: string, taskId: string): boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Check if a file is locked
|
|
24
|
-
*/
|
|
25
|
-
export declare function isLocked(directory: string, filePath: string): FileLock | null;
|
|
26
|
-
/**
|
|
27
|
-
* Clean up expired locks
|
|
28
|
-
*/
|
|
29
|
-
export declare function cleanupExpiredLocks(directory: string): number;
|
|
30
|
-
/**
|
|
31
|
-
* List all active locks
|
|
32
|
-
*/
|
|
33
|
-
export declare function listActiveLocks(directory: string): FileLock[];
|
package/dist/parallel/index.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { type DependencyGraph, getDependencyChain, getExecutionOrder, getRunnableTasks, isTaskBlocked, parseDependencyGraph, type TaskNode, } from './dependency-graph.js';
|
|
2
|
-
export { cleanupExpiredLocks, type FileLock, isLocked, listActiveLocks, releaseLock, tryAcquireLock, } from './file-locks.js';
|
|
3
|
-
export { extractMetaSummaries, getLatestTaskSummary, indexMetaSummaries, type MetaSummaryEntry, querySummaries, } from './meta-indexer.js';
|
|
4
|
-
export { type ComplexityMetrics, computeComplexity, type ReviewDepth, type ReviewRouting, routeReview, routeReviewForChanges, shouldParallelizeReview, } from './review-router.js';
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export interface MetaSummaryEntry {
|
|
2
|
-
timestamp: string;
|
|
3
|
-
phase?: number;
|
|
4
|
-
taskId?: string;
|
|
5
|
-
agent?: string;
|
|
6
|
-
summary: string;
|
|
7
|
-
source?: string;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Extract meta.summary from event JSONL files
|
|
11
|
-
*/
|
|
12
|
-
export declare function extractMetaSummaries(eventsPath: string): MetaSummaryEntry[];
|
|
13
|
-
/**
|
|
14
|
-
* Index meta summaries to external knowledge store
|
|
15
|
-
*/
|
|
16
|
-
export declare function indexMetaSummaries(directory: string, externalKnowledgeDir?: string): Promise<{
|
|
17
|
-
indexed: number;
|
|
18
|
-
path: string;
|
|
19
|
-
}>;
|
|
20
|
-
/**
|
|
21
|
-
* Query indexed summaries
|
|
22
|
-
*/
|
|
23
|
-
export declare function querySummaries(directory: string, options?: {
|
|
24
|
-
phase?: number;
|
|
25
|
-
taskId?: string;
|
|
26
|
-
agent?: string;
|
|
27
|
-
since?: string;
|
|
28
|
-
}): MetaSummaryEntry[];
|
|
29
|
-
/**
|
|
30
|
-
* Get latest summary for a task
|
|
31
|
-
*/
|
|
32
|
-
export declare function getLatestTaskSummary(directory: string, taskId: string): MetaSummaryEntry | undefined;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export type ReviewDepth = 'single' | 'double';
|
|
2
|
-
export interface ReviewRouting {
|
|
3
|
-
reviewerCount: number;
|
|
4
|
-
testEngineerCount: number;
|
|
5
|
-
depth: ReviewDepth;
|
|
6
|
-
reason: string;
|
|
7
|
-
}
|
|
8
|
-
export interface ComplexityMetrics {
|
|
9
|
-
fileCount: number;
|
|
10
|
-
functionCount: number;
|
|
11
|
-
astChangeCount: number;
|
|
12
|
-
maxFileComplexity: number;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Compute complexity metrics for a set of files
|
|
16
|
-
*/
|
|
17
|
-
export declare function computeComplexity(directory: string, changedFiles: string[]): Promise<ComplexityMetrics>;
|
|
18
|
-
/**
|
|
19
|
-
* Determine review routing based on complexity
|
|
20
|
-
*/
|
|
21
|
-
export declare function routeReview(metrics: ComplexityMetrics): ReviewRouting;
|
|
22
|
-
/**
|
|
23
|
-
* Route review with full analysis
|
|
24
|
-
*/
|
|
25
|
-
export declare function routeReviewForChanges(directory: string, changedFiles: string[]): Promise<ReviewRouting>;
|
|
26
|
-
/**
|
|
27
|
-
* Check if review should be parallelized
|
|
28
|
-
*/
|
|
29
|
-
export declare function shouldParallelizeReview(routing: ReviewRouting): boolean;
|
package/dist/plan/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { derivePlanMarkdown, loadPlan, migrateLegacyPlan, savePlan, updateTaskStatus, } from './manager';
|
package/dist/plan/manager.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { type Plan, type TaskStatus } from '../config/plan-schema';
|
|
2
|
-
/**
|
|
3
|
-
* Load plan.json ONLY without auto-migration from plan.md.
|
|
4
|
-
* Returns null if plan.json doesn't exist or is invalid.
|
|
5
|
-
* Use this when you want to check for structured plans without triggering migration.
|
|
6
|
-
*/
|
|
7
|
-
export declare function loadPlanJsonOnly(directory: string): Promise<Plan | null>;
|
|
8
|
-
/**
|
|
9
|
-
* Load and validate plan from .swarm/plan.json with auto-heal sync.
|
|
10
|
-
*
|
|
11
|
-
* 4-step precedence with auto-heal:
|
|
12
|
-
* 1. .swarm/plan.json exists AND validates ->
|
|
13
|
-
* a) If plan.md missing or stale -> regenerate plan.md from plan.json
|
|
14
|
-
* b) Return parsed Plan
|
|
15
|
-
* 2. .swarm/plan.json exists but FAILS validation ->
|
|
16
|
-
* a) If plan.md exists -> migrate from plan.md, save valid plan.json, then derive plan.md
|
|
17
|
-
* b) Return migrated Plan
|
|
18
|
-
* 3. .swarm/plan.md exists only -> migrate from plan.md, save both files, return Plan
|
|
19
|
-
* 4. Neither exists -> return null
|
|
20
|
-
*/
|
|
21
|
-
export declare function loadPlan(directory: string): Promise<Plan | null>;
|
|
22
|
-
/**
|
|
23
|
-
* Validate against PlanSchema (throw on invalid), write to .swarm/plan.json via atomic temp+rename pattern,
|
|
24
|
-
* then derive and write .swarm/plan.md
|
|
25
|
-
*/
|
|
26
|
-
export declare function savePlan(directory: string, plan: Plan): Promise<void>;
|
|
27
|
-
/**
|
|
28
|
-
* Load plan → find task by ID → update status → save → return updated plan.
|
|
29
|
-
* Throw if plan not found or task not found.
|
|
30
|
-
*/
|
|
31
|
-
export declare function updateTaskStatus(directory: string, taskId: string, status: TaskStatus): Promise<Plan>;
|
|
32
|
-
/**
|
|
33
|
-
* Generate deterministic markdown view from plan object.
|
|
34
|
-
* Ensures stable ordering: phases by ID (ascending), tasks by ID (natural numeric).
|
|
35
|
-
*/
|
|
36
|
-
export declare function derivePlanMarkdown(plan: Plan): string;
|
|
37
|
-
/**
|
|
38
|
-
* Convert existing plan.md to plan.json. PURE function — no I/O.
|
|
39
|
-
*/
|
|
40
|
-
export declare function migrateLegacyPlan(planContent: string, swarmId?: string): Plan;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/quality/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { computeQualityMetrics, type QualityMetrics, type QualityViolation, } from './metrics';
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { QualityBudgetConfig } from '../config/schema';
|
|
2
|
-
export interface QualityMetrics {
|
|
3
|
-
complexity_delta: number;
|
|
4
|
-
public_api_delta: number;
|
|
5
|
-
duplication_ratio: number;
|
|
6
|
-
test_to_code_ratio: number;
|
|
7
|
-
files_analyzed: string[];
|
|
8
|
-
thresholds: QualityBudgetConfig;
|
|
9
|
-
violations: QualityViolation[];
|
|
10
|
-
}
|
|
11
|
-
export interface QualityViolation {
|
|
12
|
-
type: 'complexity' | 'api' | 'duplication' | 'test_ratio';
|
|
13
|
-
message: string;
|
|
14
|
-
severity: 'error' | 'warning';
|
|
15
|
-
files: string[];
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Compute quality metrics for changed files
|
|
19
|
-
*/
|
|
20
|
-
export declare function computeQualityMetrics(changedFiles: string[], thresholds: QualityBudgetConfig, workingDir: string): Promise<QualityMetrics>;
|
package/dist/sast/rules/c.d.ts
DELETED
package/dist/sast/rules/go.d.ts
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SAST Rule Engine - Main entry point
|
|
3
|
-
* Provides rule registration, loading, and execution for static security analysis
|
|
4
|
-
*/
|
|
5
|
-
export interface SastRule {
|
|
6
|
-
id: string;
|
|
7
|
-
name: string;
|
|
8
|
-
severity: 'critical' | 'high' | 'medium' | 'low';
|
|
9
|
-
languages: string[];
|
|
10
|
-
description: string;
|
|
11
|
-
remediation?: string;
|
|
12
|
-
query?: string;
|
|
13
|
-
pattern?: RegExp;
|
|
14
|
-
validate?: (match: SastMatch, context: SastContext) => boolean;
|
|
15
|
-
}
|
|
16
|
-
export interface SastMatch {
|
|
17
|
-
text: string;
|
|
18
|
-
line: number;
|
|
19
|
-
column: number;
|
|
20
|
-
endLine?: number;
|
|
21
|
-
endColumn?: number;
|
|
22
|
-
captures?: Record<string, string>;
|
|
23
|
-
}
|
|
24
|
-
export interface SastContext {
|
|
25
|
-
filePath: string;
|
|
26
|
-
content: string;
|
|
27
|
-
language: string;
|
|
28
|
-
parser?: unknown;
|
|
29
|
-
tree?: unknown;
|
|
30
|
-
}
|
|
31
|
-
export interface SastFinding {
|
|
32
|
-
rule_id: string;
|
|
33
|
-
severity: 'critical' | 'high' | 'medium' | 'low';
|
|
34
|
-
message: string;
|
|
35
|
-
location: {
|
|
36
|
-
file: string;
|
|
37
|
-
line: number;
|
|
38
|
-
column?: number;
|
|
39
|
-
};
|
|
40
|
-
remediation?: string;
|
|
41
|
-
excerpt?: string;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Get all registered rules
|
|
45
|
-
*/
|
|
46
|
-
export declare function getAllRules(): SastRule[];
|
|
47
|
-
/**
|
|
48
|
-
* Get rules for a specific language
|
|
49
|
-
*/
|
|
50
|
-
export declare function getRulesForLanguage(language: string): SastRule[];
|
|
51
|
-
/**
|
|
52
|
-
* Get rule by ID
|
|
53
|
-
*/
|
|
54
|
-
export declare function getRuleById(id: string): SastRule | undefined;
|
|
55
|
-
/**
|
|
56
|
-
* Execute rules synchronously (pattern matching only)
|
|
57
|
-
* This is the primary execution method for offline SAST
|
|
58
|
-
*/
|
|
59
|
-
export declare function executeRulesSync(filePath: string, content: string, language: string): SastFinding[];
|
|
60
|
-
/**
|
|
61
|
-
* Execute rules against a file (async version with tree-sitter support)
|
|
62
|
-
* Falls back to pattern matching if tree-sitter is unavailable
|
|
63
|
-
*/
|
|
64
|
-
export declare function executeRules(filePath: string, content: string, language: string): Promise<SastFinding[]>;
|
|
65
|
-
/**
|
|
66
|
-
* Get statistics about rules
|
|
67
|
-
*/
|
|
68
|
-
export declare function getRuleStats(): {
|
|
69
|
-
total: number;
|
|
70
|
-
bySeverity: Record<string, number>;
|
|
71
|
-
byLanguage: Record<string, number>;
|
|
72
|
-
};
|
package/dist/sast/rules/php.d.ts
DELETED
package/dist/sast/semgrep.d.ts
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Semgrep Integration for Tier B SAST Enhancement
|
|
3
|
-
* Provides optional Semgrep detection and invocation for advanced static analysis
|
|
4
|
-
*/
|
|
5
|
-
import type { SastFinding } from './rules/index.js';
|
|
6
|
-
/**
|
|
7
|
-
* Semgrep CLI options
|
|
8
|
-
*/
|
|
9
|
-
export interface SemgrepOptions {
|
|
10
|
-
/** Files or directories to scan */
|
|
11
|
-
files: string[];
|
|
12
|
-
/** Directory containing Semgrep rules (default: .swarm/semgrep-rules/) */
|
|
13
|
-
rulesDir?: string;
|
|
14
|
-
/** Timeout in milliseconds (default: 30000) */
|
|
15
|
-
timeoutMs?: number;
|
|
16
|
-
/** Working directory for Semgrep execution */
|
|
17
|
-
cwd?: string;
|
|
18
|
-
/** Language identifier for --lang flag (used with useAutoConfig) */
|
|
19
|
-
lang?: string;
|
|
20
|
-
/** When true, use --config auto instead of local rulesDir (for profile-driven languages) */
|
|
21
|
-
useAutoConfig?: boolean;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Result from Semgrep execution
|
|
25
|
-
*/
|
|
26
|
-
export interface SemgrepResult {
|
|
27
|
-
/** Whether Semgrep is available on the system */
|
|
28
|
-
available: boolean;
|
|
29
|
-
/** Array of security findings from Semgrep */
|
|
30
|
-
findings: SastFinding[];
|
|
31
|
-
/** Error message if Semgrep failed */
|
|
32
|
-
error?: string;
|
|
33
|
-
/** Engine label for the findings */
|
|
34
|
-
engine: 'tier_a' | 'tier_a+tier_b';
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Check if Semgrep CLI is available on the system
|
|
38
|
-
* Uses caching to avoid shelling out on every check
|
|
39
|
-
* @returns true if Semgrep is available, false otherwise
|
|
40
|
-
*/
|
|
41
|
-
export declare function isSemgrepAvailable(): boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Check if Semgrep is available (async version for consistency)
|
|
44
|
-
* @returns Promise resolving to availability status
|
|
45
|
-
*/
|
|
46
|
-
export declare function checkSemgrepAvailable(): Promise<boolean>;
|
|
47
|
-
/**
|
|
48
|
-
* Reset the Semgrep availability cache (useful for testing)
|
|
49
|
-
*/
|
|
50
|
-
export declare function resetSemgrepCache(): void;
|
|
51
|
-
/**
|
|
52
|
-
* Run Semgrep on specified files
|
|
53
|
-
* @param options - Semgrep options
|
|
54
|
-
* @returns Promise resolving to SemgrepResult
|
|
55
|
-
*/
|
|
56
|
-
export declare function runSemgrep(options: SemgrepOptions): Promise<SemgrepResult>;
|
|
57
|
-
/**
|
|
58
|
-
* Get the default rules directory path
|
|
59
|
-
* @param projectRoot - Optional project root directory
|
|
60
|
-
* @returns Absolute path to rules directory
|
|
61
|
-
*/
|
|
62
|
-
export declare function getRulesDirectory(projectRoot?: string): string;
|
|
63
|
-
/**
|
|
64
|
-
* Check if bundled rules directory exists
|
|
65
|
-
* @param projectRoot - Optional project root directory
|
|
66
|
-
* @returns true if rules directory exists
|
|
67
|
-
*/
|
|
68
|
-
export declare function hasBundledRules(projectRoot?: string): boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|