@compr/opscontext-mcp 2.0.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 (48) hide show
  1. package/CHANGELOG.md +313 -0
  2. package/LICENSE +83 -0
  3. package/README.md +470 -0
  4. package/defaults/learnings.json +146 -0
  5. package/dist/activation.d.ts +48 -0
  6. package/dist/activation.js +377 -0
  7. package/dist/adapters.d.ts +101 -0
  8. package/dist/adapters.js +171 -0
  9. package/dist/agents.d.ts +137 -0
  10. package/dist/agents.js +1638 -0
  11. package/dist/audit.d.ts +23 -0
  12. package/dist/audit.js +163 -0
  13. package/dist/cache.d.ts +15 -0
  14. package/dist/cache.js +117 -0
  15. package/dist/claude-integration.d.ts +95 -0
  16. package/dist/claude-integration.js +247 -0
  17. package/dist/cli.d.ts +18 -0
  18. package/dist/cli.js +1823 -0
  19. package/dist/code-chunker.d.ts +12 -0
  20. package/dist/code-chunker.js +270 -0
  21. package/dist/collectors.d.ts +63 -0
  22. package/dist/collectors.js +617 -0
  23. package/dist/config.d.ts +73 -0
  24. package/dist/config.js +239 -0
  25. package/dist/embeddings.d.ts +36 -0
  26. package/dist/embeddings.js +124 -0
  27. package/dist/firewall.d.ts +133 -0
  28. package/dist/firewall.js +631 -0
  29. package/dist/hooks.d.ts +76 -0
  30. package/dist/hooks.js +313 -0
  31. package/dist/index.d.ts +3 -0
  32. package/dist/index.js +1081 -0
  33. package/dist/ingest.d.ts +32 -0
  34. package/dist/ingest.js +162 -0
  35. package/dist/learnings.d.ts +108 -0
  36. package/dist/learnings.js +714 -0
  37. package/dist/license-sig.d.ts +47 -0
  38. package/dist/license-sig.js +104 -0
  39. package/dist/policy.d.ts +131 -0
  40. package/dist/policy.js +182 -0
  41. package/dist/search.d.ts +11 -0
  42. package/dist/search.js +99 -0
  43. package/dist/sessions.d.ts +46 -0
  44. package/dist/sessions.js +153 -0
  45. package/examples/adapters/notion-adapter.js +108 -0
  46. package/examples/adapters/rss-adapter.js +76 -0
  47. package/package.json +87 -0
  48. package/skills/opscontext/SKILL.md +260 -0
@@ -0,0 +1,137 @@
1
+ import type { ProjectDirectory } from "./config.js";
2
+ /**
3
+ * Multi-Agent Architecture — Phase 1: Foundation + Compliance Agent
4
+ *
5
+ * Implements the plan-and-approve workflow described in
6
+ * FASTPROD/docs/MULTI_AGENT_ARCHITECTURE_PLAN.md
7
+ *
8
+ * Risk levels:
9
+ * 🟢 Read-only (auto-approve) — ls, cat, SELECT, status checks
10
+ * 🟡 Non-destructive write — git commit, config edit (needs review)
11
+ * 🔴 Destructive — DELETE, DROP, rm, deploy, reload (needs confirm)
12
+ */
13
+ export interface ProjectInfo {
14
+ name: string;
15
+ path: string;
16
+ type: string;
17
+ framework: string;
18
+ runtime: string;
19
+ hasGit: boolean;
20
+ gitRemotes: string[];
21
+ hasDocker: boolean;
22
+ hasPm2: boolean;
23
+ deps: Record<string, string>;
24
+ }
25
+ export interface PlanStep {
26
+ action: string;
27
+ description: string;
28
+ command?: string;
29
+ risk: "green" | "yellow" | "red";
30
+ reversible: boolean;
31
+ estimatedTime: string;
32
+ }
33
+ export interface AuditFinding {
34
+ check: string;
35
+ status: "pass" | "warn" | "fail";
36
+ message: string;
37
+ project?: string;
38
+ severity: "info" | "low" | "medium" | "high" | "critical";
39
+ remediation?: string;
40
+ command?: string;
41
+ }
42
+ export interface AuditPlan {
43
+ agent: string;
44
+ timestamp: string;
45
+ trigger: string;
46
+ scope: string;
47
+ findings: AuditFinding[];
48
+ steps: PlanStep[];
49
+ summary: {
50
+ pass: number;
51
+ warn: number;
52
+ fail: number;
53
+ critical: number;
54
+ };
55
+ }
56
+ /**
57
+ * Analyze a project directory and determine its type, framework, runtime.
58
+ */
59
+ export declare function analyzeProject(dir: ProjectDirectory): ProjectInfo;
60
+ /**
61
+ * List all projects with tech analysis.
62
+ */
63
+ export declare function listProjects(projectDirs: ProjectDirectory[]): ProjectInfo[];
64
+ interface PortUsage {
65
+ port: number;
66
+ project: string;
67
+ source: string;
68
+ details: string;
69
+ }
70
+ /**
71
+ * Scan all projects for port declarations and detect conflicts.
72
+ */
73
+ export declare function checkPorts(projectDirs: ProjectDirectory[]): {
74
+ ports: PortUsage[];
75
+ conflicts: Array<{
76
+ port: number;
77
+ usages: PortUsage[];
78
+ }>;
79
+ };
80
+ /**
81
+ * Run the full compliance audit across all projects.
82
+ * Returns a structured plan document.
83
+ */
84
+ export declare function runComplianceAudit(projectDirs: ProjectDirectory[]): AuditPlan;
85
+ /**
86
+ * Format an audit plan as a readable Markdown document.
87
+ */
88
+ export declare function formatPlan(plan: AuditPlan): string;
89
+ /**
90
+ * Format project list as a readable summary.
91
+ */
92
+ export declare function formatProjectList(projects: ProjectInfo[]): string;
93
+ /**
94
+ * Format port map as a readable table.
95
+ */
96
+ export declare function formatPortMap(ports: PortUsage[], conflicts: Array<{
97
+ port: number;
98
+ usages: PortUsage[];
99
+ }>): string;
100
+ export interface ScoreCheck {
101
+ name: string;
102
+ category: string;
103
+ points: number;
104
+ maxPoints: number;
105
+ status: "pass" | "partial" | "fail";
106
+ detail: string;
107
+ }
108
+ export interface ProjectScore {
109
+ project: string;
110
+ path: string;
111
+ score: number;
112
+ maxScore: number;
113
+ percentage: number;
114
+ grade: string;
115
+ checks: ScoreCheck[];
116
+ }
117
+ /**
118
+ * Score a project's AI-readiness (0-100%).
119
+ * Checks how well-prepared a project is for AI coding agents.
120
+ */
121
+ export declare function scoreProject(dir: ProjectDirectory): ProjectScore;
122
+ /**
123
+ * Format a project score report as Markdown.
124
+ */
125
+ export declare function formatScoreReport(scores: ProjectScore[]): string;
126
+ /**
127
+ * Generate a per-project SCORE.md file content.
128
+ * Written to each project root so the score is committed alongside code.
129
+ */
130
+ export declare function generateProjectScoreMD(score: ProjectScore): string;
131
+ /**
132
+ * Generate an HTML visual report for project scores.
133
+ * Produces a self-contained HTML page with embedded CSS — no external dependencies.
134
+ */
135
+ export declare function generateScoreHTML(scores: ProjectScore[]): string;
136
+ export {};
137
+ //# sourceMappingURL=agents.d.ts.map