@shiftleftpt/sbd-toe-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/.env.example +35 -0
- package/LICENSE +201 -0
- package/README.md +323 -0
- package/data/publish/algolia_docs_records.json +148847 -0
- package/data/publish/algolia_docs_records_enriched.json +194004 -0
- package/data/publish/algolia_entities_records.json +74715 -0
- package/data/publish/algolia_entities_records_enriched.json +177587 -0
- package/data/publish/algolia_index_settings.json +102 -0
- package/data/publish/sbd-toe-index-compact.json +111 -0
- package/data/reports/run_manifest.json +10 -0
- package/dist/backend/semantic-index-gateway.d.ts +25 -0
- package/dist/backend/semantic-index-gateway.js +555 -0
- package/dist/backend/semantic-index-gateway.js.map +1 -0
- package/dist/backend/semantic-index-gateway.test.d.ts +1 -0
- package/dist/backend/semantic-index-gateway.test.js +384 -0
- package/dist/backend/semantic-index-gateway.test.js.map +1 -0
- package/dist/bootstrap/checkout-backend.d.ts +31 -0
- package/dist/bootstrap/checkout-backend.js +136 -0
- package/dist/bootstrap/checkout-backend.js.map +1 -0
- package/dist/bootstrap/checkout-backend.test.d.ts +1 -0
- package/dist/bootstrap/checkout-backend.test.js +158 -0
- package/dist/bootstrap/checkout-backend.test.js.map +1 -0
- package/dist/bootstrap/release-checkout.d.ts +8 -0
- package/dist/bootstrap/release-checkout.js +168 -0
- package/dist/bootstrap/release-checkout.js.map +1 -0
- package/dist/bootstrap/release-checkout.test.d.ts +1 -0
- package/dist/bootstrap/release-checkout.test.js +137 -0
- package/dist/bootstrap/release-checkout.test.js.map +1 -0
- package/dist/config.d.ts +4 -0
- package/dist/config.js +81 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1063 -0
- package/dist/index.js.map +1 -0
- package/dist/orchestrator/ask-manual.d.ts +13 -0
- package/dist/orchestrator/ask-manual.js +202 -0
- package/dist/orchestrator/ask-manual.js.map +1 -0
- package/dist/prompt/build-answer-prompt.d.ts +2 -0
- package/dist/prompt/build-answer-prompt.js +51 -0
- package/dist/prompt/build-answer-prompt.js.map +1 -0
- package/dist/prompt/system-prompt.d.ts +1 -0
- package/dist/prompt/system-prompt.js +94 -0
- package/dist/prompt/system-prompt.js.map +1 -0
- package/dist/resources/sbd-toe-resources.d.ts +18 -0
- package/dist/resources/sbd-toe-resources.js +164 -0
- package/dist/resources/sbd-toe-resources.js.map +1 -0
- package/dist/resources/sbd-toe-resources.test.d.ts +1 -0
- package/dist/resources/sbd-toe-resources.test.js +134 -0
- package/dist/resources/sbd-toe-resources.test.js.map +1 -0
- package/dist/test-utils.d.ts +153 -0
- package/dist/test-utils.js +176 -0
- package/dist/test-utils.js.map +1 -0
- package/dist/tools/generate-document.d.ts +22 -0
- package/dist/tools/generate-document.js +392 -0
- package/dist/tools/generate-document.js.map +1 -0
- package/dist/tools/generate-document.test.d.ts +1 -0
- package/dist/tools/generate-document.test.js +189 -0
- package/dist/tools/generate-document.test.js.map +1 -0
- package/dist/tools/map-review-scope.d.ts +20 -0
- package/dist/tools/map-review-scope.js +299 -0
- package/dist/tools/map-review-scope.js.map +1 -0
- package/dist/tools/map-review-scope.test.d.ts +1 -0
- package/dist/tools/map-review-scope.test.js +204 -0
- package/dist/tools/map-review-scope.test.js.map +1 -0
- package/dist/tools/plan-repo-governance.d.ts +41 -0
- package/dist/tools/plan-repo-governance.js +509 -0
- package/dist/tools/plan-repo-governance.js.map +1 -0
- package/dist/tools/plan-repo-governance.test.d.ts +1 -0
- package/dist/tools/plan-repo-governance.test.js +237 -0
- package/dist/tools/plan-repo-governance.test.js.map +1 -0
- package/dist/tools/structured-tools.d.ts +5 -0
- package/dist/tools/structured-tools.js +310 -0
- package/dist/tools/structured-tools.js.map +1 -0
- package/dist/tools/structured-tools.test.d.ts +1 -0
- package/dist/tools/structured-tools.test.js +459 -0
- package/dist/tools/structured-tools.test.js.map +1 -0
- package/dist/types.d.ts +160 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/upstream/backend-contract.d.ts +3 -0
- package/dist/upstream/backend-contract.js +37 -0
- package/dist/upstream/backend-contract.js.map +1 -0
- package/dist/validators/ai-disclosure.d.ts +39 -0
- package/dist/validators/ai-disclosure.js +183 -0
- package/dist/validators/ai-disclosure.js.map +1 -0
- package/dist/validators/ai-disclosure.test.d.ts +1 -0
- package/dist/validators/ai-disclosure.test.js +244 -0
- package/dist/validators/ai-disclosure.test.js.map +1 -0
- package/examples/claude-desktop.json +8 -0
- package/examples/vscode.mcp.json +9 -0
- package/package.json +50 -0
- package/prompts/sbd-toe-chat-system.md +71 -0
- package/smithery.yaml +44 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
{
|
|
2
|
+
"agent": "algolia_publish",
|
|
3
|
+
"generated_at": "2026-03-24T13:04:16Z",
|
|
4
|
+
"items": [
|
|
5
|
+
{
|
|
6
|
+
"base_index_name": "sbdtoe_askai_docs",
|
|
7
|
+
"index_name": "sbdtoe_askai_docs",
|
|
8
|
+
"record_family": "documents",
|
|
9
|
+
"settings": {
|
|
10
|
+
"attributesForFaceting": [
|
|
11
|
+
"filterOnly(collection_id)",
|
|
12
|
+
"filterOnly(chapter_id)",
|
|
13
|
+
"filterOnly(document_id)",
|
|
14
|
+
"filterOnly(semantic_layer)",
|
|
15
|
+
"filterOnly(classification)",
|
|
16
|
+
"filterOnly(is_primary_source)",
|
|
17
|
+
"filterOnly(related_roles)",
|
|
18
|
+
"filterOnly(related_risk_levels)",
|
|
19
|
+
"filterOnly(related_frameworks)"
|
|
20
|
+
],
|
|
21
|
+
"attributesToHighlight": [
|
|
22
|
+
"title",
|
|
23
|
+
"heading",
|
|
24
|
+
"document_title",
|
|
25
|
+
"chapter_title",
|
|
26
|
+
"content"
|
|
27
|
+
],
|
|
28
|
+
"attributesToSnippet": [
|
|
29
|
+
"content:20"
|
|
30
|
+
],
|
|
31
|
+
"customRanking": [
|
|
32
|
+
"asc(ask_ai_priority_rank)",
|
|
33
|
+
"desc(is_primary_source)",
|
|
34
|
+
"desc(confidence)"
|
|
35
|
+
],
|
|
36
|
+
"searchableAttributes": [
|
|
37
|
+
"unordered(title)",
|
|
38
|
+
"unordered(heading)",
|
|
39
|
+
"unordered(document_title)",
|
|
40
|
+
"unordered(chapter_title)",
|
|
41
|
+
"unordered(content)",
|
|
42
|
+
"unordered(heading_path)"
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"base_index_name": "sbdtoe_askai_entities",
|
|
48
|
+
"index_name": "sbdtoe_askai_entities",
|
|
49
|
+
"record_family": "entities",
|
|
50
|
+
"settings": {
|
|
51
|
+
"attributesForFaceting": [
|
|
52
|
+
"filterOnly(entity_type)",
|
|
53
|
+
"filterOnly(collection_id)",
|
|
54
|
+
"filterOnly(chapter_id)",
|
|
55
|
+
"filterOnly(related_roles)",
|
|
56
|
+
"filterOnly(related_phases)",
|
|
57
|
+
"filterOnly(risk_levels)",
|
|
58
|
+
"filterOnly(source_layers)",
|
|
59
|
+
"filterOnly(authority_level)",
|
|
60
|
+
"filterOnly(framework)"
|
|
61
|
+
],
|
|
62
|
+
"attributesToHighlight": [
|
|
63
|
+
"title",
|
|
64
|
+
"summary",
|
|
65
|
+
"searchable_text"
|
|
66
|
+
],
|
|
67
|
+
"customRanking": [
|
|
68
|
+
"desc(confidence)",
|
|
69
|
+
"asc(chapter_id)"
|
|
70
|
+
],
|
|
71
|
+
"searchableAttributes": [
|
|
72
|
+
"unordered(title)",
|
|
73
|
+
"unordered(summary)",
|
|
74
|
+
"unordered(searchable_text)",
|
|
75
|
+
"unordered(entity_type)"
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"run_id": "20260324T130416Z",
|
|
81
|
+
"source": {
|
|
82
|
+
"branch": "master",
|
|
83
|
+
"commit_sha": "e2465c6420d1cbb16208913ac5b24c35fa209e42",
|
|
84
|
+
"corpus_root": "manuals_src/docs/sbd-toe",
|
|
85
|
+
"repo_url": "git@github.com:Shiftleftpt/SbD-ToE-Manual.git"
|
|
86
|
+
},
|
|
87
|
+
"stats": {
|
|
88
|
+
"errors": 0,
|
|
89
|
+
"processed_files": 2,
|
|
90
|
+
"processed_sections": 0,
|
|
91
|
+
"skipped": 0,
|
|
92
|
+
"warnings": 0
|
|
93
|
+
},
|
|
94
|
+
"summary": {
|
|
95
|
+
"indices": 2,
|
|
96
|
+
"push_mode": "dry_run_records_ready"
|
|
97
|
+
},
|
|
98
|
+
"version": "0.1.0",
|
|
99
|
+
"warnings": [
|
|
100
|
+
"Dry-run materialization only; remote Algolia push was not requested."
|
|
101
|
+
]
|
|
102
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.0",
|
|
3
|
+
"generated_at": "2026-03-26T00:00:00Z",
|
|
4
|
+
"chapters": [
|
|
5
|
+
{
|
|
6
|
+
"chapterId": "00-fundamentos",
|
|
7
|
+
"readableTitle": "Fundamentos SbD-ToE",
|
|
8
|
+
"domains": ["governance", "foundation"],
|
|
9
|
+
"technologies": [],
|
|
10
|
+
"minLevel": "L1"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"chapterId": "01-classificacao-aplicacoes",
|
|
14
|
+
"readableTitle": "Classificação de Aplicações",
|
|
15
|
+
"domains": ["governance", "risk"],
|
|
16
|
+
"technologies": [],
|
|
17
|
+
"minLevel": "L1"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"chapterId": "02-requisitos-seguranca",
|
|
21
|
+
"readableTitle": "Requisitos de Segurança",
|
|
22
|
+
"domains": ["governance", "requirements"],
|
|
23
|
+
"technologies": [],
|
|
24
|
+
"minLevel": "L1"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"chapterId": "03-threat-modeling",
|
|
28
|
+
"readableTitle": "Threat Modeling",
|
|
29
|
+
"domains": ["risk", "architecture"],
|
|
30
|
+
"technologies": [],
|
|
31
|
+
"minLevel": "L1"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"chapterId": "04-arquitetura-segura",
|
|
35
|
+
"readableTitle": "Arquitetura Segura",
|
|
36
|
+
"domains": ["architecture", "design"],
|
|
37
|
+
"technologies": [],
|
|
38
|
+
"minLevel": "L1"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"chapterId": "05-dependencias-sbom-sca",
|
|
42
|
+
"readableTitle": "Dependências, SBOM e SCA",
|
|
43
|
+
"domains": ["supply-chain", "dependencies"],
|
|
44
|
+
"technologies": ["sca-sbom", "sast", "dast"],
|
|
45
|
+
"minLevel": "L1"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"chapterId": "06-desenvolvimento-seguro",
|
|
49
|
+
"readableTitle": "Desenvolvimento Seguro",
|
|
50
|
+
"domains": ["development", "coding"],
|
|
51
|
+
"technologies": [],
|
|
52
|
+
"minLevel": "L2"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"chapterId": "07-cicd-seguro",
|
|
56
|
+
"readableTitle": "CI/CD Seguro",
|
|
57
|
+
"domains": ["devops", "pipeline"],
|
|
58
|
+
"technologies": ["ci-cd"],
|
|
59
|
+
"minLevel": "L1"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"chapterId": "08-iac-infraestrutura",
|
|
63
|
+
"readableTitle": "IaC e Infraestrutura",
|
|
64
|
+
"domains": ["infrastructure", "iac"],
|
|
65
|
+
"technologies": ["iac", "containers", "kubernetes"],
|
|
66
|
+
"minLevel": "L1"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"chapterId": "09-containers-imagens",
|
|
70
|
+
"readableTitle": "Containers e Imagens",
|
|
71
|
+
"domains": ["infrastructure", "containers"],
|
|
72
|
+
"technologies": ["containers", "kubernetes"],
|
|
73
|
+
"minLevel": "L1"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"chapterId": "10-testes-seguranca",
|
|
77
|
+
"readableTitle": "Testes de Segurança",
|
|
78
|
+
"domains": ["testing", "quality"],
|
|
79
|
+
"technologies": ["sast", "dast"],
|
|
80
|
+
"minLevel": "L1"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"chapterId": "11-deploy-seguro",
|
|
84
|
+
"readableTitle": "Deploy Seguro",
|
|
85
|
+
"domains": ["deployment", "operations"],
|
|
86
|
+
"technologies": [],
|
|
87
|
+
"minLevel": "L2"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"chapterId": "12-monitorizacao-operacoes",
|
|
91
|
+
"readableTitle": "Monitorização e Operações",
|
|
92
|
+
"domains": ["operations", "observability"],
|
|
93
|
+
"technologies": ["monitoring"],
|
|
94
|
+
"minLevel": "L1"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"chapterId": "13-formacao-onboarding",
|
|
98
|
+
"readableTitle": "Formação e Onboarding",
|
|
99
|
+
"domains": ["training", "governance"],
|
|
100
|
+
"technologies": [],
|
|
101
|
+
"minLevel": "L3"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"chapterId": "14-governanca-contratacao",
|
|
105
|
+
"readableTitle": "Governança e Contratação",
|
|
106
|
+
"domains": ["governance", "compliance"],
|
|
107
|
+
"technologies": [],
|
|
108
|
+
"minLevel": "L1"
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"run_id": "20260324T130416Z",
|
|
3
|
+
"generated_at": "2026-03-24T13:04:16Z",
|
|
4
|
+
"branch": "master",
|
|
5
|
+
"commit_sha": "e2465c6420d1cbb16208913ac5b24c35fa209e42",
|
|
6
|
+
"corpus_root": "manuals_src/docs/sbd-toe",
|
|
7
|
+
"repo_url": "https://github.com/Shiftleftpt/SbD-ToE-Manual",
|
|
8
|
+
"sync_mode": "reuse",
|
|
9
|
+
"version": "0.1.0"
|
|
10
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { LooseRecord, NormalizedRecord, RetrievalBundle, RetrievalSource, SnapshotPayload } from "../types.js";
|
|
2
|
+
export interface EnrichedFields {
|
|
3
|
+
readonly aliases_pt_en?: readonly string[] | undefined;
|
|
4
|
+
readonly intent_topics?: readonly string[] | undefined;
|
|
5
|
+
readonly canonical_control_ids?: readonly string[] | undefined;
|
|
6
|
+
readonly artifact_ids?: readonly string[] | undefined;
|
|
7
|
+
readonly authority_level?: string | undefined;
|
|
8
|
+
}
|
|
9
|
+
export type EnrichedLookup = ReadonlyMap<string, EnrichedFields>;
|
|
10
|
+
export interface SnapshotCache {
|
|
11
|
+
docs: SnapshotPayload;
|
|
12
|
+
entities: SnapshotPayload;
|
|
13
|
+
docsEnrichedLookup: EnrichedLookup;
|
|
14
|
+
entitiesEnrichedLookup: EnrichedLookup;
|
|
15
|
+
}
|
|
16
|
+
export declare function buildEnrichedLookup(payload: SnapshotPayload): EnrichedLookup;
|
|
17
|
+
type QueryIntent = "repo_bootstrap" | "dependency_governance" | "ci_cd_gates" | "review_scope" | "canonical_guidance" | "generic";
|
|
18
|
+
export declare function expandQueryWithAliases(query: string): string;
|
|
19
|
+
export declare function classifyQueryIntent(query: string): QueryIntent;
|
|
20
|
+
export declare function computeIntentScore(record: Omit<NormalizedRecord, "localScore">, intent: QueryIntent, expandedTokens: string[]): number;
|
|
21
|
+
export declare function normalizeHit(hit: LooseRecord, source: RetrievalSource, indexName: string, rank: number, citationId: string, query: string, enrichedLookup?: EnrichedLookup): NormalizedRecord;
|
|
22
|
+
export declare function tryReadSnapshotFile(filePath: string): SnapshotPayload | undefined;
|
|
23
|
+
export declare function getSnapshotCache(): SnapshotCache;
|
|
24
|
+
export declare function retrievePublishedContext(query: string, topK?: number): Promise<RetrievalBundle>;
|
|
25
|
+
export {};
|