claude-flow-novice 2.18.13 → 2.18.14
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/.backups/unknown/1765417503_2999b9ec66f591dd76075617ec31fcea/metadata.json +8 -0
- package/.backups/unknown/1765417503_2999b9ec66f591dd76075617ec31fcea/original +3 -0
- package/.backups/unknown/1765417503_2999b9ec66f591dd76075617ec31fcea/revert.sh +7 -0
- package/.backups/unknown/1765417531_2999b9ec66f591dd76075617ec31fcea/metadata.json +8 -0
- package/.backups/unknown/1765417531_2999b9ec66f591dd76075617ec31fcea/original +3 -0
- package/.backups/unknown/1765417531_2999b9ec66f591dd76075617ec31fcea/revert.sh +7 -0
- package/.backups/unknown/1765417552_2999b9ec66f591dd76075617ec31fcea/metadata.json +8 -0
- package/.backups/unknown/1765417552_2999b9ec66f591dd76075617ec31fcea/original +3 -0
- package/.backups/unknown/1765417552_2999b9ec66f591dd76075617ec31fcea/revert.sh +7 -0
- package/.backups/unknown/1765417613_1f34dbf0fe1ec3b6cb74ba7c4e12a2a4/metadata.json +8 -0
- package/.backups/unknown/1765417613_1f34dbf0fe1ec3b6cb74ba7c4e12a2a4/original +1212 -0
- package/.backups/unknown/1765417613_1f34dbf0fe1ec3b6cb74ba7c4e12a2a4/revert.sh +7 -0
- package/.backups/unknown/1765417613_332e9bb223a26270398922640c1c1653/metadata.json +8 -0
- package/.backups/unknown/1765417613_332e9bb223a26270398922640c1c1653/original +1212 -0
- package/.backups/unknown/1765417613_332e9bb223a26270398922640c1c1653/revert.sh +7 -0
- package/.backups/unknown/1765417613_45880a7afef063347b701e7e88e2df9c/metadata.json +8 -0
- package/.backups/unknown/1765417613_45880a7afef063347b701e7e88e2df9c/original +1212 -0
- package/.backups/unknown/1765417613_45880a7afef063347b701e7e88e2df9c/revert.sh +7 -0
- package/.backups/unknown/1765417614_1b6c3b658c2891dbe245aea4bad41661/metadata.json +8 -0
- package/.backups/unknown/1765417614_1b6c3b658c2891dbe245aea4bad41661/original +1228 -0
- package/.backups/unknown/1765417614_1b6c3b658c2891dbe245aea4bad41661/revert.sh +7 -0
- package/.backups/unknown/1765417614_1ed5bd129f0b5d1b297a04ec5267ef62/metadata.json +8 -0
- package/.backups/unknown/1765417614_1ed5bd129f0b5d1b297a04ec5267ef62/original +1237 -0
- package/.backups/unknown/1765417614_1ed5bd129f0b5d1b297a04ec5267ef62/revert.sh +7 -0
- package/.backups/unknown/1765417614_28e032bd1b62dbfcecbd56327a0b0e23/metadata.json +8 -0
- package/.backups/unknown/1765417614_28e032bd1b62dbfcecbd56327a0b0e23/original +1240 -0
- package/.backups/unknown/1765417614_28e032bd1b62dbfcecbd56327a0b0e23/revert.sh +7 -0
- package/.backups/unknown/1765417614_40a1ce1b0efa2e1ba1958c27b2cbc557/metadata.json +8 -0
- package/.backups/unknown/1765417614_40a1ce1b0efa2e1ba1958c27b2cbc557/original +1216 -0
- package/.backups/unknown/1765417614_40a1ce1b0efa2e1ba1958c27b2cbc557/revert.sh +7 -0
- package/.backups/unknown/1765417614_f65dbf58cff7a9aa1c5c3d0d1618074a/metadata.json +8 -0
- package/.backups/unknown/1765417614_f65dbf58cff7a9aa1c5c3d0d1618074a/original +1238 -0
- package/.backups/unknown/1765417614_f65dbf58cff7a9aa1c5c3d0d1618074a/revert.sh +7 -0
- package/.backups/unknown/1765417615_0f45c28b9b8d5204974421c06075ff74/metadata.json +8 -0
- package/.backups/unknown/1765417615_0f45c28b9b8d5204974421c06075ff74/original +1167 -0
- package/.backups/unknown/1765417615_0f45c28b9b8d5204974421c06075ff74/revert.sh +7 -0
- package/.backups/unknown/1765417615_41d36156891ddb6f63d1b4da59d1db4c/metadata.json +8 -0
- package/.backups/unknown/1765417615_41d36156891ddb6f63d1b4da59d1db4c/original +1242 -0
- package/.backups/unknown/1765417615_41d36156891ddb6f63d1b4da59d1db4c/revert.sh +7 -0
- package/.backups/unknown/1765417709_77dda8631459cfc2ab94b8928f7d90b4/metadata.json +8 -0
- package/.backups/unknown/1765417709_77dda8631459cfc2ab94b8928f7d90b4/original +2 -0
- package/.backups/unknown/1765417709_77dda8631459cfc2ab94b8928f7d90b4/revert.sh +7 -0
- package/.backups/unknown/1765417775_1405837bacf112ba832a139840fe94e7/metadata.json +8 -0
- package/.backups/unknown/1765417775_1405837bacf112ba832a139840fe94e7/original +1169 -0
- package/.backups/unknown/1765417775_1405837bacf112ba832a139840fe94e7/revert.sh +7 -0
- package/.backups/unknown/1765417775_8044b4a5cfdcb5cd71317831ad53f5a2/metadata.json +8 -0
- package/.backups/unknown/1765417775_8044b4a5cfdcb5cd71317831ad53f5a2/original +1171 -0
- package/.backups/unknown/1765417775_8044b4a5cfdcb5cd71317831ad53f5a2/revert.sh +7 -0
- package/.backups/unknown/1765417775_8eb94d60151e1db262377fbf8a187212/metadata.json +8 -0
- package/.backups/unknown/1765417775_8eb94d60151e1db262377fbf8a187212/original +1170 -0
- package/.backups/unknown/1765417775_8eb94d60151e1db262377fbf8a187212/revert.sh +7 -0
- package/.backups/unknown/1765417776_a0d4b709e15e0bfa002c4b128f5e4603/metadata.json +8 -0
- package/.backups/unknown/1765417776_a0d4b709e15e0bfa002c4b128f5e4603/original +1173 -0
- package/.backups/unknown/1765417776_a0d4b709e15e0bfa002c4b128f5e4603/revert.sh +7 -0
- package/.backups/unknown/1765417776_cb1bc24d98b63564eb73ef782b8c68b3/metadata.json +8 -0
- package/.backups/unknown/1765417776_cb1bc24d98b63564eb73ef782b8c68b3/original +1170 -0
- package/.backups/unknown/1765417776_cb1bc24d98b63564eb73ef782b8c68b3/revert.sh +7 -0
- package/.backups/unknown/1765417777_1c4cc8c33f476f0c87c8efd4e34efc22/metadata.json +8 -0
- package/.backups/unknown/1765417777_1c4cc8c33f476f0c87c8efd4e34efc22/original +1172 -0
- package/.backups/unknown/1765417777_1c4cc8c33f476f0c87c8efd4e34efc22/revert.sh +7 -0
- package/.backups/unknown/1765417777_325de83ffd34544909b8b9aa6e18dd05/metadata.json +8 -0
- package/.backups/unknown/1765417777_325de83ffd34544909b8b9aa6e18dd05/original +1175 -0
- package/.backups/unknown/1765417777_325de83ffd34544909b8b9aa6e18dd05/revert.sh +7 -0
- package/.backups/unknown/1765417950_402e7c1a8956b56ac7b88e89f024acb4/metadata.json +8 -0
- package/.backups/unknown/1765417950_402e7c1a8956b56ac7b88e89f024acb4/original +1178 -0
- package/.backups/unknown/1765417950_402e7c1a8956b56ac7b88e89f024acb4/revert.sh +7 -0
- package/.backups/unknown/1765417950_647e27e4da18ae42c339e04b4d334feb/metadata.json +8 -0
- package/.backups/unknown/1765417950_647e27e4da18ae42c339e04b4d334feb/original +1174 -0
- package/.backups/unknown/1765417950_647e27e4da18ae42c339e04b4d334feb/revert.sh +7 -0
- package/.backups/unknown/1765417951_1424d2dd67b8c8a4e7cf649b379d21f2/metadata.json +8 -0
- package/.backups/unknown/1765417951_1424d2dd67b8c8a4e7cf649b379d21f2/original +1194 -0
- package/.backups/unknown/1765417951_1424d2dd67b8c8a4e7cf649b379d21f2/revert.sh +7 -0
- package/.backups/unknown/1765417951_6df070ca287ea94a7f08efc69ec9ea51/metadata.json +8 -0
- package/.backups/unknown/1765417951_6df070ca287ea94a7f08efc69ec9ea51/original +1186 -0
- package/.backups/unknown/1765417951_6df070ca287ea94a7f08efc69ec9ea51/revert.sh +7 -0
- package/.backups/unknown/1765417951_848919a1365f6536e5ef8d85d0c80fa7/metadata.json +8 -0
- package/.backups/unknown/1765417951_848919a1365f6536e5ef8d85d0c80fa7/original +1180 -0
- package/.backups/unknown/1765417951_848919a1365f6536e5ef8d85d0c80fa7/revert.sh +7 -0
- package/.backups/unknown/1765417951_b0d1d4ecf85ad10cda0f3900d414b608/metadata.json +8 -0
- package/.backups/unknown/1765417951_b0d1d4ecf85ad10cda0f3900d414b608/original +1198 -0
- package/.backups/unknown/1765417951_b0d1d4ecf85ad10cda0f3900d414b608/revert.sh +7 -0
- package/.backups/unknown/1765417952_2b720e213b5197cbaad53f9f0857f23f/metadata.json +8 -0
- package/.backups/unknown/1765417952_2b720e213b5197cbaad53f9f0857f23f/original +1202 -0
- package/.backups/unknown/1765417952_2b720e213b5197cbaad53f9f0857f23f/revert.sh +7 -0
- package/.backups/unknown/1765417952_ef1d15e8b83a802a0c0f0fc03e56a89c/metadata.json +8 -0
- package/.backups/unknown/1765417952_ef1d15e8b83a802a0c0f0fc03e56a89c/original +1202 -0
- package/.backups/unknown/1765417952_ef1d15e8b83a802a0c0f0fc03e56a89c/revert.sh +7 -0
- package/.backups/unknown/1765418048_ac94238a69a6f86a6ba9d31f623c18a7/metadata.json +8 -0
- package/.backups/unknown/1765418048_ac94238a69a6f86a6ba9d31f623c18a7/original +1209 -0
- package/.backups/unknown/1765418048_ac94238a69a6f86a6ba9d31f623c18a7/revert.sh +7 -0
- package/.backups/unknown/1765418048_f3afed98da63fef9ff57fb5646976f63/metadata.json +8 -0
- package/.backups/unknown/1765418048_f3afed98da63fef9ff57fb5646976f63/original +1207 -0
- package/.backups/unknown/1765418048_f3afed98da63fef9ff57fb5646976f63/revert.sh +7 -0
- package/.backups/unknown/1765418049_9c392702a4e1cace37d17f6f2dfaf54e/metadata.json +8 -0
- package/.backups/unknown/1765418049_9c392702a4e1cace37d17f6f2dfaf54e/original +1207 -0
- package/.backups/unknown/1765418049_9c392702a4e1cace37d17f6f2dfaf54e/revert.sh +7 -0
- package/.backups/unknown/1765418049_9e0777555b51dea4d24d0503b584cfc5/metadata.json +8 -0
- package/.backups/unknown/1765418049_9e0777555b51dea4d24d0503b584cfc5/original +1193 -0
- package/.backups/unknown/1765418049_9e0777555b51dea4d24d0503b584cfc5/revert.sh +7 -0
- package/.backups/unknown/1765418050_22d534bed68f9f5d883bee54e7cbc4d3/metadata.json +8 -0
- package/.backups/unknown/1765418050_22d534bed68f9f5d883bee54e7cbc4d3/original +1194 -0
- package/.backups/unknown/1765418050_22d534bed68f9f5d883bee54e7cbc4d3/revert.sh +7 -0
- package/.backups/unknown/1765418051_d9243722dc90dabc851c5767a62ac7f2/metadata.json +8 -0
- package/.backups/unknown/1765418051_d9243722dc90dabc851c5767a62ac7f2/original +1193 -0
- package/.backups/unknown/1765418051_d9243722dc90dabc851c5767a62ac7f2/revert.sh +7 -0
- package/.backups/unknown/1765418177_21a2fa816d25d419b54ef2d429aab474/metadata.json +8 -0
- package/.backups/unknown/1765418177_21a2fa816d25d419b54ef2d429aab474/original +1191 -0
- package/.backups/unknown/1765418177_21a2fa816d25d419b54ef2d429aab474/revert.sh +7 -0
- package/.backups/unknown/1765418177_33b673dce1eb59d7eb4f752aec882794/metadata.json +8 -0
- package/.backups/unknown/1765418177_33b673dce1eb59d7eb4f752aec882794/original +1190 -0
- package/.backups/unknown/1765418177_33b673dce1eb59d7eb4f752aec882794/revert.sh +7 -0
- package/.backups/unknown/1765418177_72568812ea5a73cf6861a6b14da065fa/metadata.json +8 -0
- package/.backups/unknown/1765418177_72568812ea5a73cf6861a6b14da065fa/original +1191 -0
- package/.backups/unknown/1765418177_72568812ea5a73cf6861a6b14da065fa/revert.sh +7 -0
- package/.backups/unknown/1765418178_20c28b95f12194fe4b81cfb35f4f3757/metadata.json +8 -0
- package/.backups/unknown/1765418178_20c28b95f12194fe4b81cfb35f4f3757/original +1189 -0
- package/.backups/unknown/1765418178_20c28b95f12194fe4b81cfb35f4f3757/revert.sh +7 -0
- package/.backups/unknown/1765418178_cdf68719cc09173769027743e2718ad4/metadata.json +8 -0
- package/.backups/unknown/1765418178_cdf68719cc09173769027743e2718ad4/original +1197 -0
- package/.backups/unknown/1765418178_cdf68719cc09173769027743e2718ad4/revert.sh +7 -0
- package/.backups/unknown/1765418178_eb19e0f8542405480e51af09fad84b71/metadata.json +8 -0
- package/.backups/unknown/1765418178_eb19e0f8542405480e51af09fad84b71/original +1190 -0
- package/.backups/unknown/1765418178_eb19e0f8542405480e51af09fad84b71/revert.sh +7 -0
- package/.backups/unknown/1765418236_c016507725847318a3c369b047cbb802/metadata.json +8 -0
- package/.backups/unknown/1765418236_c016507725847318a3c369b047cbb802/original +1197 -0
- package/.backups/unknown/1765418236_c016507725847318a3c369b047cbb802/revert.sh +7 -0
- package/.backups/unknown/1765418237_932c3cc3a5c537b7933c2370b65f4b39/metadata.json +8 -0
- package/.backups/unknown/1765418237_932c3cc3a5c537b7933c2370b65f4b39/original +1197 -0
- package/.backups/unknown/1765418237_932c3cc3a5c537b7933c2370b65f4b39/revert.sh +7 -0
- package/.claude/agents/cfn-dev-team/utility/epic-creator-v2.md +194 -2
- package/.claude/agents/cfn-dev-team/utility/epic-creator-v2.sh +264 -0
- package/.claude/agents/cfn-dev-team/utility/epic-creator-v2.sh.backup +698 -0
- package/.claude/hooks/README.md +148 -0
- package/.claude/hooks/SessionStart:cfn-load-openai-key.sh +35 -0
- package/.claude/hooks/cfn-invoke-pre-edit.sh +1 -1
- package/.claude/hooks/cfn-load-cerebras-env.sh +65 -0
- package/.claude/hooks/cfn-precompact-enhanced.sh +283 -0
- package/.claude/hooks/deprecated/README.md +27 -0
- package/.claude/settings.json +71 -6
- package/.claude/skills/cfn-cerebras-coordinator/QUICKSTART.md +348 -0
- package/.claude/skills/cfn-cerebras-coordinator/README.md +525 -0
- package/.claude/skills/cfn-cerebras-coordinator/TDD_COORDINATOR_OVERVIEW.md +284 -0
- package/.claude/skills/cfn-cerebras-coordinator/conversations/2025-12-10-py-v2-test-1733854200.json +36 -0
- package/.claude/skills/cfn-cerebras-coordinator/conversations/2025-12-10-py-v3-test-1765383241.json +36 -0
- package/.claude/skills/cfn-cerebras-coordinator/conversations/2025-12-10-rust-v2-test-1765381361.json +36 -0
- package/.claude/skills/cfn-cerebras-coordinator/conversations/2025-12-10-rust-v3-test-1765383242.json +46 -0
- package/.claude/skills/cfn-cerebras-coordinator/conversations/2025-12-10-ts-v2-test-1733864400.json +66 -0
- package/.claude/skills/cfn-cerebras-coordinator/conversations/2025-12-10-ts-v3-test-1765383238.json +66 -0
- package/.claude/skills/cfn-cerebras-coordinator/conversations/2025-12-10-ts-v4-test-1765386506.json +66 -0
- package/.claude/skills/cfn-cerebras-coordinator/conversations/2025-12-10-ts-v5-test-1765393100.json +66 -0
- package/.claude/skills/cfn-cerebras-coordinator/example-usage.sh +206 -0
- package/.claude/skills/cfn-cerebras-coordinator/lib/tdd-conversation-coordinator.ts +569 -0
- package/.claude/skills/cfn-cerebras-coordinator/test-tdd-coordinator.sh +250 -0
- package/.claude/skills/cfn-epic-creator/SKILL.md +392 -0
- package/.claude/skills/cfn-epic-creator/estimate-costs.sh +524 -0
- package/.claude/skills/cfn-epic-creator/invoke.sh +445 -0
- package/.claude/skills/cfn-epic-creator/parse-personas.sh +533 -0
- package/.claude/skills/cfn-epic-creator/security-utils.sh +268 -0
- package/.claude/skills/cfn-epic-creator/security-verification-demo.sh +127 -0
- package/.claude/skills/cfn-epic-creator/test-invoke.sh +620 -0
- package/.claude/skills/cfn-epic-creator/test-security-fixes.sh +195 -0
- package/.claude/skills/cfn-epic-creator/test-security-simple.sh +165 -0
- package/.claude/skills/cfn-epic-creator/validate-epic.sh +474 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/.backups/unknown/1765358428_2cf0ad7377232c919ff0a65630cb307d/metadata.json +8 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/.backups/unknown/1765358428_2cf0ad7377232c919ff0a65630cb307d/original +209 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/.backups/unknown/1765358428_2cf0ad7377232c919ff0a65630cb307d/revert.sh +7 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/AGENT_INTEGRATION_PATTERNS.md +255 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/Cargo.toml +8 -1
- package/.claude/skills/cfn-local-ruvector-accelerator/Cargo.toml.backup +47 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/EXTRACTION_EXAMPLES.md +287 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/README.md +2 -563
- package/.claude/skills/cfn-local-ruvector-accelerator/SCHEMA_V2_IMPLEMENTATION.md +151 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/SECURITY_IMPLEMENTATION.md +185 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/SKILL.md +8 -351
- package/.claude/skills/cfn-local-ruvector-accelerator/docs/EXECUTIVE_SUMMARY.txt +90 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/docs/PHASE_4_QUERY_API.md +210 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/docs/RUST_AST_EXTRACTOR_IMPLEMENTATION.md +222 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/docs/TRANSACTION_MANAGEMENT.md +241 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/docs/VALIDATION_FINDINGS.txt +250 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/epic-ast-indexer.json +335 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/index-code.sh +292 -96
- package/.claude/skills/cfn-local-ruvector-accelerator/index-code.sh.backup +249 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/index_all.sh +65 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/cli/find.rs +214 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/cli/index.rs +259 -103
- package/.claude/skills/cfn-local-ruvector-accelerator/src/cli/index_ast.rs +767 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/cli/index_modified.rs +37 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/cli/init.rs +17 -12
- package/.claude/skills/cfn-local-ruvector-accelerator/src/cli/migration.rs +34 -1
- package/.claude/skills/cfn-local-ruvector-accelerator/src/cli/mod.rs +6 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/cli/refs.rs +209 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/embeddings.rs +82 -33
- package/.claude/skills/cfn-local-ruvector-accelerator/src/extractors/mod.rs +251 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/extractors/rust.rs +425 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/extractors/rust_placeholder.rs +420 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/extractors/text_fallback.rs +490 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/extractors/typescript.rs +520 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/extractors/typescript_full.rs +531 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/lib.rs +20 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/main.rs +33 -2
- package/.claude/skills/cfn-local-ruvector-accelerator/src/main.rs.backup +360 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/migration.rs +325 -318
- package/.claude/skills/cfn-local-ruvector-accelerator/src/migration_backup.rs +325 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/migration_tx.rs +513 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/paths.rs +29 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/query_api.rs +609 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/schema_v2.rs +603 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/security_tests.rs +154 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/store_v2.rs +583 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/store_v2_backup.rs +560 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/store_v2_fixed.rs +0 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/store_v2_tx.rs +397 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/test_schema.rs +228 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/transaction_tests.rs +410 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/test_ast_indexing.rs +59 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/test_query_api.sh +103 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/test_schema.sql +158 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/test_schema_v2.sql +147 -0
- package/.claude/skills/cfn-mdap-context-injection/SKILL.md +31 -10
- package/.claude/skills/cfn-mdap-error-fixer/skill.md +15 -205
- package/.claude/skills/cfn-session-handoff/SKILL.md +1 -53
- package/.claude/skills/cfn-task-decomposition/SKILL.md +1 -0
- package/.claude/skills/cfn-task-intelligence/SKILL.md +39 -18
- package/.claude/skills/cfn-task-planning/SKILL.md +37 -12
- package/.claude/skills/cfn-validation-framework/SKILL.md +3 -60
- package/.claude/skills/cfn-vision-analysis/SKILL.md +3 -20
- package/.claude-flow/metrics/performance.json +3 -3
- package/.claude-flow/metrics/task-metrics.json +3 -3
- package/.ruvector/index_v2.db-shm +0 -0
- package/.ruvector/index_v2.db-wal +0 -0
- package/CLAUDE.md +9 -1
- package/README.md +56 -0
- package/docs/AGENT_PRODUCTION_FEEDBACK_PATTERNS.md +389 -0
- package/docs/CEREBRAS_TDD_COORDINATOR_TEST_RESULTS.md +213 -0
- package/docs/CEREBRAS_TDD_ROUND1_VS_ROUND2_COMPARISON.md +225 -0
- package/docs/CEREBRAS_TDD_ROUND3_FINAL_RESULTS.md +264 -0
- package/docs/EPIC_CREATOR_V2_ARCHITECTURE.md +629 -0
- package/docs/HOOKS_IMPLEMENTATION_PRIORITY.md +585 -0
- package/docs/SKILLS_HOOKS_INTEGRATION.md +1074 -0
- package/epic-with-personas-2025-12-09-17-15-13.json +253 -0
- package/package.json +2 -1
- package/test-epic-creator-security.sh +203 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/__pycache__/search_engine_v2.cpython-312.pyc +0 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/search_engine.py +0 -200
- package/jest.config.ts.cjs +0 -17
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-cerebras-code-generator/SKILL.md +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-cerebras-code-generator/context-analyzer.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-cerebras-code-generator/generate-code.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/SKILL.md +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/execute.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/INTEGRATION.md +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/SAMPLE_OUTPUTS.md +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/SKILL.md +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/capture-container-logs.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/enable-logging.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/init-hybrid-logging.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/queries/analytics-summary.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/queries/query-agent-timeline.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/queries/query-consensus-history.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/queries/query-coordination-timeline.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/queries/query-failed-containers.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/queries/query-gate-checks.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/schema.sql +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/sqlite-helpers.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/test-hybrid-logging.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/mcp/SKILL.md +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/mcp/skill-mcp-selector.js +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/orchestration/SKILL.md +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/orchestration/orchestrate.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/spawning/SKILL.md +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/spawning/spawn-agent.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/waves/SKILL.md +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/waves/cleanup-wave.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/waves/lib/docker-helpers.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/waves/monitor-wave.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/waves/spawn-wave.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-node-heap-sizer/SKILL.md +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-node-heap-sizer/task-mode-heap-limiter.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/deprecated/analyze-patterns.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/equation-solver/README.md +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/equation-solver/SECURITY.md +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/equation-solver/SKILL.md +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/equation-solver/package.json +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/equation-solver/solve.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/equation-solver/test-equation-solver-minimal.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/equation-solver/test-equation-solver.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/equation-solver/test.cjs +0 -0
- /package/.claude/hooks/{cfn-credential-scanner.sh → deprecated/cfn-credential-scanner.sh} +0 -0
- /package/.claude/hooks/{cfn-detect-hardcoded-credentials.sh → deprecated/cfn-detect-hardcoded-credentials.sh} +0 -0
- /package/.claude/hooks/{cfn-invoke-post-edit-ts.sh → deprecated/cfn-invoke-post-edit-ts.sh} +0 -0
- /package/.claude/hooks/{cfn-invoke-pre-edit-ts.sh → deprecated/cfn-invoke-pre-edit-ts.sh} +0 -0
- /package/.claude/hooks/{cfn-invoke-security-validation.sh → deprecated/cfn-invoke-security-validation.sh} +0 -0
- /package/.claude/hooks/{cfn-lint-sql-injection.sh → deprecated/cfn-lint-sql-injection.sh} +0 -0
- /package/.claude/hooks/{cfn-post-edit.sh → deprecated/cfn-post-edit.sh} +0 -0
- /package/.claude/hooks/{cfn-pre-edit-backup.sh → deprecated/cfn-pre-edit-backup.sh} +0 -0
- /package/.claude/skills/cfn-local-ruvector-accelerator/{embeddings_manager.py → embeddings_manager.py.backup} +0 -0
- /package/{.ruvector → .claude/skills/cfn-local-ruvector-accelerator/index}/index.bin +0 -0
- /package/{.ruvector → .claude/skills/cfn-local-ruvector-accelerator/index}/metadata.json +0 -0
- /package/.claude/skills/cfn-local-ruvector-accelerator/{search_engine_v2.py → search_engine_v2.py.backup} +0 -0
- /package/.claude/skills/cfn-local-ruvector-accelerator/{sqlite_store.py → sqlite_store.py.backup} +0 -0
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
//! AST extractors for different programming languages
|
|
2
|
+
//!
|
|
3
|
+
//! This module contains language-specific extractors that parse source code
|
|
4
|
+
//! using tree-sitter and extract structured information about entities and references.
|
|
5
|
+
|
|
6
|
+
use anyhow::Result;
|
|
7
|
+
use serde::{Deserialize, Serialize};
|
|
8
|
+
use std::collections::HashMap;
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
pub mod rust;
|
|
12
|
+
pub mod typescript;
|
|
13
|
+
pub mod text_fallback;
|
|
14
|
+
|
|
15
|
+
/// Create a Rust extractor instance
|
|
16
|
+
pub fn create_rust_extractor() -> Result<rust::RustExtractor> {
|
|
17
|
+
rust::RustExtractor::new()
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/// Create a TypeScript extractor instance
|
|
21
|
+
pub fn create_typescript_extractor() -> Result<typescript::TypeScriptExtractor> {
|
|
22
|
+
typescript::TypeScriptExtractor::new()
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/// Create a text fallback extractor instance
|
|
26
|
+
pub fn create_text_fallback_extractor() -> Result<text_fallback::TextFallbackExtractor> {
|
|
27
|
+
text_fallback::TextFallbackExtractor::new()
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/// Common entity kinds across languages
|
|
31
|
+
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
|
32
|
+
pub enum EntityKind {
|
|
33
|
+
// Functions
|
|
34
|
+
Function,
|
|
35
|
+
Method,
|
|
36
|
+
Constructor,
|
|
37
|
+
Getter,
|
|
38
|
+
Setter,
|
|
39
|
+
|
|
40
|
+
// Types
|
|
41
|
+
Class,
|
|
42
|
+
Interface,
|
|
43
|
+
Struct,
|
|
44
|
+
Enum,
|
|
45
|
+
TypeAlias,
|
|
46
|
+
Trait,
|
|
47
|
+
|
|
48
|
+
// Modules
|
|
49
|
+
Module,
|
|
50
|
+
Namespace,
|
|
51
|
+
|
|
52
|
+
// Variables
|
|
53
|
+
Variable,
|
|
54
|
+
Constant,
|
|
55
|
+
Parameter,
|
|
56
|
+
|
|
57
|
+
// Other
|
|
58
|
+
Import,
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
impl EntityKind {
|
|
62
|
+
pub fn as_str(&self) -> &'static str {
|
|
63
|
+
match self {
|
|
64
|
+
EntityKind::Function => "function",
|
|
65
|
+
EntityKind::Method => "method",
|
|
66
|
+
EntityKind::Constructor => "constructor",
|
|
67
|
+
EntityKind::Getter => "getter",
|
|
68
|
+
EntityKind::Setter => "setter",
|
|
69
|
+
EntityKind::Class => "class",
|
|
70
|
+
EntityKind::Interface => "interface",
|
|
71
|
+
EntityKind::Struct => "struct",
|
|
72
|
+
EntityKind::Enum => "enum",
|
|
73
|
+
EntityKind::TypeAlias => "typealias",
|
|
74
|
+
EntityKind::Trait => "trait",
|
|
75
|
+
EntityKind::Module => "module",
|
|
76
|
+
EntityKind::Namespace => "namespace",
|
|
77
|
+
EntityKind::Variable => "variable",
|
|
78
|
+
EntityKind::Constant => "constant",
|
|
79
|
+
EntityKind::Parameter => "parameter",
|
|
80
|
+
EntityKind::Import => "import",
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/// Reference kinds between entities
|
|
86
|
+
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
87
|
+
pub enum RefKind {
|
|
88
|
+
Calls, // Function calls
|
|
89
|
+
Extends, // Class inheritance
|
|
90
|
+
Implements, // Interface implementation
|
|
91
|
+
Imports, // Import statements
|
|
92
|
+
Uses, // Type usage
|
|
93
|
+
Instantiates, // Class instantiation (new)
|
|
94
|
+
Overrides, // Method overriding
|
|
95
|
+
Reads, // Variable read
|
|
96
|
+
Writes, // Variable write
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/// Visibility levels
|
|
100
|
+
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
101
|
+
pub enum Visibility {
|
|
102
|
+
Public,
|
|
103
|
+
Private,
|
|
104
|
+
Protected,
|
|
105
|
+
Internal,
|
|
106
|
+
FilePrivate,
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/// A extracted code entity
|
|
110
|
+
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
111
|
+
pub struct Entity {
|
|
112
|
+
pub id: String, // Unique identifier
|
|
113
|
+
pub kind: EntityKind, // Type of entity
|
|
114
|
+
pub name: String, // Entity name
|
|
115
|
+
pub file_path: String, // Source file path
|
|
116
|
+
pub line: usize, // Line number (0-indexed)
|
|
117
|
+
pub column: usize, // Column number (0-indexed)
|
|
118
|
+
pub signature: String, // Full signature including params/types
|
|
119
|
+
pub visibility: Visibility, // Visibility level
|
|
120
|
+
pub parent_id: Option<String>, // Parent entity if nested
|
|
121
|
+
pub metadata: HashMap<String, String>, // Language-specific metadata
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/// A reference between entities
|
|
125
|
+
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
126
|
+
pub struct Reference {
|
|
127
|
+
pub id: String, // Unique identifier
|
|
128
|
+
pub file_path: String, // Source file path
|
|
129
|
+
pub line: usize, // Line number (0-indexed)
|
|
130
|
+
pub column: usize, // Column number (0-indexed)
|
|
131
|
+
pub ref_kind: RefKind, // Type of reference
|
|
132
|
+
pub source_id: Option<String>, // Source entity (if applicable)
|
|
133
|
+
pub target_name: String, // Target entity name
|
|
134
|
+
pub target_file: Option<String>, // Target file if known
|
|
135
|
+
pub metadata: HashMap<String, String>, // Additional context
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/// Result of extraction
|
|
139
|
+
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
140
|
+
pub struct ExtractionResult {
|
|
141
|
+
pub entities: Vec<Entity>,
|
|
142
|
+
pub references: Vec<Reference>,
|
|
143
|
+
pub errors: Vec<String>,
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/// Trait for language-specific extractors
|
|
147
|
+
pub trait Extractor: Send + Sync {
|
|
148
|
+
/// Extract entities and references from source code
|
|
149
|
+
fn extract(&mut self, file_path: &str, source: &str) -> Result<ExtractionResult>;
|
|
150
|
+
|
|
151
|
+
/// Get the file extensions this extractor handles
|
|
152
|
+
fn extensions(&self) -> &[&str];
|
|
153
|
+
|
|
154
|
+
/// Get the language name
|
|
155
|
+
fn language(&self) -> &str;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/// Utility functions for extractors
|
|
159
|
+
pub mod utils {
|
|
160
|
+
use super::*;
|
|
161
|
+
|
|
162
|
+
use tree_sitter::Node;
|
|
163
|
+
|
|
164
|
+
/// Get the text content of a node
|
|
165
|
+
pub fn node_text<'a>(node: &Node, source: &'a str) -> &'a str {
|
|
166
|
+
&source[node.start_byte()..node.end_byte()]
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/// Get the text of a named child by field name
|
|
170
|
+
pub fn child_text<'a>(node: &Node, source: &'a str, field: &str) -> Option<&'a str> {
|
|
171
|
+
node.child_by_field_name(field)
|
|
172
|
+
.map(|child| node_text(&child, source))
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/// Extract identifier name from node
|
|
176
|
+
pub fn extract_name(node: &Node, source: &str) -> Option<String> {
|
|
177
|
+
let name_node = node.child_by_field_name("name")
|
|
178
|
+
.or_else(|| node.child_by_field_name("property"))
|
|
179
|
+
.or_else(|| node.child_by_field_name("binding"));
|
|
180
|
+
|
|
181
|
+
name_node.map(|n| node_text(&n, source).trim().to_string())
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/// Extract visibility from modifiers
|
|
185
|
+
pub fn extract_visibility(node: &Node, _source: &str, default: Visibility) -> Visibility {
|
|
186
|
+
// Check for visibility modifiers in children
|
|
187
|
+
let mut cursor = node.walk();
|
|
188
|
+
for child in node.children(&mut cursor) {
|
|
189
|
+
match child.kind() {
|
|
190
|
+
"public" | "export" => return Visibility::Public,
|
|
191
|
+
"private" => return Visibility::Private,
|
|
192
|
+
"protected" => return Visibility::Protected,
|
|
193
|
+
"internal" => return Visibility::Internal,
|
|
194
|
+
_ => {}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
default
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/// Generate unique ID for entity
|
|
201
|
+
pub fn generate_entity_id(file_path: &str, line: usize, name: &str) -> String {
|
|
202
|
+
format!("{}:{}:{}", file_path.replace(':', "_"), line, name)
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/// Generate unique ID for reference
|
|
206
|
+
pub fn generate_ref_id(file_path: &str, line: usize, column: usize) -> String {
|
|
207
|
+
format!("ref:{}:{}:{}", file_path.replace(':', "_"), line, column)
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/// Check if node is exported
|
|
211
|
+
pub fn is_exported(node: &Node) -> bool {
|
|
212
|
+
let mut cursor = node.walk();
|
|
213
|
+
for child in node.children(&mut cursor) {
|
|
214
|
+
if child.kind() == "export" || child.kind() == "export_statement" {
|
|
215
|
+
return true;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
false
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/// Extract type annotation
|
|
222
|
+
pub fn extract_type_annotation(node: &Node, source: &str) -> Option<String> {
|
|
223
|
+
if let Some(type_node) = node.child_by_field_name("type") {
|
|
224
|
+
Some(node_text(&type_node, source).trim().to_string())
|
|
225
|
+
} else {
|
|
226
|
+
None
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/// Extract parameters from a parameter list
|
|
231
|
+
pub fn extract_parameters(node: &Node, source: &str) -> Vec<(String, Option<String>)> {
|
|
232
|
+
let mut params = Vec::new();
|
|
233
|
+
|
|
234
|
+
if let Some(param_list) = node.child_by_field_name("parameters") {
|
|
235
|
+
let mut cursor = param_list.walk();
|
|
236
|
+
for child in param_list.named_children(&mut cursor) {
|
|
237
|
+
if child.kind() == "required_parameter"
|
|
238
|
+
|| child.kind() == "optional_parameter"
|
|
239
|
+
|| child.kind() == "rest_parameter"
|
|
240
|
+
|| child.kind() == "parameter" {
|
|
241
|
+
if let Some(name) = extract_name(&child, source) {
|
|
242
|
+
let type_annot = extract_type_annotation(&child, source);
|
|
243
|
+
params.push((name, type_annot));
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
params
|
|
250
|
+
}
|
|
251
|
+
}
|
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
//! Rust AST extractor implementation
|
|
2
|
+
//!
|
|
3
|
+
//! Extracts entities and references from Rust source code using tree-sitter-rust.
|
|
4
|
+
|
|
5
|
+
use anyhow::{Result, anyhow};
|
|
6
|
+
use crate::extractors::*;
|
|
7
|
+
use tree_sitter::{Parser, Node};
|
|
8
|
+
|
|
9
|
+
/// Rust extractor implementation
|
|
10
|
+
pub struct RustExtractor {
|
|
11
|
+
parser: Parser,
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
impl Clone for RustExtractor {
|
|
15
|
+
fn clone(&self) -> Self {
|
|
16
|
+
// Create a new parser instance since tree_sitter::Parser doesn't implement Clone
|
|
17
|
+
let mut parser = Parser::new();
|
|
18
|
+
// Note: we can't recover the language from the parser, so we set it again
|
|
19
|
+
parser.set_language(tree_sitter_rust::language()).ok();
|
|
20
|
+
Self { parser }
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
impl RustExtractor {
|
|
25
|
+
/// Create a new Rust extractor
|
|
26
|
+
pub fn new() -> Result<Self> {
|
|
27
|
+
let mut parser = Parser::new();
|
|
28
|
+
parser.set_language(tree_sitter_rust::language())?;
|
|
29
|
+
|
|
30
|
+
Ok(Self { parser })
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/// Extract function entity
|
|
34
|
+
fn extract_function(&self, node: &Node, source: &str, file_path: &str) -> Option<Entity> {
|
|
35
|
+
if node.kind() != "function_item" {
|
|
36
|
+
return None;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
let name = node.child_by_field_name("name")?;
|
|
40
|
+
let name_text = utils::node_text(&name, source);
|
|
41
|
+
|
|
42
|
+
let signature = source[node.start_byte()..node.end_byte()].to_string();
|
|
43
|
+
|
|
44
|
+
let visibility = if utils::extract_visibility(node, source, Visibility::Private) == Visibility::Public {
|
|
45
|
+
Visibility::Public
|
|
46
|
+
} else {
|
|
47
|
+
Visibility::Private
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
Some(Entity {
|
|
51
|
+
id: utils::generate_entity_id(file_path, node.start_position().row, name_text),
|
|
52
|
+
kind: EntityKind::Function,
|
|
53
|
+
name: name_text.to_string(),
|
|
54
|
+
file_path: file_path.to_string(),
|
|
55
|
+
line: node.start_position().row,
|
|
56
|
+
column: node.start_position().column,
|
|
57
|
+
signature,
|
|
58
|
+
visibility,
|
|
59
|
+
parent_id: None,
|
|
60
|
+
metadata: {
|
|
61
|
+
let mut meta = std::collections::HashMap::new();
|
|
62
|
+
|
|
63
|
+
// Extract parameters
|
|
64
|
+
if let Some(params) = node.child_by_field_name("parameters") {
|
|
65
|
+
let param_list = utils::extract_parameters(¶ms, source);
|
|
66
|
+
let param_names: Vec<String> = param_list.iter().map(|(name, _)| name.clone()).collect();
|
|
67
|
+
meta.insert("parameters".to_string(), param_names.join(", "));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Extract return type
|
|
71
|
+
if let Some(ret_type) = node.child_by_field_name("return_type") {
|
|
72
|
+
if let Some(type_text) = utils::extract_type_annotation(&ret_type, source) {
|
|
73
|
+
meta.insert("return_type".to_string(), type_text);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
meta
|
|
78
|
+
},
|
|
79
|
+
})
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/// Extract struct entity
|
|
83
|
+
fn extract_struct(&self, node: &Node, source: &str, file_path: &str) -> Option<Entity> {
|
|
84
|
+
if node.kind() != "struct_item" {
|
|
85
|
+
return None;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
let name = node.child_by_field_name("name")?;
|
|
89
|
+
let name_text = utils::node_text(&name, source);
|
|
90
|
+
|
|
91
|
+
let signature = source[node.start_byte()..node.end_byte()].to_string();
|
|
92
|
+
|
|
93
|
+
let visibility = if utils::extract_visibility(node, source, Visibility::Private) == Visibility::Public {
|
|
94
|
+
Visibility::Public
|
|
95
|
+
} else {
|
|
96
|
+
Visibility::Private
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
Some(Entity {
|
|
100
|
+
id: utils::generate_entity_id(file_path, node.start_position().row, name_text),
|
|
101
|
+
kind: EntityKind::Struct,
|
|
102
|
+
name: name_text.to_string(),
|
|
103
|
+
file_path: file_path.to_string(),
|
|
104
|
+
line: node.start_position().row,
|
|
105
|
+
column: node.start_position().column,
|
|
106
|
+
signature,
|
|
107
|
+
visibility,
|
|
108
|
+
parent_id: None,
|
|
109
|
+
metadata: {
|
|
110
|
+
let mut meta = std::collections::HashMap::new();
|
|
111
|
+
|
|
112
|
+
// Extract fields
|
|
113
|
+
if let Some(field_list) = node.child_by_field_name("body") {
|
|
114
|
+
let mut cursor = field_list.walk();
|
|
115
|
+
let mut field_num = 0;
|
|
116
|
+
for child in field_list.named_children(&mut cursor) {
|
|
117
|
+
if child.kind() == "field_declaration" {
|
|
118
|
+
if let Some(field_name) = utils::extract_name(&child, source) {
|
|
119
|
+
if let Some(field_type) = utils::extract_type_annotation(&child, source) {
|
|
120
|
+
meta.insert(format!("field_{}", field_num),
|
|
121
|
+
format!("{}: {}", field_name, field_type));
|
|
122
|
+
field_num += 1;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
meta
|
|
130
|
+
},
|
|
131
|
+
})
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/// Extract trait entity
|
|
135
|
+
fn extract_trait(&self, node: &Node, source: &str, file_path: &str) -> Option<Entity> {
|
|
136
|
+
if node.kind() != "trait_item" {
|
|
137
|
+
return None;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
let name = node.child_by_field_name("name")?;
|
|
141
|
+
let name_text = utils::node_text(&name, source);
|
|
142
|
+
|
|
143
|
+
let signature = source[node.start_byte()..node.end_byte()].to_string();
|
|
144
|
+
|
|
145
|
+
let visibility = if utils::extract_visibility(node, source, Visibility::Private) == Visibility::Public {
|
|
146
|
+
Visibility::Public
|
|
147
|
+
} else {
|
|
148
|
+
Visibility::Private
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
Some(Entity {
|
|
152
|
+
id: utils::generate_entity_id(file_path, node.start_position().row, name_text),
|
|
153
|
+
kind: EntityKind::Trait,
|
|
154
|
+
name: name_text.to_string(),
|
|
155
|
+
file_path: file_path.to_string(),
|
|
156
|
+
line: node.start_position().row,
|
|
157
|
+
column: node.start_position().column,
|
|
158
|
+
signature,
|
|
159
|
+
visibility,
|
|
160
|
+
parent_id: None,
|
|
161
|
+
metadata: std::collections::HashMap::new(),
|
|
162
|
+
})
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/// Extract impl block
|
|
166
|
+
fn extract_impl(&self, node: &Node, source: &str, file_path: &str) -> Option<Entity> {
|
|
167
|
+
if node.kind() != "impl_item" {
|
|
168
|
+
return None;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
let type_name = node.child_by_field_name("type")?;
|
|
172
|
+
let type_text = utils::node_text(&type_name, source);
|
|
173
|
+
|
|
174
|
+
let signature = source[node.start_byte()..node.end_byte()].to_string();
|
|
175
|
+
|
|
176
|
+
Some(Entity {
|
|
177
|
+
id: utils::generate_entity_id(file_path, node.start_position().row, type_text),
|
|
178
|
+
kind: EntityKind::Class, // Use Class for impl blocks
|
|
179
|
+
name: type_text.to_string(),
|
|
180
|
+
file_path: file_path.to_string(),
|
|
181
|
+
line: node.start_position().row,
|
|
182
|
+
column: node.start_position().column,
|
|
183
|
+
signature,
|
|
184
|
+
visibility: Visibility::Public,
|
|
185
|
+
parent_id: None,
|
|
186
|
+
metadata: {
|
|
187
|
+
let mut meta = std::collections::HashMap::new();
|
|
188
|
+
|
|
189
|
+
// Check if it's a trait implementation
|
|
190
|
+
if let Some(trait_type) = node.child_by_field_name("trait") {
|
|
191
|
+
let trait_text = utils::node_text(&trait_type, source);
|
|
192
|
+
meta.insert("trait".to_string(), trait_text.to_string());
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
meta
|
|
196
|
+
},
|
|
197
|
+
})
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/// Extract enum entity
|
|
201
|
+
fn extract_enum(&self, node: &Node, source: &str, file_path: &str) -> Option<Entity> {
|
|
202
|
+
if node.kind() != "enum_item" {
|
|
203
|
+
return None;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
let name = node.child_by_field_name("name")?;
|
|
207
|
+
let name_text = utils::node_text(&name, source);
|
|
208
|
+
|
|
209
|
+
let signature = source[node.start_byte()..node.end_byte()].to_string();
|
|
210
|
+
|
|
211
|
+
let visibility = if utils::extract_visibility(node, source, Visibility::Private) == Visibility::Public {
|
|
212
|
+
Visibility::Public
|
|
213
|
+
} else {
|
|
214
|
+
Visibility::Private
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
Some(Entity {
|
|
218
|
+
id: utils::generate_entity_id(file_path, node.start_position().row, name_text),
|
|
219
|
+
kind: EntityKind::Enum,
|
|
220
|
+
name: name_text.to_string(),
|
|
221
|
+
file_path: file_path.to_string(),
|
|
222
|
+
line: node.start_position().row,
|
|
223
|
+
column: node.start_position().column,
|
|
224
|
+
signature,
|
|
225
|
+
visibility,
|
|
226
|
+
parent_id: None,
|
|
227
|
+
metadata: std::collections::HashMap::new(),
|
|
228
|
+
})
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/// Extract references (function calls, type usage, etc.)
|
|
232
|
+
fn extract_references(&self, node: &Node, source: &str, file_path: &str) -> Vec<Reference> {
|
|
233
|
+
let mut references = Vec::new();
|
|
234
|
+
|
|
235
|
+
match node.kind() {
|
|
236
|
+
"call_expression" => {
|
|
237
|
+
// Extract function call reference
|
|
238
|
+
if let Some(func_node) = node.child_by_field_name("function") {
|
|
239
|
+
let func_text = utils::node_text(&func_node, source);
|
|
240
|
+
|
|
241
|
+
// Handle simple identifiers
|
|
242
|
+
if func_node.kind() == "identifier" {
|
|
243
|
+
references.push(Reference {
|
|
244
|
+
id: utils::generate_ref_id(file_path, node.start_position().row, node.start_position().column),
|
|
245
|
+
file_path: file_path.to_string(),
|
|
246
|
+
line: node.start_position().row,
|
|
247
|
+
column: node.start_position().column,
|
|
248
|
+
ref_kind: RefKind::Calls,
|
|
249
|
+
source_id: None,
|
|
250
|
+
target_name: func_text.to_string(),
|
|
251
|
+
target_file: None,
|
|
252
|
+
metadata: std::collections::HashMap::new(),
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
// Handle field expressions (e.g., module::function)
|
|
256
|
+
else if func_node.kind() == "field_expression" {
|
|
257
|
+
if let Some(field_node) = func_node.child_by_field_name("field") {
|
|
258
|
+
let field_text = utils::node_text(&field_node, source);
|
|
259
|
+
references.push(Reference {
|
|
260
|
+
id: utils::generate_ref_id(file_path, node.start_position().row, node.start_position().column),
|
|
261
|
+
file_path: file_path.to_string(),
|
|
262
|
+
line: node.start_position().row,
|
|
263
|
+
column: node.start_position().column,
|
|
264
|
+
ref_kind: RefKind::Calls,
|
|
265
|
+
source_id: None,
|
|
266
|
+
target_name: field_text.to_string(),
|
|
267
|
+
target_file: None,
|
|
268
|
+
metadata: std::collections::HashMap::new(),
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
"type_identifier" => {
|
|
276
|
+
// Extract type usage
|
|
277
|
+
let type_text = utils::node_text(&node, source);
|
|
278
|
+
references.push(Reference {
|
|
279
|
+
id: utils::generate_ref_id(file_path, node.start_position().row, node.start_position().column),
|
|
280
|
+
file_path: file_path.to_string(),
|
|
281
|
+
line: node.start_position().row,
|
|
282
|
+
column: node.start_position().column,
|
|
283
|
+
ref_kind: RefKind::Uses,
|
|
284
|
+
source_id: None,
|
|
285
|
+
target_name: type_text.to_string(),
|
|
286
|
+
target_file: None,
|
|
287
|
+
metadata: std::collections::HashMap::new(),
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
"use_declaration" => {
|
|
292
|
+
// Extract import reference
|
|
293
|
+
if let Some(path_node) = node.child_by_field_name("path") {
|
|
294
|
+
let path_text = utils::node_text(&path_node, source);
|
|
295
|
+
|
|
296
|
+
// Get the last segment of the path
|
|
297
|
+
let segments: Vec<&str> = path_text.split("::").collect();
|
|
298
|
+
if let Some(last_segment) = segments.last() {
|
|
299
|
+
references.push(Reference {
|
|
300
|
+
id: utils::generate_ref_id(file_path, node.start_position().row, node.start_position().column),
|
|
301
|
+
file_path: file_path.to_string(),
|
|
302
|
+
line: node.start_position().row,
|
|
303
|
+
column: node.start_position().column,
|
|
304
|
+
ref_kind: RefKind::Imports,
|
|
305
|
+
source_id: None,
|
|
306
|
+
target_name: last_segment.to_string(),
|
|
307
|
+
target_file: None,
|
|
308
|
+
metadata: {
|
|
309
|
+
let mut meta = std::collections::HashMap::new();
|
|
310
|
+
meta.insert("full_path".to_string(), path_text.to_string());
|
|
311
|
+
meta
|
|
312
|
+
},
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
_ => {}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
// Recursively check children
|
|
322
|
+
let mut cursor = node.walk();
|
|
323
|
+
for child in node.children(&mut cursor) {
|
|
324
|
+
references.extend(self.extract_references(&child, source, file_path));
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
references
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
impl Extractor for RustExtractor {
|
|
332
|
+
fn extract(&mut self, file_path: &str, source: &str) -> Result<ExtractionResult> {
|
|
333
|
+
let tree = self.parser.parse(source, None)
|
|
334
|
+
.ok_or_else(|| anyhow!("Failed to parse Rust code"))?;
|
|
335
|
+
|
|
336
|
+
let root = tree.root_node();
|
|
337
|
+
let mut entities = Vec::new();
|
|
338
|
+
let mut references = Vec::new();
|
|
339
|
+
let mut errors = Vec::new();
|
|
340
|
+
|
|
341
|
+
// Walk the tree and extract entities
|
|
342
|
+
let mut cursor = root.walk();
|
|
343
|
+
for node in root.children(&mut cursor) {
|
|
344
|
+
match node.kind() {
|
|
345
|
+
"function_item" => {
|
|
346
|
+
if let Some(entity) = self.extract_function(&node, source, file_path) {
|
|
347
|
+
entities.push(entity);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
"struct_item" => {
|
|
351
|
+
if let Some(entity) = self.extract_struct(&node, source, file_path) {
|
|
352
|
+
entities.push(entity);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
"trait_item" => {
|
|
356
|
+
if let Some(entity) = self.extract_trait(&node, source, file_path) {
|
|
357
|
+
entities.push(entity);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
"impl_item" => {
|
|
361
|
+
if let Some(entity) = self.extract_impl(&node, source, file_path) {
|
|
362
|
+
entities.push(entity);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
"enum_item" => {
|
|
366
|
+
if let Some(entity) = self.extract_enum(&node, source, file_path) {
|
|
367
|
+
entities.push(entity);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
"source_file" => {
|
|
371
|
+
// Recursively process the source file
|
|
372
|
+
let mut inner_cursor = node.walk();
|
|
373
|
+
for child in node.named_children(&mut inner_cursor) {
|
|
374
|
+
match child.kind() {
|
|
375
|
+
"function_item" => {
|
|
376
|
+
if let Some(entity) = self.extract_function(&child, source, file_path) {
|
|
377
|
+
entities.push(entity);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
"struct_item" => {
|
|
381
|
+
if let Some(entity) = self.extract_struct(&child, source, file_path) {
|
|
382
|
+
entities.push(entity);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
"trait_item" => {
|
|
386
|
+
if let Some(entity) = self.extract_trait(&child, source, file_path) {
|
|
387
|
+
entities.push(entity);
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
"impl_item" => {
|
|
391
|
+
if let Some(entity) = self.extract_impl(&child, source, file_path) {
|
|
392
|
+
entities.push(entity);
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
"enum_item" => {
|
|
396
|
+
if let Some(entity) = self.extract_enum(&child, source, file_path) {
|
|
397
|
+
entities.push(entity);
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
_ => {}
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
_ => {}
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
// Extract all references
|
|
409
|
+
references = self.extract_references(&root, source, file_path);
|
|
410
|
+
|
|
411
|
+
Ok(ExtractionResult {
|
|
412
|
+
entities,
|
|
413
|
+
references,
|
|
414
|
+
errors,
|
|
415
|
+
})
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
fn extensions(&self) -> &[&str] {
|
|
419
|
+
&["rs"]
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
fn language(&self) -> &str {
|
|
423
|
+
"rust"
|
|
424
|
+
}
|
|
425
|
+
}
|