@orangepro/orangepro-mcp 0.1.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/LICENSE +21 -0
- package/README.md +328 -0
- package/dist/local/agentWorkflow.js +81 -0
- package/dist/local/aiGraph/links.js +635 -0
- package/dist/local/analyze/analyzer.js +2129 -0
- package/dist/local/analyze/behaviorContracts.js +169 -0
- package/dist/local/analyze/boilerplate.js +42 -0
- package/dist/local/analyze/callGraph.js +458 -0
- package/dist/local/analyze/classify.js +219 -0
- package/dist/local/analyze/clustering.js +357 -0
- package/dist/local/analyze/confirm.js +2422 -0
- package/dist/local/analyze/coverage.js +518 -0
- package/dist/local/analyze/coverageArtifacts.js +607 -0
- package/dist/local/analyze/frameworks.js +115 -0
- package/dist/local/analyze/linkage/conventions.js +160 -0
- package/dist/local/analyze/parseCache.js +164 -0
- package/dist/local/analyze/selfAssert.js +53 -0
- package/dist/local/analyze/symbols.js +430 -0
- package/dist/local/analyze/testLayer.js +135 -0
- package/dist/local/analyze/treeSitter/engine.js +1253 -0
- package/dist/local/analyze/treeSitter/languages.js +101 -0
- package/dist/local/autoProve.js +620 -0
- package/dist/local/cli.js +1468 -0
- package/dist/local/cliArgs.js +112 -0
- package/dist/local/corpusScope.js +162 -0
- package/dist/local/enrich/csv.js +348 -0
- package/dist/local/enrich/index.js +43 -0
- package/dist/local/enrich/markdown.js +193 -0
- package/dist/local/explain/explain.js +91 -0
- package/dist/local/exportCli.js +26 -0
- package/dist/local/flows/flowWalker.js +215 -0
- package/dist/local/flows/llmFlowDiscovery.js +567 -0
- package/dist/local/freshness/changed.js +280 -0
- package/dist/local/freshness/manifest.js +35 -0
- package/dist/local/freshness/status.js +30 -0
- package/dist/local/gaps/gaps.js +114 -0
- package/dist/local/generate/buckets.js +73 -0
- package/dist/local/generate/compareJudge.js +124 -0
- package/dist/local/generate/compareReport.js +538 -0
- package/dist/local/generate/compareScore.js +105 -0
- package/dist/local/generate/deriveImports.js +91 -0
- package/dist/local/generate/generator.js +2586 -0
- package/dist/local/generate/prompt.js +144 -0
- package/dist/local/generate/promptV5.js +438 -0
- package/dist/local/generate/providers.js +400 -0
- package/dist/local/generate/runHints.js +304 -0
- package/dist/local/graph/citations.js +73 -0
- package/dist/local/graph/confirmable.js +72 -0
- package/dist/local/graph/factories.js +210 -0
- package/dist/local/graph/ontology.js +18 -0
- package/dist/local/interactive.js +53 -0
- package/dist/local/jobs/jobStore.js +80 -0
- package/dist/local/jobs/notify.js +29 -0
- package/dist/local/jobs/runner.js +75 -0
- package/dist/local/ledger.js +117 -0
- package/dist/local/localConfig.js +112 -0
- package/dist/local/mcp.js +548 -0
- package/dist/local/operations.js +1749 -0
- package/dist/local/pack/coverageReport.js +192 -0
- package/dist/local/pack/exporter.js +195 -0
- package/dist/local/pack/schema.js +128 -0
- package/dist/local/pack/summary.js +127 -0
- package/dist/local/pack/validate.js +25 -0
- package/dist/local/proofRunnability.js +366 -0
- package/dist/local/recipe/dbSqljs.js +255 -0
- package/dist/local/reprove/paths.js +13 -0
- package/dist/local/reprove/scoped.js +136 -0
- package/dist/local/resolve/barrelWalker.js +178 -0
- package/dist/local/resolve/exportIndex.js +270 -0
- package/dist/local/resolve/importGraph.js +347 -0
- package/dist/local/resolve/resolver.js +122 -0
- package/dist/local/resolve/resolverCache.js +117 -0
- package/dist/local/rtm.js +413 -0
- package/dist/local/score/coverage.js +99 -0
- package/dist/local/score/doctor.js +67 -0
- package/dist/local/score/risk.js +362 -0
- package/dist/local/score/score.js +182 -0
- package/dist/local/types.js +1 -0
- package/dist/local/util/hash.js +16 -0
- package/dist/local/util/ids.js +16 -0
- package/dist/local/util/progress.js +8 -0
- package/dist/local/util/redact.js +39 -0
- package/dist/local/util/time.js +1 -0
- package/dist/local/util/walk.js +174 -0
- package/dist/local/viz/behaviorReportData.js +367 -0
- package/dist/local/viz/behaviorReportHtml.js +664 -0
- package/dist/local/viz/d3.bundle.js +3 -0
- package/dist/local/viz/html.js +1152 -0
- package/dist/local/viz/payload.js +525 -0
- package/dist/local/workspace.js +99 -0
- package/docs/agent-workflow.md +167 -0
- package/docs/agents/claude-code.md +43 -0
- package/docs/agents/codex.md +52 -0
- package/docs/agents/cursor.md +39 -0
- package/docs/agents/opencode.md +43 -0
- package/docs/agents/vscode.md +34 -0
- package/docs/local-proof-kit.md +269 -0
- package/package.json +92 -0
- package/scripts/spikes/dynamic-proof-jest-reporter.cjs +66 -0
- package/scripts/spikes/dynamic-proof-mocha-reporter.cjs +105 -0
- package/scripts/spikes/dynamic-proof-spike.mjs +2335 -0
- package/scripts/spikes/dynamic-proof-vitest-reporter.mjs +81 -0
- package/scripts/spikes/failure-summary.mjs +29 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
export const TS_LANG_CONFIGS = {
|
|
2
|
+
java: {
|
|
3
|
+
wasm: "tree-sitter-java.wasm",
|
|
4
|
+
classTypes: new Set(["class_declaration", "interface_declaration", "enum_declaration", "record_declaration"]),
|
|
5
|
+
functionTypes: new Set(),
|
|
6
|
+
// method_declaration only — constructors are not a separately-tested behavior.
|
|
7
|
+
methodTypes: new Set(["method_declaration"]),
|
|
8
|
+
nameField: "name"
|
|
9
|
+
},
|
|
10
|
+
python: {
|
|
11
|
+
wasm: "tree-sitter-python.wasm",
|
|
12
|
+
classTypes: new Set(["class_definition"]),
|
|
13
|
+
// Python methods are also function_definition (nested in a class); both count
|
|
14
|
+
// as callable behaviors, so a single type covers free functions + methods.
|
|
15
|
+
functionTypes: new Set(["function_definition"]),
|
|
16
|
+
methodTypes: new Set(),
|
|
17
|
+
nameField: "name"
|
|
18
|
+
},
|
|
19
|
+
go: {
|
|
20
|
+
wasm: "tree-sitter-go.wasm",
|
|
21
|
+
// Go "types" (structs/interfaces) are declared via type_spec.
|
|
22
|
+
classTypes: new Set(["type_spec"]),
|
|
23
|
+
functionTypes: new Set(["function_declaration"]),
|
|
24
|
+
// Receiver methods (`func (r *Repo) Save()`) — the exact surface the regex missed.
|
|
25
|
+
methodTypes: new Set(["method_declaration"]),
|
|
26
|
+
nameField: "name"
|
|
27
|
+
},
|
|
28
|
+
ruby: {
|
|
29
|
+
wasm: "tree-sitter-ruby.wasm",
|
|
30
|
+
classTypes: new Set(["class", "module"]),
|
|
31
|
+
functionTypes: new Set(),
|
|
32
|
+
methodTypes: new Set(["method", "singleton_method"]),
|
|
33
|
+
nameField: "name"
|
|
34
|
+
},
|
|
35
|
+
kotlin: {
|
|
36
|
+
wasm: "tree-sitter-kotlin.wasm",
|
|
37
|
+
classTypes: new Set(["class_declaration", "object_declaration"]),
|
|
38
|
+
functionTypes: new Set(["function_declaration"]),
|
|
39
|
+
methodTypes: new Set(),
|
|
40
|
+
nameField: "name",
|
|
41
|
+
nameNodeTypes: new Set(["simple_identifier", "type_identifier"])
|
|
42
|
+
},
|
|
43
|
+
rust: {
|
|
44
|
+
wasm: "tree-sitter-rust.wasm",
|
|
45
|
+
classTypes: new Set(["struct_item", "enum_item", "trait_item"]),
|
|
46
|
+
functionTypes: new Set(["function_item", "function_signature_item"]),
|
|
47
|
+
methodTypes: new Set(),
|
|
48
|
+
nameField: "name"
|
|
49
|
+
},
|
|
50
|
+
php: {
|
|
51
|
+
wasm: "tree-sitter-php.wasm",
|
|
52
|
+
classTypes: new Set(["class_declaration", "interface_declaration", "trait_declaration", "enum_declaration"]),
|
|
53
|
+
functionTypes: new Set(["function_definition"]),
|
|
54
|
+
methodTypes: new Set(["method_declaration"]),
|
|
55
|
+
nameField: "name"
|
|
56
|
+
},
|
|
57
|
+
csharp: {
|
|
58
|
+
wasm: "tree-sitter-c_sharp.wasm",
|
|
59
|
+
classTypes: new Set([
|
|
60
|
+
"class_declaration",
|
|
61
|
+
"interface_declaration",
|
|
62
|
+
"struct_declaration",
|
|
63
|
+
"enum_declaration",
|
|
64
|
+
"record_declaration",
|
|
65
|
+
"record_struct_declaration"
|
|
66
|
+
]),
|
|
67
|
+
functionTypes: new Set(),
|
|
68
|
+
methodTypes: new Set(["method_declaration"]),
|
|
69
|
+
nameField: "name"
|
|
70
|
+
},
|
|
71
|
+
swift: {
|
|
72
|
+
wasm: "tree-sitter-swift.wasm",
|
|
73
|
+
classTypes: new Set(["class_declaration", "protocol_declaration", "enum_declaration"]),
|
|
74
|
+
functionTypes: new Set(["function_declaration", "protocol_function_declaration"]),
|
|
75
|
+
methodTypes: new Set(),
|
|
76
|
+
nameField: "name"
|
|
77
|
+
},
|
|
78
|
+
c: {
|
|
79
|
+
wasm: "tree-sitter-c.wasm",
|
|
80
|
+
classTypes: new Set(["struct_specifier", "union_specifier", "enum_specifier"]),
|
|
81
|
+
functionTypes: new Set(["function_definition"]),
|
|
82
|
+
methodTypes: new Set(),
|
|
83
|
+
nameField: "name",
|
|
84
|
+
nameNodeTypes: new Set(["identifier", "type_identifier"])
|
|
85
|
+
},
|
|
86
|
+
cpp: {
|
|
87
|
+
wasm: "tree-sitter-cpp.wasm",
|
|
88
|
+
classTypes: new Set(["class_specifier", "struct_specifier", "union_specifier", "enum_specifier"]),
|
|
89
|
+
functionTypes: new Set(["function_definition"]),
|
|
90
|
+
methodTypes: new Set(),
|
|
91
|
+
nameField: "name",
|
|
92
|
+
nameNodeTypes: new Set(["identifier", "type_identifier"])
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
/** Languages handled by the tree-sitter path (everything not on the TS compiler path). */
|
|
96
|
+
export function isTreeSitterLanguage(language) {
|
|
97
|
+
return Object.prototype.hasOwnProperty.call(TS_LANG_CONFIGS, language);
|
|
98
|
+
}
|
|
99
|
+
export function treeSitterLanguages() {
|
|
100
|
+
return Object.keys(TS_LANG_CONFIGS);
|
|
101
|
+
}
|