avorelo 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.
Files changed (258) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +56 -0
  3. package/bin/avorelo +9 -0
  4. package/package.json +135 -0
  5. package/scripts/README.md +40 -0
  6. package/scripts/cco-dashboard.js +252 -0
  7. package/scripts/cco-status.js +430 -0
  8. package/scripts/lib/activation/account-state.js +37 -0
  9. package/scripts/lib/activation/activation-runner.js +546 -0
  10. package/scripts/lib/activation/activation-self-healing.js +480 -0
  11. package/scripts/lib/activation/activation-state.js +83 -0
  12. package/scripts/lib/activation/activation-summary.js +191 -0
  13. package/scripts/lib/activation/adapters/claude-code.js +77 -0
  14. package/scripts/lib/activation/adapters/codex-cli.js +52 -0
  15. package/scripts/lib/activation/adapters/cursor.js +37 -0
  16. package/scripts/lib/activation/adapters/github-agent.js +39 -0
  17. package/scripts/lib/activation/adapters/terminal.js +42 -0
  18. package/scripts/lib/activation/adapters/vscode.js +39 -0
  19. package/scripts/lib/activation/adapters/windsurf.js +37 -0
  20. package/scripts/lib/activation/ai-surface-detector.js +151 -0
  21. package/scripts/lib/activation/connect-account.js +145 -0
  22. package/scripts/lib/activation/detect-environment.js +75 -0
  23. package/scripts/lib/activation/detect-hosts.js +62 -0
  24. package/scripts/lib/activation/format-activation-output.js +109 -0
  25. package/scripts/lib/activation/next-action.js +43 -0
  26. package/scripts/lib/activation/repair-engine.js +219 -0
  27. package/scripts/lib/activation-distribution-readiness.js +507 -0
  28. package/scripts/lib/adapter-conformance.js +176 -0
  29. package/scripts/lib/adapter-readiness.js +417 -0
  30. package/scripts/lib/adapter-safety-boundaries.js +335 -0
  31. package/scripts/lib/adapter-technical-readiness-gate.js +205 -0
  32. package/scripts/lib/agent-access-governance.js +455 -0
  33. package/scripts/lib/agent-enforcement.js +765 -0
  34. package/scripts/lib/agent-policy-profile.js +210 -0
  35. package/scripts/lib/agent-security/action-evaluator.js +507 -0
  36. package/scripts/lib/agent-security/adapter-registry.js +98 -0
  37. package/scripts/lib/agent-security/auto-policy.js +139 -0
  38. package/scripts/lib/agent-security/bounded-scan.js +93 -0
  39. package/scripts/lib/agent-security/enforcement-adapter.js +174 -0
  40. package/scripts/lib/agent-security/enforcement-engine.js +1129 -0
  41. package/scripts/lib/agent-security/file-write-adapter.js +183 -0
  42. package/scripts/lib/agent-security/file-write-rules.js +178 -0
  43. package/scripts/lib/agent-security/index.js +3342 -0
  44. package/scripts/lib/agent-security/instruction-risk.js +181 -0
  45. package/scripts/lib/agent-security/mcp-action-adapter.js +185 -0
  46. package/scripts/lib/agent-security/mcp-action-rules.js +184 -0
  47. package/scripts/lib/agent-security/package-action-adapter.js +175 -0
  48. package/scripts/lib/agent-security/package-action-rules.js +233 -0
  49. package/scripts/lib/agent-security/performance.js +148 -0
  50. package/scripts/lib/agent-security/permission-minimizer.js +403 -0
  51. package/scripts/lib/agent-security/scan-cache.js +74 -0
  52. package/scripts/lib/agent-security/source-trust.js +146 -0
  53. package/scripts/lib/ai-install-prompt.js +288 -0
  54. package/scripts/lib/ai-workspace-hygiene.js +1499 -0
  55. package/scripts/lib/alpha-activation.js +520 -0
  56. package/scripts/lib/alpha-feedback.js +263 -0
  57. package/scripts/lib/alpha-readiness-gate.js +332 -0
  58. package/scripts/lib/anti-gaming.js +169 -0
  59. package/scripts/lib/artifact-health.js +431 -0
  60. package/scripts/lib/attribution.js +180 -0
  61. package/scripts/lib/audit.js +289 -0
  62. package/scripts/lib/avorelo-skill-registry.js +810 -0
  63. package/scripts/lib/batch-jobs.js +71 -0
  64. package/scripts/lib/brain-pack.js +578 -0
  65. package/scripts/lib/brand-boundary.js +424 -0
  66. package/scripts/lib/brand.js +74 -0
  67. package/scripts/lib/browser-capability.js +1048 -0
  68. package/scripts/lib/browser-proof-preflight.js +321 -0
  69. package/scripts/lib/cache-readiness.js +187 -0
  70. package/scripts/lib/canonical-reentry.js +162 -0
  71. package/scripts/lib/capability-packs.js +314 -0
  72. package/scripts/lib/capability-recommender.js +512 -0
  73. package/scripts/lib/capability-registry.js +1059 -0
  74. package/scripts/lib/carry-forward-surfacing.js +194 -0
  75. package/scripts/lib/ccusage-adapter.js +188 -0
  76. package/scripts/lib/company-loop.js +1149 -0
  77. package/scripts/lib/config.js +637 -0
  78. package/scripts/lib/context-acquisition-plan.js +287 -0
  79. package/scripts/lib/context-budget-guard.js +170 -0
  80. package/scripts/lib/context-budget-scanner.js +257 -0
  81. package/scripts/lib/context-optimizer.js +715 -0
  82. package/scripts/lib/context-reduction-plan.js +178 -0
  83. package/scripts/lib/context-safety.js +88 -0
  84. package/scripts/lib/context-savings-engine.js +158 -0
  85. package/scripts/lib/cost-evidence.js +254 -0
  86. package/scripts/lib/cross-host-install-plan.js +308 -0
  87. package/scripts/lib/cross-host-install-readiness.js +237 -0
  88. package/scripts/lib/cross-host-value-flow.js +268 -0
  89. package/scripts/lib/dashboard.js +900 -0
  90. package/scripts/lib/design-partner-feedback.js +346 -0
  91. package/scripts/lib/entitlements.js +100 -0
  92. package/scripts/lib/execution-packet.js +559 -0
  93. package/scripts/lib/experimentation-events.js +547 -0
  94. package/scripts/lib/external-capability-compliance.js +107 -0
  95. package/scripts/lib/external-user-simulation.js +166 -0
  96. package/scripts/lib/failure-recovery-readiness.js +81 -0
  97. package/scripts/lib/failure-recovery.js +419 -0
  98. package/scripts/lib/feedback-intelligence.js +537 -0
  99. package/scripts/lib/feedback-signals.js +205 -0
  100. package/scripts/lib/file-integrity.js +68 -0
  101. package/scripts/lib/fsx.js +127 -0
  102. package/scripts/lib/full-readiness-gate.js +451 -0
  103. package/scripts/lib/guidance-builder.js +174 -0
  104. package/scripts/lib/hook-apply.js +1019 -0
  105. package/scripts/lib/hook-baseline.js +310 -0
  106. package/scripts/lib/hook-config-preview.js +275 -0
  107. package/scripts/lib/hook-contracts.js +290 -0
  108. package/scripts/lib/hook-safety-boundary-readiness.js +80 -0
  109. package/scripts/lib/host-capability-matrix.js +351 -0
  110. package/scripts/lib/host-support-context.js +254 -0
  111. package/scripts/lib/http-hook-action.js +538 -0
  112. package/scripts/lib/install-ai-readiness.js +84 -0
  113. package/scripts/lib/install-intake-risk.js +1037 -0
  114. package/scripts/lib/install-journey-intelligence.js +329 -0
  115. package/scripts/lib/intervention-guidance.js +57 -0
  116. package/scripts/lib/known-limitations.js +115 -0
  117. package/scripts/lib/l8-path-truth.js +146 -0
  118. package/scripts/lib/launch-hardening-gate.js +436 -0
  119. package/scripts/lib/launch-readiness.js +628 -0
  120. package/scripts/lib/learning-memory.js +686 -0
  121. package/scripts/lib/lifecycle-hooks.js +802 -0
  122. package/scripts/lib/local-package-smoke.js +423 -0
  123. package/scripts/lib/local-pricing.js +299 -0
  124. package/scripts/lib/mcp-enforcement.js +311 -0
  125. package/scripts/lib/mcp-least-privilege-policy.js +303 -0
  126. package/scripts/lib/mcp-tool-inventory.js +388 -0
  127. package/scripts/lib/mcp-tool-risk.js +0 -0
  128. package/scripts/lib/memory.js +335 -0
  129. package/scripts/lib/metrics.js +699 -0
  130. package/scripts/lib/micro-proof.js +133 -0
  131. package/scripts/lib/next-run-context.js +436 -0
  132. package/scripts/lib/operating-value.js +1648 -0
  133. package/scripts/lib/optimization-v3.js +122 -0
  134. package/scripts/lib/orchestration/adapters/_shared.js +49 -0
  135. package/scripts/lib/orchestration/adapters/aider.js +18 -0
  136. package/scripts/lib/orchestration/adapters/claude-code.js +35 -0
  137. package/scripts/lib/orchestration/adapters/codex.js +35 -0
  138. package/scripts/lib/orchestration/adapters/gemini-cli.js +18 -0
  139. package/scripts/lib/orchestration/adapters/git.js +25 -0
  140. package/scripts/lib/orchestration/adapters/index.js +31 -0
  141. package/scripts/lib/orchestration/adapters/lm-studio.js +18 -0
  142. package/scripts/lib/orchestration/adapters/ollama.js +18 -0
  143. package/scripts/lib/orchestration/adapters/opencode.js +18 -0
  144. package/scripts/lib/orchestration/adapters/openrouter.js +18 -0
  145. package/scripts/lib/orchestration/adapters/test-runner.js +25 -0
  146. package/scripts/lib/orchestration/cli.js +438 -0
  147. package/scripts/lib/orchestration/execution-manager.js +279 -0
  148. package/scripts/lib/orchestration/handoff.js +314 -0
  149. package/scripts/lib/orchestration/index.js +456 -0
  150. package/scripts/lib/orchestration/inventory.js +47 -0
  151. package/scripts/lib/orchestration/model-discovery.js +498 -0
  152. package/scripts/lib/orchestration/model-profiler.js +170 -0
  153. package/scripts/lib/orchestration/model-profiles.js +252 -0
  154. package/scripts/lib/orchestration/model-refresh-policy.js +72 -0
  155. package/scripts/lib/orchestration/proof-writer.js +349 -0
  156. package/scripts/lib/orchestration/provider-discovery/aider.js +49 -0
  157. package/scripts/lib/orchestration/provider-discovery/claude-code.js +56 -0
  158. package/scripts/lib/orchestration/provider-discovery/codex.js +49 -0
  159. package/scripts/lib/orchestration/provider-discovery/common.js +186 -0
  160. package/scripts/lib/orchestration/provider-discovery/gemini.js +106 -0
  161. package/scripts/lib/orchestration/provider-discovery/lm-studio.js +118 -0
  162. package/scripts/lib/orchestration/provider-discovery/models-dev.js +12 -0
  163. package/scripts/lib/orchestration/provider-discovery/ollama.js +100 -0
  164. package/scripts/lib/orchestration/provider-discovery/opencode.js +47 -0
  165. package/scripts/lib/orchestration/provider-discovery/openrouter.js +44 -0
  166. package/scripts/lib/orchestration/risk-classifier.js +130 -0
  167. package/scripts/lib/orchestration/routing-policy.js +486 -0
  168. package/scripts/lib/orchestration/settings.js +112 -0
  169. package/scripts/lib/orchestration/state.js +165 -0
  170. package/scripts/lib/orchestration/verification-manager.js +138 -0
  171. package/scripts/lib/output-profiles.js +146 -0
  172. package/scripts/lib/package-content-audit.js +368 -0
  173. package/scripts/lib/package-runtime.js +278 -0
  174. package/scripts/lib/plan-surface.js +53 -0
  175. package/scripts/lib/plans.js +2318 -0
  176. package/scripts/lib/policy-provider.js +27 -0
  177. package/scripts/lib/prelaunch-activation-readiness.js +409 -0
  178. package/scripts/lib/prelaunch-evidence-store.js +816 -0
  179. package/scripts/lib/prelaunch-intelligence.js +869 -0
  180. package/scripts/lib/pricing-experiment.js +118 -0
  181. package/scripts/lib/pro-moment-events.js +77 -0
  182. package/scripts/lib/pro-moment-state.js +227 -0
  183. package/scripts/lib/pro-moments.js +1216 -0
  184. package/scripts/lib/product-learning-events.js +629 -0
  185. package/scripts/lib/project-profile.js +555 -0
  186. package/scripts/lib/prompt-compiler.js +280 -0
  187. package/scripts/lib/prompt-lint.js +32 -0
  188. package/scripts/lib/prompt-suggestions.js +52 -0
  189. package/scripts/lib/proof-canonical.js +398 -0
  190. package/scripts/lib/proof-drilldown.js +383 -0
  191. package/scripts/lib/proof-events.js +342 -0
  192. package/scripts/lib/proof-history.js +243 -0
  193. package/scripts/lib/proof-metrics.js +296 -0
  194. package/scripts/lib/proof-outcome-evidence.js +134 -0
  195. package/scripts/lib/proof-receipt.js +335 -0
  196. package/scripts/lib/proof-record.js +461 -0
  197. package/scripts/lib/public-activation-distribution-gate.js +258 -0
  198. package/scripts/lib/public-cli.js +3891 -0
  199. package/scripts/lib/public-distribution-truth.js +211 -0
  200. package/scripts/lib/public-install-claim-checker.js +294 -0
  201. package/scripts/lib/publish-provenance-readiness.js +283 -0
  202. package/scripts/lib/readiness-delta.js +218 -0
  203. package/scripts/lib/readiness-evidence-closure.js +196 -0
  204. package/scripts/lib/reentry-memory-capture.js +241 -0
  205. package/scripts/lib/reentry-memory-retrieval.js +302 -0
  206. package/scripts/lib/reentry-memory-status.js +146 -0
  207. package/scripts/lib/reentry-memory-store.js +178 -0
  208. package/scripts/lib/reentry-state.js +66 -0
  209. package/scripts/lib/release-candidate-bundle.js +166 -0
  210. package/scripts/lib/remediation.js +81 -0
  211. package/scripts/lib/repo-map.js +391 -0
  212. package/scripts/lib/run-improvements-lifecycle.js +330 -0
  213. package/scripts/lib/run-improvements.js +789 -0
  214. package/scripts/lib/runtime-decision-policy.js +387 -0
  215. package/scripts/lib/safe-path-engine.js +705 -0
  216. package/scripts/lib/safe-run-controller.js +887 -0
  217. package/scripts/lib/score.js +262 -0
  218. package/scripts/lib/seamless-enforcement.js +329 -0
  219. package/scripts/lib/seamless-outcome.js +689 -0
  220. package/scripts/lib/seamless-reality-gate.js +5043 -0
  221. package/scripts/lib/security-risk-classifier.js +511 -0
  222. package/scripts/lib/security-scan.js +384 -0
  223. package/scripts/lib/session-context-optimizer.js +1211 -0
  224. package/scripts/lib/session-timing.js +315 -0
  225. package/scripts/lib/skill-hygiene.js +805 -0
  226. package/scripts/lib/skill-packs.js +161 -0
  227. package/scripts/lib/skills-operating-layer.js +580 -0
  228. package/scripts/lib/smart-work-routing.js +768 -0
  229. package/scripts/lib/source-catalog.js +700 -0
  230. package/scripts/lib/status-value-summary.js +32 -0
  231. package/scripts/lib/support-bundle.js +578 -0
  232. package/scripts/lib/task-continuation.js +440 -0
  233. package/scripts/lib/test-helpers.js +15 -0
  234. package/scripts/lib/tier.js +38 -0
  235. package/scripts/lib/token-context-quality-gate.js +370 -0
  236. package/scripts/lib/token-cost-capture.js +187 -0
  237. package/scripts/lib/token-cost-intelligence.js +358 -0
  238. package/scripts/lib/token-efficiency-evidence.js +213 -0
  239. package/scripts/lib/token-evidence.js +699 -0
  240. package/scripts/lib/tokenish.js +17 -0
  241. package/scripts/lib/tool-output-sandbox.js +304 -0
  242. package/scripts/lib/trust-audit.js +136 -0
  243. package/scripts/lib/unified-events.js +396 -0
  244. package/scripts/lib/upgrade-interruption-recovery.js +407 -0
  245. package/scripts/lib/usage-ledger.js +201 -0
  246. package/scripts/lib/value-ledger.js +130 -0
  247. package/scripts/lib/value-proof-calibration.js +531 -0
  248. package/scripts/lib/visual-qa.js +231 -0
  249. package/scripts/lib/voice-alpha.js +29 -0
  250. package/scripts/lib/work-aware-orchestration.js +976 -0
  251. package/scripts/lib/work-control-receipts.js +577 -0
  252. package/scripts/lib/work-ledger.js +1123 -0
  253. package/scripts/lib/work-panel-preview.js +352 -0
  254. package/scripts/lib/workflow-discipline.js +280 -0
  255. package/scripts/lib/workflow-signals.js +419 -0
  256. package/scripts/lib/workspace-map.js +281 -0
  257. package/scripts/lib/workspace-registry.js +1367 -0
  258. package/scripts/lib/workspace-resolver.js +480 -0
@@ -0,0 +1,368 @@
1
+ "use strict";
2
+
3
+ // ── Package Content Audit ─────────────────────────────────────────────────────
4
+ // Contract: avorelo.packageContentAudit.v1
5
+ // Answers: "What files would npm publish include, and are any forbidden/suspicious?"
6
+ // Uses npm pack --dry-run. Never runs npm publish.
7
+
8
+ const fs = require("fs");
9
+ const path = require("path");
10
+ const { nowIso } = require("./fsx");
11
+ const { appendProductLearningEvent } = require("./product-learning-events");
12
+ const {
13
+ readPackageJson,
14
+ getBinEntries,
15
+ getPublishConfig,
16
+ runNpm,
17
+ normalizeRelativePath,
18
+ collectRuntimeDependencyGraph,
19
+ findMissingRuntimeDependencies,
20
+ getPublicRuntimeEntryFiles,
21
+ } = require("./package-runtime");
22
+
23
+ const CONTRACT = "avorelo.packageContentAudit.v1";
24
+ const SCHEMA_VERSION = 1;
25
+ const ARTIFACT_DIR_REL = ".claude/cco/orchestration/public-distribution";
26
+ const ARTIFACT_REL = ARTIFACT_DIR_REL + "/latest-package-content-audit.json";
27
+
28
+ const FORBIDDEN_PATTERNS = [
29
+ // .env files — but NOT .example files (those are safe templates)
30
+ { pattern: /^\.env($|\.[^e]|\.[e][^x]|\.[ex][^a])/i, reason: "env file (not example)" },
31
+ // Actual secret stores — NOT source files that merely mention secrets
32
+ { pattern: /\.env\.local$/i, reason: ".env.local file" },
33
+ { pattern: /\.env\.production$/i, reason: ".env.production file" },
34
+ { pattern: /\.env\.development$/i, reason: ".env.development file" },
35
+ { pattern: /npm-token/i, reason: "npm token file" },
36
+ { pattern: /\.npmtoken$/i, reason: "npm token file" },
37
+ { pattern: /\.npmrc$/, reason: ".npmrc (may contain tokens)" },
38
+ { pattern: /^\.claude\//i, reason: "claude runtime state" },
39
+ { pattern: /^\.avorelo\//i, reason: "avorelo runtime state" },
40
+ { pattern: /^\.wuz\//i, reason: "wuz runtime state (internal)" },
41
+ { pattern: /^artifacts\//i, reason: "runtime artifacts" },
42
+ { pattern: /^apps\/public-web\//i, reason: "public website source" },
43
+ { pattern: /^tests?\//i, reason: "test files" },
44
+ { pattern: /^docs\//i, reason: "docs not required at runtime" },
45
+ { pattern: /^deferred\//i, reason: "deferred sources" },
46
+ { pattern: /^dist\//i, reason: "build output" },
47
+ { pattern: /^screenshots?\//i, reason: "screenshots" },
48
+ { pattern: /^reports?\//i, reason: "generated reports" },
49
+ { pattern: /^\.git\//i, reason: "git internals" },
50
+ /^node_modules\//i,
51
+ /\.tgz$/i,
52
+ ];
53
+
54
+ const SUSPICIOUS_PATTERNS = [
55
+ /^tests?\//i,
56
+ /^spec\//i,
57
+ /^e2e-tests?\//i,
58
+ /^\.github\//i,
59
+ /\.log$/i,
60
+ /^screenshots?\//i,
61
+ /^videos?\//i,
62
+ /\.backup$/i,
63
+ /^docs\/dogfood\//i,
64
+ /^docs\/feedback\//i,
65
+ ];
66
+
67
+ const REQUIRED_FILES = [
68
+ "package.json",
69
+ "bin/avorelo",
70
+ "scripts/lib/public-cli.js",
71
+ ];
72
+
73
+ function safeReadJson(absPath) {
74
+ try {
75
+ if (!fs.existsSync(absPath)) return null;
76
+ return JSON.parse(fs.readFileSync(absPath, "utf8").replace(/^/, ""));
77
+ } catch { return null; }
78
+ }
79
+
80
+ // ── npm pack --dry-run ────────────────────────────────────────────────────────
81
+
82
+ function runNpmPackDryRun(cwd, options) {
83
+ const result = runNpm(["pack", "--dry-run", "--json"], {
84
+ cwd,
85
+ timeoutMs: 30000,
86
+ cacheLabel: "package-audit",
87
+ });
88
+ return {
89
+ success: result.success,
90
+ output: result.stdout || "",
91
+ stderr: result.stderr || "",
92
+ combinedOutput: result.combinedOutput || "",
93
+ errorSummary: result.errorSummary || "",
94
+ };
95
+ }
96
+
97
+ // ── Parse npm pack output ─────────────────────────────────────────────────────
98
+
99
+ function parseNpmPackOutput(output, options) {
100
+ const trimmedOutput = (output || "").trim();
101
+ if (trimmedOutput.startsWith("[")) {
102
+ try {
103
+ const parsedJson = JSON.parse(trimmedOutput);
104
+ const firstEntry = Array.isArray(parsedJson) ? parsedJson[0] : parsedJson;
105
+ const files = Array.isArray(firstEntry && firstEntry.files)
106
+ ? firstEntry.files.map(function(entry) { return entry.path; })
107
+ : [];
108
+ return {
109
+ files,
110
+ totalFiles: firstEntry && typeof firstEntry.entryCount === "number" ? firstEntry.entryCount : files.length,
111
+ totalSizeEstimate: firstEntry && typeof firstEntry.size === "number" ? String(firstEntry.size) + " bytes" : "unknown",
112
+ };
113
+ } catch {
114
+ // Fall through to legacy npm notice parsing below.
115
+ }
116
+ }
117
+
118
+ // npm pack --dry-run format (npm v7+):
119
+ // npm notice === Tarball Contents ===
120
+ // npm notice 1.2kB package.json
121
+ // npm notice 12.3kB bin/avorelo
122
+ // ...
123
+ // npm notice === Tarball Details ===
124
+ // npm notice total files: N
125
+ // npm notice bundled size: X bytes
126
+ const files = [];
127
+ let totalSizeEstimate = null;
128
+ let totalFiles = null;
129
+
130
+ const lines = output.split("\n");
131
+ let inContents = false;
132
+
133
+ for (const line of lines) {
134
+ // Detect section header
135
+ if (/tarball contents/i.test(line)) { inContents = true; continue; }
136
+ if (/tarball details/i.test(line)) { inContents = false; continue; }
137
+
138
+ if (inContents) {
139
+ // Match: "npm notice 1.2kB some/path/file.js"
140
+ const m = line.match(/npm\s+notice\s+[\d.]+\s*[kKmMbB]+\s+(.+)/);
141
+ if (m) {
142
+ files.push(m[1].trim());
143
+ }
144
+ }
145
+
146
+ // Also look for "total files:" line
147
+ const totalM = line.match(/total files:\s*(\d+)/i);
148
+ if (totalM) totalFiles = parseInt(totalM[1], 10);
149
+
150
+ const sizeM = line.match(/package size:\s*(.+)/i);
151
+ if (sizeM) totalSizeEstimate = sizeM[1].trim();
152
+ }
153
+
154
+ // Fallback: if npm pack outputs lines without "npm notice" prefix
155
+ if (files.length === 0) {
156
+ for (const line of lines) {
157
+ const trimmed = line.trim();
158
+ if (trimmed && !trimmed.startsWith("npm") && !trimmed.startsWith("{") && trimmed.includes("/")) {
159
+ files.push(trimmed);
160
+ }
161
+ }
162
+ }
163
+
164
+ // Deduplicate (combined stderr+stdout can have dupes)
165
+ const uniqueFiles = Array.from(new Set(files));
166
+ return { files: uniqueFiles, totalFiles: totalFiles || uniqueFiles.length, totalSizeEstimate: totalSizeEstimate || "unknown" };
167
+ }
168
+
169
+ // ── Audit the file list ───────────────────────────────────────────────────────
170
+
171
+ function auditPackFileList(fileList, options) {
172
+ const forbiddenFiles = [];
173
+ const suspiciousFiles = [];
174
+ const requiredPresent = [];
175
+ const requiredMissing = [];
176
+
177
+ for (const f of fileList) {
178
+ const normalized = normalizeRelativePath(f);
179
+
180
+ // .example files are safe templates, never forbidden
181
+ if (/\.example$/i.test(normalized)) { /* skip forbidden check */ }
182
+ else {
183
+ for (const entry of FORBIDDEN_PATTERNS) {
184
+ const pat = entry.pattern || entry;
185
+ if (pat.test(normalized)) {
186
+ forbiddenFiles.push(f);
187
+ break;
188
+ }
189
+ }
190
+ }
191
+
192
+ for (const pat of SUSPICIOUS_PATTERNS) {
193
+ if (pat.test(normalized)) {
194
+ suspiciousFiles.push(f);
195
+ break;
196
+ }
197
+ }
198
+ }
199
+
200
+ for (const req of REQUIRED_FILES) {
201
+ const found = fileList.some(function(f) {
202
+ return f.replace(/\\/g, "/") === req || f.replace(/\\/g, "/").endsWith("/" + req);
203
+ });
204
+ if (found) {
205
+ requiredPresent.push(req);
206
+ } else {
207
+ requiredMissing.push(req);
208
+ }
209
+ }
210
+
211
+ return { forbiddenFiles, suspiciousFiles, requiredPresent, requiredMissing };
212
+ }
213
+
214
+ // ── Build audit ───────────────────────────────────────────────────────────────
215
+
216
+ function buildPackageContentAudit(cwd, options) {
217
+ const pkg = readPackageJson(cwd);
218
+ const binEntries = getBinEntries(pkg);
219
+ const publishConfig = getPublishConfig(pkg);
220
+ const filesAllowlist = Array.isArray(pkg && pkg.files) ? pkg.files.slice() : [];
221
+ const runtimeGraph = collectRuntimeDependencyGraph(cwd, {
222
+ entryFiles: getPublicRuntimeEntryFiles(cwd),
223
+ });
224
+ const missingRuntimeDependencies = findMissingRuntimeDependencies(pkg, runtimeGraph);
225
+ const runResult = options && options.npmPackResult ? options.npmPackResult : runNpmPackDryRun(cwd, options);
226
+ const metadataProblems = [];
227
+
228
+ if (!pkg) metadataProblems.push("package.json missing or invalid");
229
+ if (pkg && pkg.name !== "avorelo") metadataProblems.push("package name must be avorelo");
230
+ if (pkg && !pkg.version) metadataProblems.push("package version missing");
231
+ if (pkg && pkg.private !== false) metadataProblems.push("package private flag must be false for ready_to_publish");
232
+ if (!publishConfig || publishConfig.access !== "public") metadataProblems.push("publishConfig.access must be public");
233
+ if (!binEntries.avorelo || binEntries.avorelo !== "bin/avorelo") metadataProblems.push("bin.avorelo must point to bin/avorelo");
234
+ if (filesAllowlist.length === 0) metadataProblems.push("package files allowlist missing");
235
+ if (missingRuntimeDependencies.length > 0) metadataProblems.push("runtime dependencies must be present in dependencies: " + missingRuntimeDependencies.join(", "));
236
+ if (runtimeGraph.missingLocalFiles.length > 0) metadataProblems.push("runtime graph references missing local files: " + runtimeGraph.missingLocalFiles.join(", "));
237
+
238
+ if (!runResult.success) {
239
+ return {
240
+ contract: CONTRACT,
241
+ schemaVersion: SCHEMA_VERSION,
242
+ generatedAt: nowIso(),
243
+ status: "not_available",
244
+ ok: false,
245
+ packageName: pkg && pkg.name ? pkg.name : null,
246
+ version: pkg && pkg.version ? pkg.version : null,
247
+ private: pkg ? pkg.private : null,
248
+ publishConfig,
249
+ binEntries,
250
+ filesAllowlist,
251
+ runtimeExternalDependencies: runtimeGraph.externalPackages,
252
+ runtimeDependenciesOk: missingRuntimeDependencies.length === 0 && runtimeGraph.missingLocalFiles.length === 0,
253
+ missingRuntimeDependencies,
254
+ missingLocalRuntimeFiles: runtimeGraph.missingLocalFiles,
255
+ runtimeFilesMissingFromPack: runtimeGraph.localFiles,
256
+ distributionState: "publish_blocked",
257
+ npmPackDryRunAvailable: false,
258
+ packageFiles: [],
259
+ fileCount: 0,
260
+ totalSizeEstimate: "unknown",
261
+ forbiddenFiles: [],
262
+ suspiciousFiles: [],
263
+ requiredFiles: { present: [], missing: REQUIRED_FILES },
264
+ missingRequiredFiles: REQUIRED_FILES,
265
+ metadataProblems,
266
+ safeNextAction: "npm pack --dry-run failed. Verify npm is available and package.json is valid.",
267
+ noPublicLaunchClaim: true,
268
+ redacted: true,
269
+ };
270
+ }
271
+
272
+ const combined = runResult.combinedOutput || [runResult.output, runResult.stderr].filter(Boolean).join("\n");
273
+ const parsed = parseNpmPackOutput(combined, options);
274
+ const { forbiddenFiles, suspiciousFiles, requiredPresent, requiredMissing } = auditPackFileList(parsed.files, options);
275
+ const packedFiles = new Set(parsed.files.map((entry) => normalizeRelativePath(entry)));
276
+ const runtimeFilesMissingFromPack = runtimeGraph.localFiles.filter((filePath) => !packedFiles.has(filePath));
277
+
278
+ let status;
279
+ if (metadataProblems.length > 0 || forbiddenFiles.length > 0 || runtimeFilesMissingFromPack.length > 0) {
280
+ status = "fail";
281
+ } else if (suspiciousFiles.length > 0 || requiredMissing.length > 0) {
282
+ status = "warn";
283
+ } else {
284
+ status = "pass";
285
+ }
286
+
287
+ const safeNextAction = metadataProblems.length > 0
288
+ ? "Fix package metadata before publish. Name/bin/private/publishConfig/files must all be explicit."
289
+ : forbiddenFiles.length > 0
290
+ ? "Add forbidden files to .npmignore immediately. Do not publish until resolved."
291
+ : runtimeFilesMissingFromPack.length > 0
292
+ ? "Ensure all runtime files required by the packed public CLI are included in the publish surface."
293
+ : requiredMissing.length > 0
294
+ ? "Verify required files (" + requiredMissing.join(", ") + ") will be included in the published package."
295
+ : suspiciousFiles.length > 0
296
+ ? "Review suspicious files and add to .npmignore if not needed in published package."
297
+ : "Package content audit passed. Proceed to local package smoke test.";
298
+
299
+ return {
300
+ contract: CONTRACT,
301
+ schemaVersion: SCHEMA_VERSION,
302
+ generatedAt: nowIso(),
303
+ status,
304
+ ok: status === "pass",
305
+ packageName: pkg && pkg.name ? pkg.name : null,
306
+ version: pkg && pkg.version ? pkg.version : null,
307
+ private: pkg ? pkg.private : null,
308
+ publishConfig,
309
+ binEntries,
310
+ filesAllowlist,
311
+ runtimeExternalDependencies: runtimeGraph.externalPackages,
312
+ runtimeDependenciesOk: missingRuntimeDependencies.length === 0 && runtimeGraph.missingLocalFiles.length === 0,
313
+ missingRuntimeDependencies,
314
+ missingLocalRuntimeFiles: runtimeGraph.missingLocalFiles,
315
+ runtimeFilesMissingFromPack,
316
+ distributionState: status === "pass" ? "ready_to_publish" : "publish_blocked",
317
+ npmPackDryRunAvailable: true,
318
+ packageFiles: parsed.files,
319
+ fileCount: parsed.totalFiles,
320
+ totalSizeEstimate: parsed.totalSizeEstimate,
321
+ forbiddenFiles,
322
+ suspiciousFiles,
323
+ requiredFiles: { present: requiredPresent, missing: requiredMissing },
324
+ missingRequiredFiles: requiredMissing,
325
+ metadataProblems,
326
+ safeNextAction,
327
+ noPublicLaunchClaim: true,
328
+ redacted: true,
329
+ };
330
+ }
331
+
332
+ // ── Write ─────────────────────────────────────────────────────────────────────
333
+
334
+ function writePackageContentAudit(cwd, audit) {
335
+ const dir = path.join(cwd, ARTIFACT_DIR_REL);
336
+ if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
337
+ fs.writeFileSync(path.join(cwd, ARTIFACT_REL), JSON.stringify(audit, null, 2));
338
+ }
339
+
340
+ // ── Format ────────────────────────────────────────────────────────────────────
341
+
342
+ function formatPackageContentAuditText(audit, options) {
343
+ if (!audit.npmPackDryRunAvailable) {
344
+ return "Package Content Audit [NOT_AVAILABLE]\n npm pack --dry-run failed. Cannot audit file list.";
345
+ }
346
+ const lines = [
347
+ "Package Content Audit [" + audit.status.toUpperCase() + "]",
348
+ " Package: " + (audit.packageName || "?") + "@" + (audit.version || "?"),
349
+ " Private: " + audit.private,
350
+ " publishConfig: " + JSON.stringify(audit.publishConfig || null),
351
+ " Files: " + audit.fileCount + " (" + audit.totalSizeEstimate + ")",
352
+ " Forbidden: " + audit.forbiddenFiles.length,
353
+ " Suspicious: " + audit.suspiciousFiles.length,
354
+ " Required present: " + audit.requiredFiles.present.length + "/" + REQUIRED_FILES.length,
355
+ " Missing required: " + (audit.missingRequiredFiles.join(", ") || "none"),
356
+ " Next: " + audit.safeNextAction,
357
+ ];
358
+ return lines.join("\n");
359
+ }
360
+
361
+ module.exports = {
362
+ runNpmPackDryRun,
363
+ parseNpmPackOutput,
364
+ auditPackFileList,
365
+ buildPackageContentAudit,
366
+ writePackageContentAudit,
367
+ formatPackageContentAuditText,
368
+ };
@@ -0,0 +1,278 @@
1
+ "use strict";
2
+
3
+ const fs = require("fs");
4
+ const os = require("os");
5
+ const path = require("path");
6
+ const { spawnSync } = require("child_process");
7
+ const { builtinModules } = require("module");
8
+
9
+ const BUILTIN_MODULES = new Set([
10
+ ...builtinModules,
11
+ ...builtinModules.map((name) => name.replace(/^node:/, "")),
12
+ ...builtinModules.map((name) => (name.startsWith("node:") ? name : `node:${name}`)),
13
+ ]);
14
+ const REQUIRE_PATTERN = /require\((["'])([^"']+)\1\)/g;
15
+ const OPTIONAL_REQUIRE_LOOKAROUND = 240;
16
+
17
+ function ensureDir(dirPath) {
18
+ if (!dirPath) return dirPath;
19
+ fs.mkdirSync(dirPath, { recursive: true });
20
+ return dirPath;
21
+ }
22
+
23
+ function readJson(absPath) {
24
+ try {
25
+ if (!fs.existsSync(absPath)) return null;
26
+ return JSON.parse(fs.readFileSync(absPath, "utf8").replace(/^\uFEFF/, ""));
27
+ } catch {
28
+ return null;
29
+ }
30
+ }
31
+
32
+ function readPackageJson(cwd) {
33
+ return readJson(path.join(cwd, "package.json"));
34
+ }
35
+
36
+ function getBinEntries(pkg) {
37
+ if (!pkg || !pkg.bin) return {};
38
+ return typeof pkg.bin === "string" ? { [pkg.name || "avorelo"]: pkg.bin } : { ...pkg.bin };
39
+ }
40
+
41
+ function getPublishConfig(pkg) {
42
+ return pkg && pkg.publishConfig && typeof pkg.publishConfig === "object"
43
+ ? { ...pkg.publishConfig }
44
+ : null;
45
+ }
46
+
47
+ function createCacheDir(label = "default") {
48
+ const safeLabel = String(label).replace(/[^a-z0-9_-]+/gi, "-").toLowerCase();
49
+ return ensureDir(path.join(os.tmpdir(), "avorelo-npm-cache", safeLabel));
50
+ }
51
+
52
+ function createTempDir(prefix) {
53
+ return fs.mkdtempSync(path.join(os.tmpdir(), prefix || "avorelo-"));
54
+ }
55
+
56
+ function buildPackageManagerEnv(options = {}) {
57
+ const env = {
58
+ ...process.env,
59
+ ...(options.env || {}),
60
+ };
61
+ env.npm_config_cache = options.cacheDir || createCacheDir(options.cacheLabel || "default");
62
+ env.npm_config_update_notifier = "false";
63
+ env.npm_config_fund = "false";
64
+ env.npm_config_audit = "false";
65
+ env.npm_config_loglevel = env.npm_config_loglevel || "warn";
66
+ return env;
67
+ }
68
+
69
+ function runPackageManagerCommand(tool, args, options = {}) {
70
+ const commandArgs = Array.isArray(args) ? args.slice() : [];
71
+ const env = buildPackageManagerEnv(options);
72
+ const spawnCommand = process.platform === "win32" ? "cmd" : tool;
73
+ const spawnArgs = process.platform === "win32" ? ["/c", tool, ...commandArgs] : commandArgs;
74
+ const result = spawnSync(spawnCommand, spawnArgs, {
75
+ cwd: options.cwd || process.cwd(),
76
+ env,
77
+ encoding: "utf8",
78
+ timeout: options.timeoutMs || 120000,
79
+ stdio: "pipe",
80
+ });
81
+
82
+ const stdout = result.stdout || "";
83
+ const stderr = result.stderr || "";
84
+ return {
85
+ success: result.status === 0,
86
+ status: result.status,
87
+ signal: result.signal || null,
88
+ stdout,
89
+ stderr,
90
+ combinedOutput: [stdout, stderr].filter(Boolean).join("\n").trim(),
91
+ errorSummary: [stderr, stdout].find(Boolean) || (result.error ? String(result.error) : ""),
92
+ cacheDir: env.npm_config_cache,
93
+ };
94
+ }
95
+
96
+ function runNpm(args, options = {}) {
97
+ return runPackageManagerCommand("npm", args, options);
98
+ }
99
+
100
+ function runNpx(args, options = {}) {
101
+ return runPackageManagerCommand("npx", args, options);
102
+ }
103
+
104
+ function normalizeRelativePath(filePath) {
105
+ return String(filePath || "").replace(/\\/g, "/").replace(/^\.\//, "");
106
+ }
107
+
108
+ function packageNameFromSpecifier(specifier) {
109
+ const normalized = String(specifier || "").replace(/^node:/, "");
110
+ if (!normalized || normalized.startsWith(".") || normalized.startsWith("/")) return null;
111
+ if (normalized.startsWith("@")) {
112
+ const parts = normalized.split("/");
113
+ return parts.length >= 2 ? `${parts[0]}/${parts[1]}` : normalized;
114
+ }
115
+ return normalized.split("/")[0];
116
+ }
117
+
118
+ function isFile(candidate) {
119
+ try {
120
+ return fs.existsSync(candidate) && fs.statSync(candidate).isFile();
121
+ } catch {
122
+ return false;
123
+ }
124
+ }
125
+
126
+ function resolveLocalModule(fromFile, specifier) {
127
+ const absoluteBase = path.resolve(path.dirname(fromFile), specifier);
128
+ const candidates = [
129
+ `${absoluteBase}.js`,
130
+ `${absoluteBase}.json`,
131
+ path.join(absoluteBase, "index.js"),
132
+ path.join(absoluteBase, "index.json"),
133
+ absoluteBase,
134
+ ];
135
+ return candidates.find((candidate) => isFile(candidate)) || null;
136
+ }
137
+
138
+ function isLikelyOptionalRequire(source, matchIndex) {
139
+ const start = Math.max(0, matchIndex - OPTIONAL_REQUIRE_LOOKAROUND);
140
+ const end = Math.min(source.length, matchIndex + OPTIONAL_REQUIRE_LOOKAROUND);
141
+ const before = source.slice(start, matchIndex);
142
+ const after = source.slice(matchIndex, end);
143
+ return /\btry\s*\{[^{}]*$/s.test(before) && /\}\s*catch\b/s.test(after);
144
+ }
145
+
146
+ function getPublicRuntimeEntryFiles(cwd) {
147
+ const root = path.resolve(cwd);
148
+ return [
149
+ path.join(root, "scripts", "lib", "alpha-activation.js"),
150
+ path.join(root, "scripts", "cco-status.js"),
151
+ path.join(root, "scripts", "cco-dashboard.js"),
152
+ ].filter((filePath) => fs.existsSync(filePath));
153
+ }
154
+
155
+ function collectRuntimeDependencyGraph(cwd, options = {}) {
156
+ const root = path.resolve(cwd);
157
+ const entryFiles = (options.entryFiles || [path.join(root, "bin", "avorelo")]).map((filePath) => path.resolve(filePath));
158
+ const visited = new Set();
159
+ const externalPackages = new Set();
160
+ const localFiles = new Set();
161
+ const missingLocalFiles = new Set();
162
+ const queue = entryFiles.slice();
163
+
164
+ while (queue.length > 0) {
165
+ const current = queue.shift();
166
+ if (!current || visited.has(current) || !fs.existsSync(current)) continue;
167
+ visited.add(current);
168
+ localFiles.add(normalizeRelativePath(path.relative(root, current)));
169
+
170
+ let source = "";
171
+ try {
172
+ source = fs.readFileSync(current, "utf8");
173
+ } catch {
174
+ continue;
175
+ }
176
+
177
+ REQUIRE_PATTERN.lastIndex = 0;
178
+ let match;
179
+ while ((match = REQUIRE_PATTERN.exec(source)) !== null) {
180
+ const specifier = match[2];
181
+ const optionalRequire = isLikelyOptionalRequire(source, match.index);
182
+ if (!specifier) continue;
183
+ if (specifier.startsWith(".")) {
184
+ const resolved = resolveLocalModule(current, specifier);
185
+ if (resolved) {
186
+ queue.push(resolved);
187
+ } else if (!optionalRequire) {
188
+ missingLocalFiles.add(normalizeRelativePath(path.relative(root, path.resolve(path.dirname(current), specifier))));
189
+ }
190
+ continue;
191
+ }
192
+
193
+ const packageName = packageNameFromSpecifier(specifier);
194
+ if (!packageName || BUILTIN_MODULES.has(packageName) || BUILTIN_MODULES.has(specifier) || optionalRequire) continue;
195
+ externalPackages.add(packageName);
196
+ }
197
+ }
198
+
199
+ return {
200
+ entryFiles: entryFiles.map((filePath) => normalizeRelativePath(path.relative(root, filePath))),
201
+ localFiles: Array.from(localFiles).sort(),
202
+ externalPackages: Array.from(externalPackages).sort(),
203
+ missingLocalFiles: Array.from(missingLocalFiles).sort(),
204
+ };
205
+ }
206
+
207
+ function findMissingRuntimeDependencies(pkg, runtimeGraph) {
208
+ const dependencies = pkg && pkg.dependencies && typeof pkg.dependencies === "object" ? pkg.dependencies : {};
209
+ return (runtimeGraph && Array.isArray(runtimeGraph.externalPackages) ? runtimeGraph.externalPackages : [])
210
+ .filter((packageName) => !Object.prototype.hasOwnProperty.call(dependencies, packageName))
211
+ .sort();
212
+ }
213
+
214
+ function buildPathRedactions(paths = []) {
215
+ const redactions = [];
216
+ for (const value of paths) {
217
+ if (!value) continue;
218
+ const normalized = String(value);
219
+ redactions.push([normalized, "<redacted-temp-path>"]);
220
+ redactions.push([normalized.replace(/\\/g, "/"), "<redacted-temp-path>"]);
221
+ redactions.push([normalized.replace(/\\/g, "\\\\"), "<redacted-temp-path>"]);
222
+ }
223
+ return redactions.sort((left, right) => right[0].length - left[0].length);
224
+ }
225
+
226
+ function redactPathsInText(text, paths = []) {
227
+ if (typeof text !== "string" || !text) return text;
228
+ let redacted = text;
229
+ for (const [target, replacement] of buildPathRedactions(paths)) {
230
+ redacted = redacted.split(target).join(replacement);
231
+ }
232
+ return redacted;
233
+ }
234
+
235
+ function redactPathsInValue(value, paths = []) {
236
+ if (typeof value === "string") return redactPathsInText(value, paths);
237
+ if (Array.isArray(value)) return value.map((entry) => redactPathsInValue(entry, paths));
238
+ if (!value || typeof value !== "object") return value;
239
+ const next = {};
240
+ for (const [key, entry] of Object.entries(value)) {
241
+ next[key] = redactPathsInValue(entry, paths);
242
+ }
243
+ return next;
244
+ }
245
+
246
+ function mapDistributionStateToStatus(distributionState) {
247
+ switch (distributionState) {
248
+ case "publish_blocked":
249
+ return "blocked";
250
+ case "private_local_only":
251
+ case "local_verified":
252
+ return "local_only";
253
+ case "ready_to_publish":
254
+ case "published_verified":
255
+ return "pass";
256
+ default:
257
+ return "warn";
258
+ }
259
+ }
260
+
261
+ module.exports = {
262
+ ensureDir,
263
+ readJson,
264
+ readPackageJson,
265
+ getBinEntries,
266
+ getPublishConfig,
267
+ createCacheDir,
268
+ createTempDir,
269
+ runNpm,
270
+ runNpx,
271
+ normalizeRelativePath,
272
+ collectRuntimeDependencyGraph,
273
+ findMissingRuntimeDependencies,
274
+ getPublicRuntimeEntryFiles,
275
+ redactPathsInText,
276
+ redactPathsInValue,
277
+ mapDistributionStateToStatus,
278
+ };
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+
3
+ const { PLAN_ENV, getCurrentPlan, getHistoryRetention, canExportReports } = require("./entitlements");
4
+ const { getPlan, listBucketsForPlan, comparePlans } = require("./plans");
5
+ const { buildVisualQaSurface } = require("./visual-qa");
6
+ const { buildPlanSecuritySurface } = require("./agent-enforcement");
7
+
8
+ function buildIncludedLine(planName, visualQaSurface) {
9
+ if (planName === "pro") {
10
+ return "Included: Better AI Coding Tasks, Advanced Context Optimization, more Visual QA, and advanced Agent Security.";
11
+ }
12
+ const quota = visualQaSurface?.quota;
13
+ const visualQaLabel = quota?.tracked ? `${quota.limit} Visual QA/${quota.period}` : "Visual QA";
14
+ return `Included: Better AI Coding Tasks, Basic Context Optimization, ${visualQaLabel}, and Basic Agent Security.`;
15
+ }
16
+
17
+ function buildUpgradeLine() {
18
+ return "Pro unlocks advanced task compilation, deeper context optimization, more Visual QA, least-privilege protection, and evidence history/export.";
19
+ }
20
+
21
+ function buildPlanSurface(cwd) {
22
+ const planName = getCurrentPlan({ cwd });
23
+ const plan = getPlan(planName) || getPlan("free");
24
+ const buckets = listBucketsForPlan(planName);
25
+ const visualQa = buildVisualQaSurface(cwd, { plan: planName });
26
+ const security = buildPlanSecuritySurface(cwd, { plan: planName });
27
+ const comparison = comparePlans();
28
+ const overrideValue = String(process.env[PLAN_ENV] || "").trim().toLowerCase();
29
+ const overrideNote = overrideValue === planName
30
+ ? `${PLAN_ENV}=${overrideValue} override active for local development/testing.`
31
+ : null;
32
+ return {
33
+ plan: planName,
34
+ planLabel: plan.name,
35
+ planSource: overrideNote ? "env_override" : "default_resolution",
36
+ overrideNote,
37
+ subtitle: plan.subtitle,
38
+ promise: plan.promise,
39
+ buckets: buckets.map((bucket) => bucket.label),
40
+ bucketDetails: buckets,
41
+ includedLine: buildIncludedLine(planName, visualQa),
42
+ upgradeLine: buildUpgradeLine(),
43
+ historyRetention: getHistoryRetention(planName),
44
+ canExportReports: canExportReports(planName),
45
+ visualQa,
46
+ security,
47
+ upgradeUnlocks: comparison.upgradeUnlocks,
48
+ };
49
+ }
50
+
51
+ module.exports = {
52
+ buildPlanSurface,
53
+ };