@shiftleftpt/sbd-toe-mcp 0.20.0 → 0.21.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.
Files changed (53) hide show
  1. package/README.md +2 -2
  2. package/dist/index.js +107 -266
  3. package/dist/index.js.map +1 -1
  4. package/dist/resources/sbd-toe-resources.js +1 -1
  5. package/dist/resources/sbd-toe-resources.js.map +1 -1
  6. package/dist/serving/adjacency.d.ts +68 -0
  7. package/dist/serving/adjacency.js +127 -0
  8. package/dist/serving/adjacency.js.map +1 -0
  9. package/dist/serving/affordances.js +4 -5
  10. package/dist/serving/affordances.js.map +1 -1
  11. package/dist/serving/agent-guide.js +5 -3
  12. package/dist/serving/agent-guide.js.map +1 -1
  13. package/dist/serving/behaviour-notes.d.ts +2 -2
  14. package/dist/serving/behaviour-notes.js +2 -8
  15. package/dist/serving/behaviour-notes.js.map +1 -1
  16. package/dist/serving/notes.d.ts +41 -0
  17. package/dist/serving/notes.js +43 -0
  18. package/dist/serving/notes.js.map +1 -0
  19. package/dist/serving/payload-ceilings.d.ts +73 -11
  20. package/dist/serving/payload-ceilings.js +85 -24
  21. package/dist/serving/payload-ceilings.js.map +1 -1
  22. package/dist/serving/response-shaping.d.ts +10 -0
  23. package/dist/serving/response-shaping.js +26 -0
  24. package/dist/serving/response-shaping.js.map +1 -1
  25. package/dist/serving/server-surface.d.ts +10 -0
  26. package/dist/serving/server-surface.js +14 -2
  27. package/dist/serving/server-surface.js.map +1 -1
  28. package/dist/serving/surface-history.d.ts +118 -0
  29. package/dist/serving/surface-history.js +119 -0
  30. package/dist/serving/surface-history.js.map +1 -0
  31. package/dist/tools/assess-implementation.d.ts +9 -0
  32. package/dist/tools/assess-implementation.js +7 -1
  33. package/dist/tools/assess-implementation.js.map +1 -1
  34. package/dist/tools/get-guide-by-role.d.ts +40 -0
  35. package/dist/tools/get-guide-by-role.js +158 -4
  36. package/dist/tools/get-guide-by-role.js.map +1 -1
  37. package/dist/tools/get-macro-processes.js +18 -8
  38. package/dist/tools/get-macro-processes.js.map +1 -1
  39. package/dist/tools/get-threat-landscape.js +11 -5
  40. package/dist/tools/get-threat-landscape.js.map +1 -1
  41. package/dist/tools/ontology-loader.d.ts +7 -0
  42. package/dist/tools/ontology-loader.js +2 -0
  43. package/dist/tools/ontology-loader.js.map +1 -1
  44. package/dist/tools/prepare-codegen-context.d.ts +339 -276
  45. package/dist/tools/prepare-codegen-context.js +454 -530
  46. package/dist/tools/prepare-codegen-context.js.map +1 -1
  47. package/dist/tools/resolve-entities.js +8 -4
  48. package/dist/tools/resolve-entities.js.map +1 -1
  49. package/dist/tools/select-requirements.d.ts +2 -1
  50. package/dist/tools/select-requirements.js +23 -8
  51. package/dist/tools/select-requirements.js.map +1 -1
  52. package/package.json +1 -1
  53. package/prompts/sbd-toe-grounded-codegen.md +11 -11
package/README.md CHANGED
@@ -105,14 +105,14 @@ All data is bundled locally. No Algolia, no internet connection required at runt
105
105
  - **Does** assemble deterministic context: activation trace, activated scope (requirements / controls / slices / regulatory obligations), AppSec Core v1 entities and relations, evidence patterns ranked by relevance, manual rastreabilidade entries, regulatory overlay entries, citation map, completeness report, LLM codegen instructions, and a `security_rationale_template` for the agent to fill.
106
106
  - **Does** apply an auditable scope gate before returning ready context (see below).
107
107
  - **Does NOT** generate code, edit files, or call an LLM. The tool returns context only.
108
- - **Does NOT** invent identifiers, slices, requirements, controls, obligations or evidence. Anything not in the `citation_map` did not surface in the deterministic resolvers.
108
+ - **Does NOT** invent identifiers, slices, requirements, controls, obligations or evidence. Anything not in `citations` (the inverted legal-id list, 0.21 §3) did not surface in the deterministic resolvers.
109
109
  - **Does NOT** declare regulatory compliance. Regulatory overlay is published as an external cross-check, never as a SbD-ToE conformance signal.
110
110
 
111
111
  ### Scope gate — four output states
112
112
 
113
113
  | Status | When | What the agent should do |
114
114
  |---|---|---|
115
- | `ready_for_codegen` | Task is bite-size (one technical surface, one phase, 1–3 concerns, ≤3 slice families) | Fill `security_rationale_template`, cite IDs from `citation_map`, produce code + tests + expected evidence |
115
+ | `ready_for_codegen` | Task is bite-size (one technical surface, one phase, 1–3 concerns, ≤3 slice families) | Fill `security_rationale_template`, cite IDs from `citations`, produce code + tests + expected evidence |
116
116
  | `needs_clarification` | Task missing/too short, no concerns activatable, ambiguous | STOP. Echo `reasons[]` and `suggestions[]` to the user; ask for the missing input before re-calling |
117
117
  | `needs_decomposition` | Vague pattern matched (e.g. "make secure"), >3 slice families, or >50 estimated v0 requirements | STOP. Propose 2–4 sub-tasks; let the user pick one; re-call for that sub-task |
118
118
  | `unsupported_scope` | Runtime v1 missing locally, overlay requested but absent, regulatory framework unknown | STOP. Report the missing capability verbatim. Do NOT fabricate IDs to keep working |