@zivis/mcp 0.1.0-alpha.26 → 0.1.0-alpha.3

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 (328) hide show
  1. package/dist/api-client.d.ts +24 -1
  2. package/dist/api-client.js +52 -29
  3. package/dist/api-client.js.map +1 -0
  4. package/dist/auth/index.d.ts +22 -1
  5. package/dist/auth/index.js +38 -17
  6. package/dist/auth/index.js.map +1 -0
  7. package/dist/auth/jwt.d.ts +16 -0
  8. package/dist/auth/jwt.js +13 -0
  9. package/dist/auth/jwt.js.map +1 -0
  10. package/dist/auth/keychain.d.ts +32 -6
  11. package/dist/auth/keychain.js +114 -83
  12. package/dist/auth/keychain.js.map +1 -0
  13. package/dist/auth/oauth.d.ts +37 -2
  14. package/dist/auth/oauth.js +48 -38
  15. package/dist/auth/oauth.js.map +1 -0
  16. package/dist/auth/sessions.d.ts +25 -5
  17. package/dist/auth/sessions.js +39 -20
  18. package/dist/auth/sessions.js.map +1 -0
  19. package/dist/auth/token-refresh.d.ts +22 -2
  20. package/dist/auth/token-refresh.js +35 -32
  21. package/dist/auth/token-refresh.js.map +1 -0
  22. package/dist/cli.d.ts +18 -1
  23. package/dist/cli.js +908 -30
  24. package/dist/cli.js.map +1 -0
  25. package/dist/index.d.ts +6 -0
  26. package/dist/index.js +7 -0
  27. package/dist/index.js.map +1 -0
  28. package/dist/project-binding.d.ts +19 -2
  29. package/dist/project-binding.js +21 -38
  30. package/dist/project-binding.js.map +1 -0
  31. package/dist/resolve-application-id.d.ts +4 -0
  32. package/dist/resolve-application-id.js +5 -0
  33. package/dist/resolve-application-id.js.map +1 -0
  34. package/dist/sanitize.d.ts +21 -0
  35. package/dist/sanitize.js +41 -0
  36. package/dist/sanitize.js.map +1 -0
  37. package/dist/server.d.ts +13 -1
  38. package/dist/server.js +247 -122
  39. package/dist/server.js.map +1 -0
  40. package/dist/tools/check-project.d.ts +18 -5
  41. package/dist/tools/check-project.js +110 -122
  42. package/dist/tools/check-project.js.map +1 -0
  43. package/dist/tools/check-repo-trust.d.ts +19 -4
  44. package/dist/tools/check-repo-trust.js +47 -56
  45. package/dist/tools/check-repo-trust.js.map +1 -0
  46. package/dist/tools/create-diagram.d.ts +5 -0
  47. package/dist/tools/create-diagram.js +10 -0
  48. package/dist/tools/create-diagram.js.map +1 -0
  49. package/dist/tools/create-document.d.ts +5 -0
  50. package/dist/tools/create-document.js +6 -0
  51. package/dist/tools/create-document.js.map +1 -0
  52. package/dist/tools/discover-local-infra.d.ts +10 -0
  53. package/dist/tools/discover-local-infra.js +73 -3
  54. package/dist/tools/discover-local-infra.js.map +1 -0
  55. package/dist/tools/enterprise/capture-evidence.d.ts +54 -0
  56. package/dist/tools/enterprise/capture-evidence.js +72 -0
  57. package/dist/tools/enterprise/capture-evidence.js.map +1 -0
  58. package/dist/tools/enterprise/create-report-ticket.d.ts +34 -0
  59. package/dist/tools/enterprise/create-report-ticket.js +44 -0
  60. package/dist/tools/enterprise/create-report-ticket.js.map +1 -0
  61. package/dist/tools/enterprise/end-pentest-session.d.ts +33 -0
  62. package/dist/tools/enterprise/end-pentest-session.js +42 -0
  63. package/dist/tools/enterprise/end-pentest-session.js.map +1 -0
  64. package/dist/tools/enterprise/generate-report.d.ts +55 -0
  65. package/dist/tools/enterprise/generate-report.js +111 -0
  66. package/dist/tools/enterprise/generate-report.js.map +1 -0
  67. package/dist/tools/enterprise/get-org-zat.d.ts +5 -0
  68. package/dist/tools/enterprise/get-org-zat.js +6 -0
  69. package/dist/tools/enterprise/get-org-zat.js.map +1 -0
  70. package/dist/tools/enterprise/get-report-status.d.ts +27 -0
  71. package/dist/tools/enterprise/get-report-status.js +38 -0
  72. package/dist/tools/enterprise/get-report-status.js.map +1 -0
  73. package/dist/tools/enterprise/get-threat-model.d.ts +6 -1
  74. package/dist/tools/enterprise/get-threat-model.js +17 -52
  75. package/dist/tools/enterprise/get-threat-model.js.map +1 -0
  76. package/dist/tools/enterprise/list-agents.d.ts +42 -0
  77. package/dist/tools/enterprise/list-agents.js +95 -0
  78. package/dist/tools/enterprise/list-agents.js.map +1 -0
  79. package/dist/tools/enterprise/list-report-issues.d.ts +36 -0
  80. package/dist/tools/enterprise/list-report-issues.js +50 -0
  81. package/dist/tools/enterprise/list-report-issues.js.map +1 -0
  82. package/dist/tools/enterprise/list-threat-models.d.ts +5 -0
  83. package/dist/tools/enterprise/list-threat-models.js +8 -0
  84. package/dist/tools/enterprise/list-threat-models.js.map +1 -0
  85. package/dist/tools/enterprise/manage-actor.d.ts +6 -1
  86. package/dist/tools/enterprise/manage-actor.js +7 -14
  87. package/dist/tools/enterprise/manage-actor.js.map +1 -0
  88. package/dist/tools/enterprise/manage-attack-scenario.d.ts +6 -1
  89. package/dist/tools/enterprise/manage-attack-scenario.js +7 -13
  90. package/dist/tools/enterprise/manage-attack-scenario.js.map +1 -0
  91. package/dist/tools/enterprise/manage-component.d.ts +6 -1
  92. package/dist/tools/enterprise/manage-component.js +7 -20
  93. package/dist/tools/enterprise/manage-component.js.map +1 -0
  94. package/dist/tools/enterprise/manage-data-asset.d.ts +7 -2
  95. package/dist/tools/enterprise/manage-data-asset.js +7 -17
  96. package/dist/tools/enterprise/manage-data-asset.js.map +1 -0
  97. package/dist/tools/enterprise/manage-data-flow.d.ts +7 -2
  98. package/dist/tools/enterprise/manage-data-flow.js +7 -19
  99. package/dist/tools/enterprise/manage-data-flow.js.map +1 -0
  100. package/dist/tools/enterprise/manage-finding.d.ts +69 -0
  101. package/dist/tools/enterprise/manage-finding.js +106 -0
  102. package/dist/tools/enterprise/manage-finding.js.map +1 -0
  103. package/dist/tools/enterprise/manage-security-control.d.ts +6 -1
  104. package/dist/tools/enterprise/manage-security-control.js +7 -18
  105. package/dist/tools/enterprise/manage-security-control.js.map +1 -0
  106. package/dist/tools/enterprise/manage-test-case.d.ts +7 -2
  107. package/dist/tools/enterprise/manage-test-case.js +6 -8
  108. package/dist/tools/enterprise/manage-test-case.js.map +1 -0
  109. package/dist/tools/enterprise/promote-finding-to-issue.d.ts +36 -0
  110. package/dist/tools/enterprise/promote-finding-to-issue.js +65 -0
  111. package/dist/tools/enterprise/promote-finding-to-issue.js.map +1 -0
  112. package/dist/tools/enterprise/publish-report-version.d.ts +34 -0
  113. package/dist/tools/enterprise/publish-report-version.js +75 -0
  114. package/dist/tools/enterprise/publish-report-version.js.map +1 -0
  115. package/dist/tools/enterprise/publish-test-to-library.d.ts +31 -0
  116. package/dist/tools/enterprise/publish-test-to-library.js +40 -0
  117. package/dist/tools/enterprise/publish-test-to-library.js.map +1 -0
  118. package/dist/tools/enterprise/record-test-result.d.ts +67 -0
  119. package/dist/tools/enterprise/record-test-result.js +75 -0
  120. package/dist/tools/enterprise/record-test-result.js.map +1 -0
  121. package/dist/tools/enterprise/start-pentest-session.d.ts +35 -0
  122. package/dist/tools/enterprise/start-pentest-session.js +50 -0
  123. package/dist/tools/enterprise/start-pentest-session.js.map +1 -0
  124. package/dist/tools/enterprise/sync-report-section.d.ts +41 -0
  125. package/dist/tools/enterprise/sync-report-section.js +79 -0
  126. package/dist/tools/enterprise/sync-report-section.js.map +1 -0
  127. package/dist/tools/enterprise/update-report-issue.d.ts +55 -0
  128. package/dist/tools/enterprise/update-report-issue.js +69 -0
  129. package/dist/tools/enterprise/update-report-issue.js.map +1 -0
  130. package/dist/tools/generate-diagram.d.ts +6 -0
  131. package/dist/tools/generate-diagram.js +9 -0
  132. package/dist/tools/generate-diagram.js.map +1 -0
  133. package/dist/tools/get-agent-test-results.d.ts +41 -0
  134. package/dist/tools/get-agent-test-results.js +86 -0
  135. package/dist/tools/get-agent-test-results.js.map +1 -0
  136. package/dist/tools/get-application-overview.d.ts +5 -0
  137. package/dist/tools/get-application-overview.js +6 -0
  138. package/dist/tools/get-application-overview.js.map +1 -0
  139. package/dist/tools/get-application.d.ts +5 -0
  140. package/dist/tools/get-application.js +6 -0
  141. package/dist/tools/get-application.js.map +1 -0
  142. package/dist/tools/get-artifact-content.d.ts +29 -0
  143. package/dist/tools/get-artifact-content.js +86 -0
  144. package/dist/tools/get-artifact-content.js.map +1 -0
  145. package/dist/tools/get-diagram.d.ts +5 -0
  146. package/dist/tools/get-diagram.js +11 -1
  147. package/dist/tools/get-diagram.js.map +1 -0
  148. package/dist/tools/get-document.d.ts +5 -0
  149. package/dist/tools/get-document.js +6 -0
  150. package/dist/tools/get-document.js.map +1 -0
  151. package/dist/tools/get-finding-details.d.ts +28 -0
  152. package/dist/tools/get-finding-details.js +43 -0
  153. package/dist/tools/get-finding-details.js.map +1 -0
  154. package/dist/tools/get-findings.d.ts +57 -0
  155. package/dist/tools/get-findings.js +103 -0
  156. package/dist/tools/get-findings.js.map +1 -0
  157. package/dist/tools/get-oss-zat.d.ts +5 -0
  158. package/dist/tools/get-oss-zat.js +7 -0
  159. package/dist/tools/get-oss-zat.js.map +1 -0
  160. package/dist/tools/get-recon-scan.d.ts +27 -0
  161. package/dist/tools/get-recon-scan.js +46 -0
  162. package/dist/tools/get-recon-scan.js.map +1 -0
  163. package/dist/tools/get-scan-output.d.ts +27 -0
  164. package/dist/tools/get-scan-output.js +64 -0
  165. package/dist/tools/get-scan-output.js.map +1 -0
  166. package/dist/tools/get-scenario-details.d.ts +27 -0
  167. package/dist/tools/get-scenario-details.js +46 -0
  168. package/dist/tools/get-scenario-details.js.map +1 -0
  169. package/dist/tools/get-test-case-results.d.ts +37 -0
  170. package/dist/tools/get-test-case-results.js +66 -0
  171. package/dist/tools/get-test-case-results.js.map +1 -0
  172. package/dist/tools/get-test-details.d.ts +29 -0
  173. package/dist/tools/get-test-details.js +49 -0
  174. package/dist/tools/get-test-details.js.map +1 -0
  175. package/dist/tools/get-trust-keys.d.ts +5 -0
  176. package/dist/tools/get-trust-keys.js +6 -0
  177. package/dist/tools/get-trust-keys.js.map +1 -0
  178. package/dist/tools/import-openapi-endpoints.d.ts +5 -0
  179. package/dist/tools/import-openapi-endpoints.js +6 -0
  180. package/dist/tools/import-openapi-endpoints.js.map +1 -0
  181. package/dist/tools/inspect-zat.d.ts +5 -0
  182. package/dist/tools/inspect-zat.js +19 -0
  183. package/dist/tools/inspect-zat.js.map +1 -0
  184. package/dist/tools/list-agent-test-cases.d.ts +41 -0
  185. package/dist/tools/list-agent-test-cases.js +73 -0
  186. package/dist/tools/list-agent-test-cases.js.map +1 -0
  187. package/dist/tools/list-applications.d.ts +6 -1
  188. package/dist/tools/list-applications.js +6 -0
  189. package/dist/tools/list-applications.js.map +1 -0
  190. package/dist/tools/list-diagrams.d.ts +5 -0
  191. package/dist/tools/list-diagrams.js +6 -0
  192. package/dist/tools/list-diagrams.js.map +1 -0
  193. package/dist/tools/list-documents.d.ts +5 -0
  194. package/dist/tools/list-documents.js +6 -0
  195. package/dist/tools/list-documents.js.map +1 -0
  196. package/dist/tools/list-endpoints.d.ts +5 -0
  197. package/dist/tools/list-endpoints.js +6 -0
  198. package/dist/tools/list-endpoints.js.map +1 -0
  199. package/dist/tools/list-recon-scans.d.ts +36 -0
  200. package/dist/tools/list-recon-scans.js +74 -0
  201. package/dist/tools/list-recon-scans.js.map +1 -0
  202. package/dist/tools/list-scan-artifacts.d.ts +41 -0
  203. package/dist/tools/list-scan-artifacts.js +63 -0
  204. package/dist/tools/list-scan-artifacts.js.map +1 -0
  205. package/dist/tools/list-scans.d.ts +44 -0
  206. package/dist/tools/list-scans.js +91 -0
  207. package/dist/tools/list-scans.js.map +1 -0
  208. package/dist/tools/list-test-library.d.ts +44 -0
  209. package/dist/tools/list-test-library.js +83 -0
  210. package/dist/tools/list-test-library.js.map +1 -0
  211. package/dist/tools/list-test-scenarios.d.ts +31 -0
  212. package/dist/tools/list-test-scenarios.js +66 -0
  213. package/dist/tools/list-test-scenarios.js.map +1 -0
  214. package/dist/tools/local-scan.d.ts +40 -0
  215. package/dist/tools/local-scan.js +261 -0
  216. package/dist/tools/local-scan.js.map +1 -0
  217. package/dist/tools/manage-diagram.d.ts +5 -0
  218. package/dist/tools/manage-diagram.js +16 -0
  219. package/dist/tools/manage-diagram.js.map +1 -0
  220. package/dist/tools/open-in-ide.d.ts +13 -1
  221. package/dist/tools/open-in-ide.js +13 -0
  222. package/dist/tools/open-in-ide.js.map +1 -0
  223. package/dist/tools/run-test-scenario.d.ts +37 -0
  224. package/dist/tools/run-test-scenario.js +70 -0
  225. package/dist/tools/run-test-scenario.js.map +1 -0
  226. package/dist/tools/scan-pr.d.ts +27 -0
  227. package/dist/tools/scan-pr.js +51 -0
  228. package/dist/tools/scan-pr.js.map +1 -0
  229. package/dist/tools/security-review.d.ts +16 -0
  230. package/dist/tools/security-review.js +77 -63
  231. package/dist/tools/security-review.js.map +1 -0
  232. package/dist/tools/setup-red-team-target.d.ts +79 -0
  233. package/dist/tools/setup-red-team-target.js +430 -0
  234. package/dist/tools/setup-red-team-target.js.map +1 -0
  235. package/dist/tools/triage-finding.d.ts +47 -0
  236. package/dist/tools/triage-finding.js +116 -0
  237. package/dist/tools/triage-finding.js.map +1 -0
  238. package/dist/tools/update-document.d.ts +5 -0
  239. package/dist/tools/update-document.js +6 -0
  240. package/dist/tools/update-document.js.map +1 -0
  241. package/dist/tools/update-endpoint.d.ts +5 -0
  242. package/dist/tools/update-endpoint.js +7 -0
  243. package/dist/tools/update-endpoint.js.map +1 -0
  244. package/dist/tools/update-mermaid-source.d.ts +13 -0
  245. package/dist/tools/update-mermaid-source.js +14 -0
  246. package/dist/tools/update-mermaid-source.js.map +1 -0
  247. package/dist/tools/verify-trust-mark.d.ts +5 -0
  248. package/dist/tools/verify-trust-mark.js +6 -0
  249. package/dist/tools/verify-trust-mark.js.map +1 -0
  250. package/dist/types.d.ts +14 -14
  251. package/dist/types.js +28 -22
  252. package/dist/types.js.map +1 -0
  253. package/package.json +4 -24
  254. package/LICENSE +0 -201
  255. package/README.md +0 -19
  256. package/dist/lib/inspect-cache.d.ts +0 -10
  257. package/dist/lib/inspect-cache.js +0 -75
  258. package/dist/lib/next-steps.d.ts +0 -27
  259. package/dist/lib/next-steps.js +0 -21
  260. package/dist/matcher/ast-eval.d.ts +0 -8
  261. package/dist/matcher/ast-eval.js +0 -95
  262. package/dist/matcher/finding.d.ts +0 -55
  263. package/dist/matcher/finding.js +0 -1
  264. package/dist/matcher/index.d.ts +0 -8
  265. package/dist/matcher/index.js +0 -202
  266. package/dist/matcher/inference-candidates.d.ts +0 -26
  267. package/dist/matcher/inference-candidates.js +0 -81
  268. package/dist/matcher/walker.d.ts +0 -7
  269. package/dist/matcher/walker.js +0 -71
  270. package/dist/pattern-pack/index.d.ts +0 -125
  271. package/dist/pattern-pack/index.js +0 -189
  272. package/dist/pattern-packs/zivis-public-0.2.0/capsules/agents/privilege-separation.yaml +0 -224
  273. package/dist/pattern-packs/zivis-public-0.2.0/capsules/prompting/self-consistency-no-isolation.yaml +0 -237
  274. package/dist/pattern-packs/zivis-public-0.2.0/capsules/retrieval/context-injection-no-validator.yaml +0 -348
  275. package/dist/pattern-packs/zivis-public-0.2.0/capsules/security/late-org-filter.yaml +0 -266
  276. package/dist/pattern-packs/zivis-public-0.2.0/controls/external_validator_on_facts.yaml +0 -37
  277. package/dist/pattern-packs/zivis-public-0.2.0/controls/fact_validator_present.yaml +0 -68
  278. package/dist/pattern-packs/zivis-public-0.2.0/controls/human_approval_gate.yaml +0 -44
  279. package/dist/pattern-packs/zivis-public-0.2.0/controls/langgraph_state_machine_with_per_node_tools.yaml +0 -35
  280. package/dist/pattern-packs/zivis-public-0.2.0/controls/per_sample_retrieval_diversification.yaml +0 -38
  281. package/dist/pattern-packs/zivis-public-0.2.0/controls/prisma_extension_or_middleware_attaching_org_filter.yaml +0 -31
  282. package/dist/pattern-packs/zivis-public-0.2.0/controls/row_level_security_policy.yaml +0 -37
  283. package/dist/pattern-packs/zivis-public-0.2.0/controls/source_attribution_present.yaml +0 -58
  284. package/dist/pattern-packs/zivis-public-0.2.0/manifest.json +0 -167
  285. package/dist/pattern-packs/zivis-public-0.2.0/prompts/agents/privilege-separation/identify.md +0 -54
  286. package/dist/pattern-packs/zivis-public-0.2.0/prompts/prompting/self-consistency-no-isolation/identify.md +0 -60
  287. package/dist/pattern-packs/zivis-public-0.2.0/prompts/retrieval/context-injection-no-validator/identify.md +0 -109
  288. package/dist/pattern-packs/zivis-public-0.2.0/prompts/security/late-org-filter/identify.md +0 -78
  289. package/dist/prompts/audit-dependencies.d.ts +0 -2
  290. package/dist/prompts/audit-dependencies.js +0 -47
  291. package/dist/prompts/getting-started.d.ts +0 -2
  292. package/dist/prompts/getting-started.js +0 -37
  293. package/dist/prompts/index.d.ts +0 -2
  294. package/dist/prompts/index.js +0 -6
  295. package/dist/tools/enterprise/get-threat-model-artifact.d.ts +0 -24
  296. package/dist/tools/enterprise/get-threat-model-artifact.js +0 -68
  297. package/dist/tools/enterprise/list-attack-scenarios.d.ts +0 -24
  298. package/dist/tools/enterprise/list-attack-scenarios.js +0 -63
  299. package/dist/tools/enterprise/list-attack-step-library-tests.d.ts +0 -24
  300. package/dist/tools/enterprise/list-attack-step-library-tests.js +0 -55
  301. package/dist/tools/enterprise/list-threat-model-artifacts.d.ts +0 -55
  302. package/dist/tools/enterprise/list-threat-model-artifacts.js +0 -108
  303. package/dist/tools/enterprise/list-threat-model-review-items.d.ts +0 -30
  304. package/dist/tools/enterprise/list-threat-model-review-items.js +0 -54
  305. package/dist/tools/enterprise/list-threat-model-versions.d.ts +0 -24
  306. package/dist/tools/enterprise/list-threat-model-versions.js +0 -54
  307. package/dist/tools/enterprise/manage-threat-model-analysis.d.ts +0 -44
  308. package/dist/tools/enterprise/manage-threat-model-analysis.js +0 -83
  309. package/dist/tools/enterprise/manage-threat-model-review.d.ts +0 -38
  310. package/dist/tools/enterprise/manage-threat-model-review.js +0 -72
  311. package/dist/tools/get-started.d.ts +0 -18
  312. package/dist/tools/get-started.js +0 -470
  313. package/dist/tools/inspect.d.ts +0 -21
  314. package/dist/tools/inspect.js +0 -222
  315. package/dist/tools/manage-application.d.ts +0 -64
  316. package/dist/tools/manage-application.js +0 -129
  317. package/dist/tools/manage-endpoint-lifecycle.d.ts +0 -80
  318. package/dist/tools/manage-endpoint-lifecycle.js +0 -180
  319. package/dist/tools/threat-get-capsule.d.ts +0 -15
  320. package/dist/tools/threat-get-capsule.js +0 -53
  321. package/dist/tools/threat-get-inference-prompt.d.ts +0 -15
  322. package/dist/tools/threat-get-inference-prompt.js +0 -73
  323. package/dist/tools/threat-guide.d.ts +0 -28
  324. package/dist/tools/threat-guide.js +0 -175
  325. package/dist/tools/threat-list-relevant-capsules.d.ts +0 -17
  326. package/dist/tools/threat-list-relevant-capsules.js +0 -158
  327. package/dist/tools/threat-run-matcher.d.ts +0 -17
  328. package/dist/tools/threat-run-matcher.js +0 -145
@@ -1,72 +0,0 @@
1
- import { z } from "zod";
2
- import { sanitizeResponse } from "../../sanitize.js";
3
- export const MANAGE_THREAT_MODEL_REVIEW_NAME = "zivis_manage_threat_model_review";
4
- export const MANAGE_THREAT_MODEL_REVIEW_DESCRIPTION = `Accept or reject pending AI-generated threat model review items.
5
-
6
- Actions:
7
- - accept_item: accept one pending item
8
- - reject_item: reject one pending item
9
- - accept_all: accept all pending items
10
- - reject_all: reject all pending items`;
11
- export const MANAGE_THREAT_MODEL_REVIEW_SCHEMA = {
12
- threat_model_id: z
13
- .string()
14
- .describe("Threat model UUID (from zivis_list_threat_models)"),
15
- action: z
16
- .enum(["accept_item", "reject_item", "accept_all", "reject_all"])
17
- .describe("Review action"),
18
- item_type: z
19
- .enum(["finding", "asset", "scenario", "component"])
20
- .optional()
21
- .describe("Required for *_item actions"),
22
- item_id: z
23
- .string()
24
- .optional()
25
- .describe("Required for *_item actions"),
26
- };
27
- export function createManageThreatModelReviewHandler(apiClient) {
28
- return async (params) => {
29
- try {
30
- const { threat_model_id, action } = params;
31
- let data;
32
- if (action === "accept_all") {
33
- data = await apiClient.post(`/api/threat-models/${threat_model_id}/review-items/accept-all`, {});
34
- }
35
- else if (action === "reject_all") {
36
- data = await apiClient.post(`/api/threat-models/${threat_model_id}/review-items/reject-all`, {});
37
- }
38
- else {
39
- if (!params.item_type || !params.item_id) {
40
- return {
41
- content: [
42
- {
43
- type: "text",
44
- text: "Error: item_type and item_id are required for accept_item/reject_item actions",
45
- },
46
- ],
47
- isError: true,
48
- };
49
- }
50
- const verb = action === "accept_item" ? "accept" : "reject";
51
- data = await apiClient.post(`/api/threat-models/${threat_model_id}/review-items/${params.item_type}/${params.item_id}/${verb}`, {});
52
- }
53
- const sanitized = sanitizeResponse({
54
- action,
55
- threat_model_id,
56
- item_type: params.item_type,
57
- item_id: params.item_id,
58
- result: data,
59
- });
60
- return {
61
- content: [{ type: "text", text: JSON.stringify(sanitized, null, 2) }],
62
- };
63
- }
64
- catch (err) {
65
- const message = err instanceof Error ? err.message : "Failed to manage threat model review";
66
- return {
67
- content: [{ type: "text", text: `Error: ${message}` }],
68
- isError: true,
69
- };
70
- }
71
- };
72
- }
@@ -1,18 +0,0 @@
1
- import { z } from "zod";
2
- import type { ApiClient } from "../api-client.js";
3
- import type { ZivisConfig } from "../types.js";
4
- export declare const GET_STARTED_NAME = "zivis_get_started";
5
- export declare const GET_STARTED_DESCRIPTION = "Call this FIRST on any turn where the user asks about security, vulnerabilities, code review, deployment readiness, threat modeling, dependencies, or \"what should I do next.\" Idempotent and safe to call repeatedly \u2014 detects prior inspect runs and never re-inspects unnecessarily. Prefer this over calling zivis_inspect directly.\n\nUse this when the user says any of:\n- \"what should I do for security on this app\"\n- \"uhh, where do I start\"\n- \"is my app safe\" / \"is my chatbot safe\"\n- \"I need to do security stuff before launch\"\n- \"I have an audit / pen test / customer asking about security\"\n- \"check my dependencies / libraries / repos\"\n- \"how do I use ZIVIS\"\n- \"what can ZIVIS do for me\"\n\nThis tool inspects the current project state \u2014 binding, application, scans, findings \u2014\nAND if a recent 'zivis inspect' artifact exists for this repo, evaluates the local\nthreat library against it to surface architectural patterns ZIVIS thinks may apply\n(self-consistency without context isolation, late org filter, privilege separation, etc.).\nThe 'relevant_threats' field in the response is what makes this tool different from a\ngeneric security menu: ZIVIS is reading the user's actual codebase via the graph\nartifact and naming threats by their architectural shape.\n\nAlways speak to the user in threat-model language: components, flows, trust boundaries,\nattack scenarios. Even when they don't yet know those terms \u2014 that's how they learn.\n\nOutput is a structured JSON object. Present recommended_next_steps as a numbered list\nto the user, in order, and ask them to pick one. If relevant_threats is non-empty, lead\nwith that \u2014 it's the most concrete thing ZIVIS knows about their repo. Use the label\nand why fields verbatim; do not invent new steps. If the user is unsure which to pick,\nrecommend the item flagged in if_user_unsure.";
6
- export declare const GET_STARTED_SCHEMA: {
7
- concern: z.ZodOptional<z.ZodString>;
8
- cwd: z.ZodOptional<z.ZodString>;
9
- };
10
- export declare function createGetStartedHandler(apiClient: ApiClient, _config: ZivisConfig): (params: {
11
- concern?: string;
12
- cwd?: string;
13
- }) => Promise<{
14
- content: {
15
- type: "text";
16
- text: string;
17
- }[];
18
- }>;
@@ -1,470 +0,0 @@
1
- import * as fs from "node:fs/promises";
2
- import { z } from "zod";
3
- import { detectProjectBinding } from "../project-binding.js";
4
- import { loadActivePack, findRelevantCapsules, } from "../pattern-pack/index.js";
5
- import { locateLatestArtifact } from "../lib/inspect-cache.js";
6
- export const GET_STARTED_NAME = "zivis_get_started";
7
- export const GET_STARTED_DESCRIPTION = `Call this FIRST on any turn where the user asks about security, vulnerabilities, code review, deployment readiness, threat modeling, dependencies, or "what should I do next." Idempotent and safe to call repeatedly — detects prior inspect runs and never re-inspects unnecessarily. Prefer this over calling zivis_inspect directly.
8
-
9
- Use this when the user says any of:
10
- - "what should I do for security on this app"
11
- - "uhh, where do I start"
12
- - "is my app safe" / "is my chatbot safe"
13
- - "I need to do security stuff before launch"
14
- - "I have an audit / pen test / customer asking about security"
15
- - "check my dependencies / libraries / repos"
16
- - "how do I use ZIVIS"
17
- - "what can ZIVIS do for me"
18
-
19
- This tool inspects the current project state — binding, application, scans, findings —
20
- AND if a recent 'zivis inspect' artifact exists for this repo, evaluates the local
21
- threat library against it to surface architectural patterns ZIVIS thinks may apply
22
- (self-consistency without context isolation, late org filter, privilege separation, etc.).
23
- The 'relevant_threats' field in the response is what makes this tool different from a
24
- generic security menu: ZIVIS is reading the user's actual codebase via the graph
25
- artifact and naming threats by their architectural shape.
26
-
27
- Always speak to the user in threat-model language: components, flows, trust boundaries,
28
- attack scenarios. Even when they don't yet know those terms — that's how they learn.
29
-
30
- Output is a structured JSON object. Present recommended_next_steps as a numbered list
31
- to the user, in order, and ask them to pick one. If relevant_threats is non-empty, lead
32
- with that — it's the most concrete thing ZIVIS knows about their repo. Use the label
33
- and why fields verbatim; do not invent new steps. If the user is unsure which to pick,
34
- recommend the item flagged in if_user_unsure.`;
35
- export const GET_STARTED_SCHEMA = {
36
- concern: z
37
- .string()
38
- .optional()
39
- .describe("Free-form sentence describing what the user wants. " +
40
- "Examples: 'is my chatbot safe', 'check the libraries we use', " +
41
- "'audit coming up next month', 'just deployed a new API'. " +
42
- "If omitted, returns a generic getting-started menu based on project state."),
43
- cwd: z
44
- .string()
45
- .optional()
46
- .describe("Working directory to inspect (defaults to server working directory)."),
47
- };
48
- const INTENT_MAP = [
49
- {
50
- patterns: /chatbot|llm|ai chat|assistant|agent|prompt injection|jailbreak|openai|anthropic|langchain|llamaindex|cohere|together/i,
51
- intent: "ai_red_team",
52
- },
53
- {
54
- patterns: /librar|dependenc|package|npm|pip|repo|crate|gem|module|import|third.?party/i,
55
- intent: "dep_audit",
56
- },
57
- {
58
- patterns: /audit|compliance|soc\s*2|iso\s*27001|fedramp|vendor questionnaire|customer ask|certif/i,
59
- intent: "pre_audit",
60
- },
61
- {
62
- patterns: /launch|deploy|release|production|go\s*live|prod|ship/i,
63
- intent: "pre_launch",
64
- },
65
- {
66
- patterns: /finding|issue|vulnerabilit|vuln|bug|report|result|scan result/i,
67
- intent: "view_findings",
68
- },
69
- ];
70
- function detectIntent(concern) {
71
- if (!concern)
72
- return "generic";
73
- for (const { patterns, intent } of INTENT_MAP) {
74
- if (patterns.test(concern))
75
- return intent;
76
- }
77
- return "generic";
78
- }
79
- function stepCheckDeps() {
80
- return {
81
- id: "check_dependencies",
82
- label: "Check the open source libraries you depend on",
83
- tool: "zivis_check_repo_trust",
84
- why: "Free, no setup. Catches risky AI SDKs and known-bad dependencies before they cause problems.",
85
- estimated_time: "1 minute per repo",
86
- requires_auth: false,
87
- };
88
- }
89
- function stepSetupAiTarget(hint) {
90
- return {
91
- id: "setup_ai_target",
92
- label: "Tell ZIVIS about your chatbot or AI system so it can test it",
93
- tool: "zivis_setup_red_team_target",
94
- args_hint: { target_type: "ai_chat", ...hint },
95
- why: "ZIVIS needs to know your endpoint to run prompt-injection, jailbreak, and PII-leakage tests.",
96
- estimated_time: "2 minutes",
97
- requires_auth: true,
98
- };
99
- }
100
- function stepSetupWebTarget(hint) {
101
- return {
102
- id: "setup_web_target",
103
- label: "Register your web app or API with ZIVIS for testing",
104
- tool: "zivis_setup_red_team_target",
105
- args_hint: { target_type: "web_app", ...hint },
106
- why: "ZIVIS needs to know your app URL to run security tests against it.",
107
- estimated_time: "2 minutes",
108
- requires_auth: true,
109
- };
110
- }
111
- function stepBrowseTests() {
112
- return {
113
- id: "browse_test_library",
114
- label: "Browse what ZIVIS can test for",
115
- tool: "zivis_list_test_scenarios",
116
- why: "See the menu of attack categories (prompt injection, auth bypass, data leakage, etc.) before committing to a scan.",
117
- estimated_time: "30 seconds",
118
- requires_auth: true,
119
- };
120
- }
121
- function stepViewFindings(count) {
122
- return {
123
- id: "view_open_findings",
124
- label: count
125
- ? `Review the ${count} open security issue${count === 1 ? "" : "s"} ZIVIS found`
126
- : "Review open security issues ZIVIS found",
127
- tool: "zivis_get_findings",
128
- args_hint: { status: "open" },
129
- why: "Look at what's been found already before starting new scans — no point duplicating work.",
130
- estimated_time: "5 minutes",
131
- requires_auth: true,
132
- };
133
- }
134
- function stepRunSecurityReview() {
135
- return {
136
- id: "run_security_review",
137
- label: "Get a security readiness summary before launch or audit",
138
- tool: "zivis_security_review",
139
- why: "Pulls together all open findings, past fixes, and known attack scenarios into one pre-launch checklist.",
140
- estimated_time: "3 minutes",
141
- requires_auth: true,
142
- };
143
- }
144
- function stepSetupProject() {
145
- return {
146
- id: "setup_project",
147
- label: "Connect this project to your ZIVIS org",
148
- tool: "zivis_check_project",
149
- why: "ZIVIS needs to know which org this project belongs to before it can run tests or store results.",
150
- estimated_time: "2 minutes (run 'zivis auth init' in your terminal)",
151
- requires_auth: false,
152
- };
153
- }
154
- function stepInstallGitHubApp(installUrl) {
155
- return {
156
- id: "install_github_app",
157
- label: "Install the ZIVIS GitHub App to enable continuous monitoring",
158
- tool: "external_link",
159
- args_hint: { url: installUrl },
160
- why: "Linking a repo unlocks deeper analysis on every push — threat model updates automatically as architecture changes. Today this org has no GitHub App installation.",
161
- estimated_time: "2 minutes",
162
- requires_auth: false,
163
- };
164
- }
165
- async function fetchState(apiClient, cwd) {
166
- const detected = detectProjectBinding(cwd);
167
- if (!detected) {
168
- return {
169
- bound: false,
170
- has_application: false,
171
- has_scans: false,
172
- has_findings: false,
173
- open_findings_count: 0,
174
- };
175
- }
176
- const state = {
177
- bound: true,
178
- org_name: detected.binding.orgName,
179
- has_application: false,
180
- has_scans: false,
181
- has_findings: false,
182
- open_findings_count: 0,
183
- };
184
- try {
185
- const appsResp = await apiClient.get("/api/rt/applications?limit=1");
186
- if ((appsResp.applications?.length ?? 0) > 0 || (appsResp.total ?? 0) > 0) {
187
- state.has_application = true;
188
- }
189
- }
190
- catch {
191
- }
192
- try {
193
- const scansResp = await apiClient.get("/api/rt/scans?limit=1");
194
- if ((scansResp.scans?.length ?? 0) > 0) {
195
- state.has_scans = true;
196
- }
197
- }
198
- catch {
199
- }
200
- try {
201
- const findingsResp = await apiClient.get("/api/findings/unified?status=open&limit=1");
202
- const total = findingsResp.summary?.total ?? findingsResp.findings?.length ?? 0;
203
- if (total > 0) {
204
- state.has_findings = true;
205
- state.open_findings_count = total;
206
- }
207
- }
208
- catch {
209
- }
210
- try {
211
- const gh = await apiClient.get("/api/github-app/status");
212
- state.github_app_installed = gh.installed;
213
- state.github_app_install_url = gh.installUrl;
214
- }
215
- catch {
216
- state.github_app_installed = null;
217
- }
218
- return state;
219
- }
220
- function buildMenu(intent, state, concern) {
221
- if (!state.bound) {
222
- return {
223
- headline: "Welcome to ZIVIS! First, let's connect this project to your organization so results are stored and tracked.",
224
- recommended_next_steps: [
225
- stepSetupProject(),
226
- stepCheckDeps(),
227
- stepBrowseTests(),
228
- ],
229
- guidance_for_assistant: "Present these as a numbered list. The user should run 'zivis auth init' in their terminal to complete step 1. " +
230
- "Step 2 (check_dependencies) requires no auth and can be done immediately. " +
231
- "If they ask 'why' something matters, expand on the 'why' field — do not make new claims.",
232
- if_user_unsure: "Recommend option 2 (check_dependencies) — it requires no setup and gives immediate results.",
233
- };
234
- }
235
- if (state.has_findings && intent !== "dep_audit") {
236
- const steps = [
237
- stepViewFindings(state.open_findings_count),
238
- stepCheckDeps(),
239
- ];
240
- if (!state.has_application) {
241
- steps.push(stepSetupWebTarget());
242
- }
243
- else {
244
- steps.push(stepBrowseTests());
245
- }
246
- return {
247
- headline: `ZIVIS sees your project (${state.org_name ?? "connected"}) and has found ${state.open_findings_count} open security issue${state.open_findings_count === 1 ? "" : "s"}.`,
248
- recommended_next_steps: steps,
249
- guidance_for_assistant: "Present these as a numbered list. Prioritize reviewing existing findings before starting new scans. " +
250
- "If they ask 'why' something matters, expand on the 'why' field — do not make new claims.",
251
- if_user_unsure: "Recommend option 1 (view_open_findings) — reviewing what's already known is the best first step.",
252
- };
253
- }
254
- if (intent === "ai_red_team") {
255
- const steps = [
256
- stepSetupAiTarget(),
257
- stepCheckDeps(),
258
- stepBrowseTests(),
259
- ];
260
- return {
261
- headline: state.has_application
262
- ? `ZIVIS sees your project (${state.org_name ?? "connected"}) and has a target configured. Ready to test your AI system.`
263
- : `ZIVIS sees your project (${state.org_name ?? "connected"}) but no security testing has run yet.`,
264
- recommended_next_steps: steps,
265
- guidance_for_assistant: "The user wants to test an AI/chatbot system. Present these as a numbered list. " +
266
- "If they already have a target URL, include it in args_hint. " +
267
- "If they ask 'why' something matters, expand on the 'why' field — do not make new claims.",
268
- if_user_unsure: "Recommend option 1 (setup_ai_target) — setting up the chatbot as a test target is the fastest path to finding real issues.",
269
- };
270
- }
271
- if (intent === "dep_audit") {
272
- return {
273
- headline: "Checking your dependencies is a great place to start — it's free, needs no setup, and often finds the most impactful issues.",
274
- recommended_next_steps: [
275
- stepCheckDeps(),
276
- stepSetupWebTarget(),
277
- stepBrowseTests(),
278
- ],
279
- guidance_for_assistant: "Present these as a numbered list. For step 1, ask the user to share which packages they want to check " +
280
- "(the GitHub org/repo of the dependency, e.g. openai/openai-python). " +
281
- "If they ask 'why' something matters, expand on the 'why' field — do not make new claims.",
282
- if_user_unsure: "Recommend option 1 (check_dependencies) — it works right now with no setup.",
283
- };
284
- }
285
- if (intent === "pre_audit" || intent === "pre_launch") {
286
- const steps = [
287
- stepRunSecurityReview(),
288
- stepCheckDeps(),
289
- ];
290
- if (!state.has_application) {
291
- steps.push(stepSetupWebTarget());
292
- }
293
- else {
294
- steps.push(stepBrowseTests());
295
- }
296
- const headline = intent === "pre_audit"
297
- ? `ZIVIS can help you prepare for an audit. Let's get a security readiness picture first.`
298
- : `ZIVIS can help you check security before you go live.`;
299
- return {
300
- headline,
301
- recommended_next_steps: steps,
302
- guidance_for_assistant: "The user has a deadline (audit or launch). Start with a security review to understand the current state, " +
303
- "then address the highest-severity issues first. " +
304
- "If they ask 'why' something matters, expand on the 'why' field — do not make new claims.",
305
- if_user_unsure: "Recommend option 1 (run_security_review) — it gives the fastest complete picture and shows what needs to be fixed before the deadline.",
306
- };
307
- }
308
- if (intent === "view_findings") {
309
- return {
310
- headline: state.has_findings
311
- ? `ZIVIS has ${state.open_findings_count} open finding${state.open_findings_count === 1 ? "" : "s"} for this project.`
312
- : `No open findings found yet — ZIVIS may not have run a scan, or all issues are resolved.`,
313
- recommended_next_steps: [
314
- stepViewFindings(state.open_findings_count > 0 ? state.open_findings_count : undefined),
315
- state.has_application ? stepBrowseTests() : stepSetupWebTarget(),
316
- stepCheckDeps(),
317
- ],
318
- guidance_for_assistant: "Present these as a numbered list. If the user wants to see findings, call zivis_get_findings directly. " +
319
- "If they ask 'why' something matters, expand on the 'why' field — do not make new claims.",
320
- if_user_unsure: "Recommend option 1 (view_open_findings) — let's see what ZIVIS already knows.",
321
- };
322
- }
323
- const steps = [];
324
- if (!state.has_application) {
325
- steps.push(stepSetupWebTarget());
326
- }
327
- steps.push(stepCheckDeps());
328
- if (state.has_findings) {
329
- steps.push(stepViewFindings(state.open_findings_count));
330
- }
331
- else {
332
- steps.push(stepBrowseTests());
333
- }
334
- if (steps.length < 3)
335
- steps.push(stepBrowseTests());
336
- return {
337
- headline: state.has_application
338
- ? `ZIVIS is connected to your project (${state.org_name ?? "org"}). Here are the most useful things to do next.`
339
- : `ZIVIS is connected to your project (${state.org_name ?? "org"}) but no app has been registered for testing yet.`,
340
- recommended_next_steps: steps.slice(0, 4),
341
- guidance_for_assistant: "Present these as a numbered list. Ask the user to pick one before taking any action. " +
342
- "If they ask 'why' something matters, expand on the 'why' field — do not make new claims.",
343
- if_user_unsure: "Recommend option 2 (check_dependencies) — it's free, fast, and shows value without setup.",
344
- };
345
- }
346
- async function findRelevantThreats(cwd) {
347
- const located = await locateLatestArtifact(cwd);
348
- if (!located) {
349
- return {
350
- threats: [],
351
- reason: "No 'zivis inspect' artifact found in user cache. Run 'zivis inspect' from the repo to populate the threat library against this codebase.",
352
- };
353
- }
354
- const artifactPath = located.path;
355
- let artifact;
356
- try {
357
- const raw = await fs.readFile(artifactPath, "utf8");
358
- artifact = JSON.parse(raw);
359
- }
360
- catch {
361
- return { threats: [], reason: `Failed to read artifact at ${artifactPath}.` };
362
- }
363
- let handle;
364
- try {
365
- handle = await loadActivePack();
366
- }
367
- catch {
368
- return {
369
- threats: [],
370
- artifact_path: artifactPath,
371
- reason: "Pattern pack not available — run 'pnpm build' to bundle the public pack.",
372
- };
373
- }
374
- const relevant = await findRelevantCapsules(handle, artifact);
375
- return {
376
- threats: relevant.map((cap) => summarizeCapsule(cap, artifact)),
377
- artifact_path: artifactPath,
378
- };
379
- }
380
- function summarizeCapsule(cap, artifact) {
381
- const matched = [];
382
- const pkgs = new Set();
383
- for (const node of artifact.nodes) {
384
- if (node.type === "external_dependency" && node.attributes?.package) {
385
- pkgs.add(node.attributes.package);
386
- }
387
- }
388
- const langs = new Set(artifact.scope.languages ?? []);
389
- const f = cap.relevance_filter;
390
- if (f) {
391
- for (const term of [...(f.any_of ?? []), ...(f.all_of ?? [])]) {
392
- if (term.dependency && pkgs.has(term.dependency))
393
- matched.push(`dep:${term.dependency}`);
394
- if (term.language && langs.has(term.language))
395
- matched.push(`language:${term.language}`);
396
- }
397
- }
398
- if (matched.length === 0)
399
- matched.push("language match only");
400
- return {
401
- pattern_id: cap.id,
402
- title: cap.title,
403
- category: cap.category,
404
- safe_summary: cap.safe_summary,
405
- matched_on: matched,
406
- next_action_tool: "zivis_threat_run_matcher",
407
- };
408
- }
409
- export function createGetStartedHandler(apiClient, _config) {
410
- return async (params) => {
411
- const cwd = params.cwd ?? process.cwd();
412
- const intent = detectIntent(params.concern);
413
- const state = await fetchState(apiClient, cwd);
414
- const menu = buildMenu(intent, state, params.concern);
415
- let threatHit = { threats: [] };
416
- try {
417
- threatHit = await findRelevantThreats(cwd);
418
- }
419
- catch (err) {
420
- threatHit = {
421
- threats: [],
422
- reason: `threat-library lookup failed: ${err.message}`,
423
- };
424
- }
425
- if (threatHit.threats.length > 0) {
426
- menu.recommended_next_steps = [
427
- {
428
- id: "review_relevant_threats",
429
- label: `Review the ${threatHit.threats.length} architectural pattern${threatHit.threats.length === 1 ? "" : "s"} ZIVIS sees in this repo`,
430
- tool: "zivis_threat_run_matcher",
431
- why: "ZIVIS read your codebase via the inspect artifact and identified threat-model patterns that match your architecture. Run the matcher to see exactly which lines fire each pattern.",
432
- estimated_time: "30 seconds",
433
- requires_auth: false,
434
- },
435
- ...menu.recommended_next_steps,
436
- ];
437
- menu.headline =
438
- `ZIVIS read this repo's threat library and sees ${threatHit.threats.length} architectural pattern${threatHit.threats.length === 1 ? "" : "s"} that may apply. ` +
439
- menu.headline;
440
- menu.if_user_unsure = `Recommend option 1 (review_relevant_threats) — that's the most repo-specific thing ZIVIS knows.`;
441
- }
442
- if (state.bound &&
443
- state.github_app_installed === false &&
444
- state.github_app_install_url) {
445
- menu.recommended_next_steps = [
446
- ...menu.recommended_next_steps,
447
- stepInstallGitHubApp(state.github_app_install_url),
448
- ];
449
- }
450
- const payload = {
451
- current_state: state,
452
- intent_detected: intent,
453
- concern_received: params.concern ?? null,
454
- ...menu,
455
- relevant_threats: threatHit.threats,
456
- threat_library: {
457
- artifact_used: threatHit.artifact_path ?? null,
458
- reason_no_threats: threatHit.threats.length === 0 ? threatHit.reason ?? null : null,
459
- },
460
- };
461
- return {
462
- content: [
463
- {
464
- type: "text",
465
- text: JSON.stringify(payload, null, 2),
466
- },
467
- ],
468
- };
469
- };
470
- }
@@ -1,21 +0,0 @@
1
- import { z } from "zod";
2
- import type { ApiClient } from "../api-client.js";
3
- import type { ZivisConfig } from "../types.js";
4
- export declare const INSPECT_NAME = "zivis_inspect";
5
- export declare const INSPECT_DESCRIPTION = "Build a local repo graph and run the local pattern matcher to emit threat-model findings. The threat-model-first conversion event.\n\nPrefer zivis_get_started or zivis_threat_guide first \u2014 they read the local inspect cache and only call this tool when a fresh artifact is missing. Calling zivis_inspect directly always re-runs (no idempotency at this layer); reach for it when the user explicitly says \"re-inspect\" / \"rebuild the graph\" / \"/inspect\" or when an entry tool tells you to.\n\nUse this when the user says any of:\n- \"model this app\" / \"threat model this repo\"\n- \"what should we be worried about in this code\"\n- \"set up security for this project\" (after auth/binding is done)\n- \"/inspect\"\n\nWhat it does, all locally (no source code leaves the machine):\n 1. Spawns 'zivis inspect' to walk the repo and produce a typed graph artifact\n (services, endpoints, external dependencies; auth boundaries + dataflow are Phase 1.5)\n 2. Runs the local matcher against the public pattern pack:\n - AST strategies fire via @ast-grep/napi for TS/JS/Python/Go\n - META strategies fire via the controls library (when no defending control is present)\n - INFER strategies emit candidates the host LLM picks up via zivis_threat_get_inference_prompt\n 3. Returns normalized findings with lane (trusted/inferred), confidence, and evidence spans\n\nTrusted-lane findings are evidence-backed (deterministic strategies fired) and ready for the threat model. Inferred-lane findings need host-LLM confirmation via zivis_threat_get_inference_prompt before promotion. Proprietary platform-side eval (Phase 4 cloud upload) and trust-promoted aggregation are separate steps.\n\nThis is the conversion moment for the threat-model-first sidekick \u2014 the user sees specific patterns naming specific files in their repo, in their IDE, in under 30 seconds.";
6
- export declare const INSPECT_SCHEMA: {
7
- cwd: z.ZodOptional<z.ZodString>;
8
- application_id: z.ZodOptional<z.ZodString>;
9
- skip_matcher: z.ZodOptional<z.ZodBoolean>;
10
- };
11
- export declare function createInspectHandler(_apiClient: ApiClient, _config: ZivisConfig): (params: {
12
- cwd?: string;
13
- application_id?: string;
14
- skip_matcher?: boolean;
15
- }) => Promise<{
16
- content: Array<{
17
- type: "text";
18
- text: string;
19
- }>;
20
- isError?: boolean;
21
- }>;