@atmem/architect 0.0.0-stage → 0.2.0-alpha.4.1

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 (498) hide show
  1. package/CONSTITUTION.md +144 -0
  2. package/README.md +33 -2
  3. package/agent-skills/discovery/SKILL.md +48 -0
  4. package/agent-skills/discovery/topics.json +139 -0
  5. package/agent-skills/generation-capabilities.json +760 -0
  6. package/agent-skills/service-lifecycle.json +21 -0
  7. package/agent-skills/specialists/architecture/SKILL.md +15 -0
  8. package/agent-skills/specialists/aws/SKILL.md +17 -0
  9. package/agent-skills/specialists/azure/SKILL.md +7 -0
  10. package/agent-skills/specialists/composition/SKILL.md +17 -0
  11. package/agent-skills/specialists/devops/SKILL.md +10 -0
  12. package/agent-skills/specialists/finops/SKILL.md +7 -0
  13. package/agent-skills/specialists/gcp/SKILL.md +7 -0
  14. package/agent-skills/specialists/ibm/SKILL.md +7 -0
  15. package/agent-skills/specialists/manifest.json +13 -0
  16. package/agent-skills/specialists/pulumi/SKILL.md +7 -0
  17. package/agent-skills/specialists/security/SKILL.md +7 -0
  18. package/agent-skills/specialists/terraform/SKILL.md +14 -0
  19. package/agent-skills/upstream/aws/LICENSE +175 -0
  20. package/agent-skills/upstream/aws/SKILL.md +125 -0
  21. package/agent-skills/upstream/azure/LICENSE +21 -0
  22. package/agent-skills/upstream/azure/SKILL.md +387 -0
  23. package/agent-skills/upstream/gcp/LICENSE +202 -0
  24. package/agent-skills/upstream/gcp/SKILL.md +159 -0
  25. package/agent-skills/upstream/manifest.json +57 -0
  26. package/agent-skills/upstream/pulumi/LICENSE +201 -0
  27. package/agent-skills/upstream/pulumi/SKILL.md +501 -0
  28. package/agent-skills/upstream/terraform/LICENSE +373 -0
  29. package/agent-skills/upstream/terraform/SKILL.md +316 -0
  30. package/agent-skills/workflows/workflows.json +601 -0
  31. package/cli/architect.mjs +3 -0
  32. package/cli/runtime.mjs +115 -0
  33. package/dist/assets/html2canvas.esm-QH1iLAAe.js +22 -0
  34. package/dist/assets/index-B97MkVMs.css +1 -0
  35. package/dist/assets/index-qtCM2D7O.js +21271 -0
  36. package/dist/assets/index.es-C6C0sneB.js +18 -0
  37. package/dist/assets/purify.es-CAi2OJFm.js +3 -0
  38. package/dist/assets/visual-export-DjbjgQbA.js +173 -0
  39. package/dist/favicon.svg +2 -0
  40. package/dist/fonts/DM-Sans-OFL.txt +93 -0
  41. package/dist/fonts/Manrope-OFL.txt +93 -0
  42. package/dist/fonts/NotoSans-Regular.ttf +0 -0
  43. package/dist/fonts/OFL.txt +94 -0
  44. package/dist/fonts/dm-sans-latin-wght-normal.woff2 +0 -0
  45. package/dist/fonts/manrope-latin-wght-normal.woff2 +0 -0
  46. package/dist/index.html +4 -0
  47. package/dist/licenses/aws-architect-LICENSE.txt +17 -0
  48. package/dist/licenses/aws-mcp-LICENSE.txt +175 -0
  49. package/dist/licenses/aws-mcp-NOTICE.txt +1 -0
  50. package/dist/licenses/cloud-emulation-notices.txt +36619 -0
  51. package/dist/licenses/dependency-notices.txt +6379 -0
  52. package/dist/licenses/emulation-notices.txt +717 -0
  53. package/dist/licenses/github-copilot-sdk-LICENSE.txt +21 -0
  54. package/dist/licenses/memory-dependency-notices.txt +3319 -0
  55. package/dist/licenses/openarchflow-LICENSE.txt +21 -0
  56. package/dist/licenses/python-dependency-notices.txt +11951 -0
  57. package/docs/upstream-lock.json +26 -0
  58. package/knowledge/engineering-practices.json +536 -0
  59. package/package.json +30 -4
  60. package/packaging/uv-release-lock.json +54 -0
  61. package/public/licenses/aws-architect-LICENSE.txt +17 -0
  62. package/public/licenses/aws-mcp-LICENSE.txt +175 -0
  63. package/public/licenses/aws-mcp-NOTICE.txt +1 -0
  64. package/public/licenses/cloud-emulation-notices.txt +36619 -0
  65. package/public/licenses/dependency-notices.txt +6379 -0
  66. package/public/licenses/emulation-notices.txt +717 -0
  67. package/public/licenses/github-copilot-sdk-LICENSE.txt +21 -0
  68. package/public/licenses/memory-dependency-notices.txt +3319 -0
  69. package/public/licenses/openarchflow-LICENSE.txt +21 -0
  70. package/public/licenses/python-dependency-notices.txt +11951 -0
  71. package/scripts/terraform-render.mjs +8 -0
  72. package/server/__init__.py +0 -0
  73. package/server/abstraction.py +28 -0
  74. package/server/agent_runtime.py +153 -0
  75. package/server/app.py +257 -0
  76. package/server/architect.py +112 -0
  77. package/server/architecture_activity.py +67 -0
  78. package/server/attachments.py +101 -0
  79. package/server/cloud-emulation-requirements.txt +29 -0
  80. package/server/codex_app_server.py +219 -0
  81. package/server/codex_engineering_backend.py +266 -0
  82. package/server/codex_worker_policy.py +170 -0
  83. package/server/contracts.py +315 -0
  84. package/server/copilot_worker.py +16 -0
  85. package/server/dependency_mirror.py +54 -0
  86. package/server/design_patch.py +43 -0
  87. package/server/emulation-requirements.txt +8 -0
  88. package/server/emulation_adapters.py +20 -0
  89. package/server/emulation_routes.py +98 -0
  90. package/server/emulation_worker.py +351 -0
  91. package/server/engineering_artifacts.py +215 -0
  92. package/server/engineering_assets/application-runtime.json +4372 -0
  93. package/server/engineering_assets/architecture_work.schema.json +79 -0
  94. package/server/engineering_assets/materialize_runtime.py +62 -0
  95. package/server/engineering_assets/prepare_tools.py +96 -0
  96. package/server/engineering_assets/sql_validation.py +59 -0
  97. package/server/engineering_contexts.py +120 -0
  98. package/server/engineering_delivery.py +210 -0
  99. package/server/engineering_finalization.py +210 -0
  100. package/server/engineering_handoff.py +163 -0
  101. package/server/engineering_jobs.py +206 -0
  102. package/server/engineering_knowledge.py +75 -0
  103. package/server/engineering_reconciliation.py +159 -0
  104. package/server/engineering_routes.py +469 -0
  105. package/server/engineering_sessions.py +273 -0
  106. package/server/engineering_tools.py +166 -0
  107. package/server/generation_lint.py +18 -0
  108. package/server/local_providers.py +181 -0
  109. package/server/local_validation.py +236 -0
  110. package/server/memory-requirements.lock +181 -0
  111. package/server/memory-requirements.txt +6 -0
  112. package/server/memory_routes.py +82 -0
  113. package/server/memory_service.py +273 -0
  114. package/server/memory_worker.py +66 -0
  115. package/server/openai_voice.py +80 -0
  116. package/server/packaged_app.py +9 -0
  117. package/server/pricing.py +84 -0
  118. package/server/process_control_observation.py +31 -0
  119. package/server/prompts.py +123 -0
  120. package/server/public_faq_emulation_worker.py +44 -0
  121. package/server/requirements.lock +1618 -0
  122. package/server/requirements.txt +68 -0
  123. package/server/runtime_dependency_locks.py +27 -0
  124. package/server/runtime_evidence.py +93 -0
  125. package/server/settings.py +14 -0
  126. package/server/skills.py +103 -0
  127. package/server/storage_emulation_worker.py +160 -0
  128. package/server/structured_emulation_worker.py +48 -0
  129. package/server/terraform_routes.py +118 -0
  130. package/server/upstream/__init__.py +0 -0
  131. package/server/upstream/agent/__init__.py +1 -0
  132. package/server/upstream/agent/aws_architect.py +600 -0
  133. package/server/upstream/agent/config/__init__.py +1 -0
  134. package/server/upstream/agent/config/agent_config.py +82 -0
  135. package/server/upstream/agent/config/prompts.py +138 -0
  136. package/server/upstream/agent/rate_limiter.py +62 -0
  137. package/server/upstream/utils/__init__.py +1 -0
  138. package/server/upstream/utils/file_writer.py +43 -0
  139. package/server/validation_applicability.py +85 -0
  140. package/server/validation_jobs.py +252 -0
  141. package/server/validation_workers.py +48 -0
  142. package/server/voice_routes.py +91 -0
  143. package/server/voice_worker.py +26 -0
  144. package/specs/028-convergence-evaluation/evidence/20261110-ibm-invoice-native/registry-structured/qualification.json +72 -0
  145. package/specs/028-convergence-evaluation/evidence/20261110-invoice-runtime/durable-current/receipt.json +61 -0
  146. package/specs/029-general-purpose-engine/evidence/20261111-runtime-dependencies/sdk/receipt.json +22 -0
  147. package/src/ArchitectureActivity.jsx +54 -0
  148. package/src/ArchitectureWorkPanel.jsx +46 -0
  149. package/src/ArtifactChecks.jsx +49 -0
  150. package/src/BlockRequirements.jsx +13 -0
  151. package/src/BrainActivity.jsx +11 -0
  152. package/src/ChatMessage.jsx +19 -0
  153. package/src/ChatResizeHandle.jsx +6 -0
  154. package/src/CodePreview.jsx +8 -0
  155. package/src/ComponentReview.jsx +31 -0
  156. package/src/DeliveryViews.jsx +59 -0
  157. package/src/EmulationPanel.jsx +44 -0
  158. package/src/EngagementViews.jsx +385 -0
  159. package/src/EngineeringPanel.jsx +151 -0
  160. package/src/ImplementationDelivery.jsx +55 -0
  161. package/src/JourneyViews.jsx +400 -0
  162. package/src/MemoryPanel.jsx +46 -0
  163. package/src/OpenAIVoicePanel.jsx +65 -0
  164. package/src/OutputsView.jsx +65 -0
  165. package/src/TerraformView.jsx +57 -0
  166. package/src/WorkbenchDialogs.jsx +532 -0
  167. package/src/activity-presentation.mjs +28 -0
  168. package/src/ai-qualification-scenarios.mjs +31 -0
  169. package/src/approval-application-files.mjs +32 -0
  170. package/src/approval-applications.mjs +82 -0
  171. package/src/approval-spec-kit.mjs +30 -0
  172. package/src/architecture-activity.css +28 -0
  173. package/src/architecture-activity.mjs +63 -0
  174. package/src/architecture-work.mjs +176 -0
  175. package/src/artifact-work.mjs +103 -0
  176. package/src/async-documents.mjs +191 -0
  177. package/src/atflow.css +1140 -0
  178. package/src/atforma.css +748 -0
  179. package/src/atmem-tokens.css +79 -0
  180. package/src/aws-preflight.mjs +60 -0
  181. package/src/aws-public-faq.mjs +102 -0
  182. package/src/aws-validation-scenarios.mjs +10 -0
  183. package/src/aws-validation.mjs +48 -0
  184. package/src/azure-plan-mocks.mjs +25 -0
  185. package/src/azure-structured.mjs +133 -0
  186. package/src/bedrock-summary.mjs +152 -0
  187. package/src/bounded-rag.mjs +60 -0
  188. package/src/brand.css +9 -0
  189. package/src/canvas-view.mjs +28 -0
  190. package/src/capability-composition.mjs +44 -0
  191. package/src/chat-attachments.mjs +13 -0
  192. package/src/cloud-provider-locks.mjs +9 -0
  193. package/src/cloud-storage-scenarios.mjs +2 -0
  194. package/src/component-review.mjs +55 -0
  195. package/src/composition-spec-kit.mjs +30 -0
  196. package/src/consultation-context.mjs +15 -0
  197. package/src/consultation.mjs +52 -0
  198. package/src/container-contracts.mjs +5 -0
  199. package/src/container-inspection.mjs +75 -0
  200. package/src/container-runtime.mjs +30 -0
  201. package/src/container-security-inspection.mjs +49 -0
  202. package/src/container-terraform.mjs +109 -0
  203. package/src/conversation.mjs +17 -0
  204. package/src/core.mjs +863 -0
  205. package/src/cross-cloud-storage.mjs +100 -0
  206. package/src/delivery-capabilities.mjs +25 -0
  207. package/src/delivery.mjs +58 -0
  208. package/src/deployment-ownership.mjs +10 -0
  209. package/src/deployment-region.mjs +11 -0
  210. package/src/derive.mjs +31 -0
  211. package/src/design-build-flow.mjs +10 -0
  212. package/src/diagram-attention.mjs +24 -0
  213. package/src/discovery.mjs +359 -0
  214. package/src/document.mjs +170 -0
  215. package/src/emulation-feedback.mjs +61 -0
  216. package/src/emulation-guidance.mjs +37 -0
  217. package/src/engagement.mjs +274 -0
  218. package/src/engineering-client.mjs +73 -0
  219. package/src/engineering-defaults.mjs +17 -0
  220. package/src/engineering.css +31 -0
  221. package/src/enterprise-application.mjs +76 -0
  222. package/src/enterprise-aws-host-infrastructure.mjs +62 -0
  223. package/src/enterprise-aws-host-tests.mjs +15 -0
  224. package/src/enterprise-aws-infrastructure-tests.mjs +38 -0
  225. package/src/enterprise-aws-infrastructure.mjs +138 -0
  226. package/src/enterprise-google-infrastructure.mjs +84 -0
  227. package/src/enterprise-google-tests.mjs +25 -0
  228. package/src/estimate.mjs +188 -0
  229. package/src/existing-references.mjs +18 -0
  230. package/src/external-identities.mjs +17 -0
  231. package/src/faq-lambda-build.mjs +28 -0
  232. package/src/gcp-structured.mjs +104 -0
  233. package/src/generation-provider.mjs +7 -0
  234. package/src/generation-quality.mjs +69 -0
  235. package/src/handoff.mjs +141 -0
  236. package/src/ibm-registry.mjs +12 -0
  237. package/src/ibm-structured.mjs +103 -0
  238. package/src/identifiers.mjs +15 -0
  239. package/src/implementation-map.mjs +14 -0
  240. package/src/implementation-outcome.mjs +8 -0
  241. package/src/incomplete-terraform.mjs +9 -0
  242. package/src/integrations.ts +137 -0
  243. package/src/interface-contracts.mjs +30 -0
  244. package/src/invoice-application.mjs +66 -0
  245. package/src/invoice-aws-operations.mjs +136 -0
  246. package/src/invoice-aws.mjs +143 -0
  247. package/src/invoice-azure-operations.mjs +147 -0
  248. package/src/invoice-azure.mjs +134 -0
  249. package/src/invoice-builder.mjs +35 -0
  250. package/src/invoice-dependencies.mjs +43 -0
  251. package/src/invoice-gcp-operations.mjs +178 -0
  252. package/src/invoice-gcp.mjs +104 -0
  253. package/src/invoice-ibm-operations.mjs +278 -0
  254. package/src/invoice-ibm.mjs +142 -0
  255. package/src/invoice-operations.mjs +143 -0
  256. package/src/invoice-plan.mjs +45 -0
  257. package/src/invoice-region.mjs +6 -0
  258. package/src/invoice-spec-kit.mjs +61 -0
  259. package/src/invoice-state.mjs +7 -0
  260. package/src/invoice-terraform.mjs +29 -0
  261. package/src/invoice-tests.mjs +122 -0
  262. package/src/journey-workspace.css +72 -0
  263. package/src/journey.mjs +87 -0
  264. package/src/levels.mjs +145 -0
  265. package/src/local-agent.mjs +184 -0
  266. package/src/main.jsx +2458 -0
  267. package/src/model-policy-preflight.mjs +34 -0
  268. package/src/openai-voice.mjs +102 -0
  269. package/src/output-bundle.mjs +11 -0
  270. package/src/ownership-inspection.mjs +28 -0
  271. package/src/pack.mjs +201 -0
  272. package/src/pricing.mjs +31 -0
  273. package/src/production-state.mjs +8 -0
  274. package/src/project-copy.mjs +10 -0
  275. package/src/project-file.mjs +160 -0
  276. package/src/project-links.mjs +3 -0
  277. package/src/protected-state.mjs +43 -0
  278. package/src/public-faq-builder.mjs +19 -0
  279. package/src/public-faq-clouds.mjs +251 -0
  280. package/src/public-faq.mjs +122 -0
  281. package/src/pulumi.mjs +123 -0
  282. package/src/python-container.mjs +25 -0
  283. package/src/python-runtime.mjs +50 -0
  284. package/src/rag-handler.mjs +43 -0
  285. package/src/rag-web-assets.mjs +52 -0
  286. package/src/rag-web.mjs +68 -0
  287. package/src/records.mjs +177 -0
  288. package/src/resources.mjs +163 -0
  289. package/src/review.mjs +252 -0
  290. package/src/runtime/EnterpriseDocument.java +89 -0
  291. package/src/runtime/approved_http_destination.py +72 -0
  292. package/src/runtime/aws-lambda-qualification-lock.json +7 -0
  293. package/src/runtime/aws-python-lock.json +82 -0
  294. package/src/runtime/aws-web-python-lock.json +887 -0
  295. package/src/runtime/aws_json_model.py +42 -0
  296. package/src/runtime/azure-python-lock.json +863 -0
  297. package/src/runtime/azure-sources.json +8 -0
  298. package/src/runtime/azure-test-lock.json +23 -0
  299. package/src/runtime/azure_acceptance.py +192 -0
  300. package/src/runtime/azure_structured.py +153 -0
  301. package/src/runtime/bounded_rag.py +126 -0
  302. package/src/runtime/catalog_admin.py +70 -0
  303. package/src/runtime/cloud-sql-proxy-lock.json +8 -0
  304. package/src/runtime/cloud-sql-proxy-security-review.json +30 -0
  305. package/src/runtime/connector_cli.py +50 -0
  306. package/src/runtime/connector_sync.py +70 -0
  307. package/src/runtime/durable-python-lock.json +247 -0
  308. package/src/runtime/durable_workflow.py +325 -0
  309. package/src/runtime/enterprise-application-manifest.json +110 -0
  310. package/src/runtime/enterprise-application-sources.json +266 -0
  311. package/src/runtime/enterprise-auth-python-lock.json +592 -0
  312. package/src/runtime/enterprise-aws-host-bootstrap-source.json +1 -0
  313. package/src/runtime/enterprise-aws-host-probe-source.json +1 -0
  314. package/src/runtime/enterprise-aws-task-template.json +235 -0
  315. package/src/runtime/enterprise-document-lock.json +18 -0
  316. package/src/runtime/enterprise-document.Dockerfile +15 -0
  317. package/src/runtime/enterprise-runtime-aws-python-lock.json +1115 -0
  318. package/src/runtime/enterprise-runtime-azure-python-lock.json +1106 -0
  319. package/src/runtime/enterprise-runtime-gcp-python-lock.json +1060 -0
  320. package/src/runtime/enterprise-runtime-ibm-python-lock.json +1096 -0
  321. package/src/runtime/enterprise-runtime-python-lock.json +1058 -0
  322. package/src/runtime/enterprise-runtime.Dockerfile +15 -0
  323. package/src/runtime/enterprise-web-app.js +1 -0
  324. package/src/runtime/enterprise-web-entry.js +105 -0
  325. package/src/runtime/enterprise-web-lock.json +29 -0
  326. package/src/runtime/enterprise-web-notices.txt +229 -0
  327. package/src/runtime/enterprise-web.css +4 -0
  328. package/src/runtime/enterprise-web.html +8 -0
  329. package/src/runtime/enterprise_audit.py +91 -0
  330. package/src/runtime/enterprise_audit_schema.sql +25 -0
  331. package/src/runtime/enterprise_auth_schema.sql +67 -0
  332. package/src/runtime/enterprise_auth_store.py +241 -0
  333. package/src/runtime/enterprise_aws_host_bootstrap.py +120 -0
  334. package/src/runtime/enterprise_aws_host_probe.py +105 -0
  335. package/src/runtime/enterprise_aws_hosts.py +136 -0
  336. package/src/runtime/enterprise_aws_jobs.py +300 -0
  337. package/src/runtime/enterprise_aws_objects.py +93 -0
  338. package/src/runtime/enterprise_aws_transfer.py +83 -0
  339. package/src/runtime/enterprise_azure_batch_api.py +128 -0
  340. package/src/runtime/enterprise_azure_host.py +599 -0
  341. package/src/runtime/enterprise_azure_jobs.py +294 -0
  342. package/src/runtime/enterprise_azure_objects.py +234 -0
  343. package/src/runtime/enterprise_azure_pool.py +161 -0
  344. package/src/runtime/enterprise_azure_transfer.py +122 -0
  345. package/src/runtime/enterprise_configuration.py +136 -0
  346. package/src/runtime/enterprise_document.py +116 -0
  347. package/src/runtime/enterprise_document_cli.py +32 -0
  348. package/src/runtime/enterprise_document_contract.py +54 -0
  349. package/src/runtime/enterprise_document_job.py +109 -0
  350. package/src/runtime/enterprise_document_jobs.py +122 -0
  351. package/src/runtime/enterprise_document_jobs_schema.sql +23 -0
  352. package/src/runtime/enterprise_extraction_cache.py +186 -0
  353. package/src/runtime/enterprise_extraction_schema.sql +17 -0
  354. package/src/runtime/enterprise_google_jobs.py +275 -0
  355. package/src/runtime/enterprise_google_transfer.py +85 -0
  356. package/src/runtime/enterprise_http.py +212 -0
  357. package/src/runtime/enterprise_identity.py +52 -0
  358. package/src/runtime/enterprise_knowledge.py +152 -0
  359. package/src/runtime/enterprise_models.py +94 -0
  360. package/src/runtime/enterprise_native.py +181 -0
  361. package/src/runtime/enterprise_oauth.py +132 -0
  362. package/src/runtime/enterprise_operator.py +160 -0
  363. package/src/runtime/enterprise_parser_service.py +136 -0
  364. package/src/runtime/enterprise_parser_transport.py +68 -0
  365. package/src/runtime/enterprise_queries.py +255 -0
  366. package/src/runtime/enterprise_queries_schema.sql +27 -0
  367. package/src/runtime/enterprise_query_service.py +111 -0
  368. package/src/runtime/enterprise_secrets.py +110 -0
  369. package/src/runtime/enterprise_sessions.py +95 -0
  370. package/src/runtime/enterprise_sources.py +260 -0
  371. package/src/runtime/enterprise_web.py +39 -0
  372. package/src/runtime/enterprise_worker.py +68 -0
  373. package/src/runtime/export_contract_acceptance.py +18 -0
  374. package/src/runtime/faq-output-contract.json +40 -0
  375. package/src/runtime/faq-web-app.js +41 -0
  376. package/src/runtime/faq-web.css +1 -0
  377. package/src/runtime/faq-web.html +6 -0
  378. package/src/runtime/gcp-sources.json +9 -0
  379. package/src/runtime/gcp_acceptance.py +110 -0
  380. package/src/runtime/gcp_structured.py +150 -0
  381. package/src/runtime/http_acceptance.py +39 -0
  382. package/src/runtime/iap-web-app.js +36 -0
  383. package/src/runtime/iap-web-source.json +1 -0
  384. package/src/runtime/ibm-python-lock.json +856 -0
  385. package/src/runtime/ibm-sources.json +9 -0
  386. package/src/runtime/ibm_acceptance.py +133 -0
  387. package/src/runtime/ibm_structured.py +113 -0
  388. package/src/runtime/invoice-azapi-provider-lock.json +7 -0
  389. package/src/runtime/invoice-ibm-provider-lock.json +7 -0
  390. package/src/runtime/invoice-parser-lock.json +1199 -0
  391. package/src/runtime/invoice-parser-python-lock.json +56 -0
  392. package/src/runtime/invoice-parser.Dockerfile +190 -0
  393. package/src/runtime/invoice-sources.json +58 -0
  394. package/src/runtime/invoice-test-sources.json +24 -0
  395. package/src/runtime/invoice-web.css +2 -0
  396. package/src/runtime/invoice-web.html +12 -0
  397. package/src/runtime/invoice-web.js +112 -0
  398. package/src/runtime/invoice_configuration.py +17 -0
  399. package/src/runtime/invoice_document.py +95 -0
  400. package/src/runtime/invoice_extraction.py +96 -0
  401. package/src/runtime/invoice_http.py +129 -0
  402. package/src/runtime/invoice_identity.py +5 -0
  403. package/src/runtime/invoice_maintenance.py +40 -0
  404. package/src/runtime/invoice_native.py +77 -0
  405. package/src/runtime/invoice_object_store.py +153 -0
  406. package/src/runtime/invoice_operations.py +108 -0
  407. package/src/runtime/invoice_operator.py +79 -0
  408. package/src/runtime/invoice_operator_core.py +39 -0
  409. package/src/runtime/invoice_operator_job.py +147 -0
  410. package/src/runtime/invoice_parser_cli.py +17 -0
  411. package/src/runtime/invoice_parser_identity.py +39 -0
  412. package/src/runtime/invoice_parser_service.py +89 -0
  413. package/src/runtime/invoice_parser_transport.py +89 -0
  414. package/src/runtime/invoice_processing.py +24 -0
  415. package/src/runtime/invoice_retention.py +16 -0
  416. package/src/runtime/invoice_runtime_secrets.py +43 -0
  417. package/src/runtime/invoice_stage.py +80 -0
  418. package/src/runtime/invoice_web.py +39 -0
  419. package/src/runtime/invoice_worker.py +50 -0
  420. package/src/runtime/lambda_faq.py +5 -0
  421. package/src/runtime/parser-requirements.lock +4 -0
  422. package/src/runtime/policy_review.py +18 -0
  423. package/src/runtime/postgres-qualification-lock.json +21 -0
  424. package/src/runtime/public-faq-sources.json +22 -0
  425. package/src/runtime/public_catalog_admin.py +122 -0
  426. package/src/runtime/public_catalog_store.py +125 -0
  427. package/src/runtime/public_faq.py +144 -0
  428. package/src/runtime/public_faq_app.py +49 -0
  429. package/src/runtime/python-container-lock.json +18 -0
  430. package/src/runtime/rag-sources.json +10 -0
  431. package/src/runtime/rag_acceptance.py +60 -0
  432. package/src/runtime/rag_aws_adapter.py +95 -0
  433. package/src/runtime/rds-ca-source.json +9 -0
  434. package/src/runtime/rds-global-ca.pem +2888 -0
  435. package/src/runtime/state-contract-check-source.json +4 -0
  436. package/src/runtime/state_contract_check.py +338 -0
  437. package/src/runtime/structured-source.json +1 -0
  438. package/src/runtime/structured-web-app.js +71 -0
  439. package/src/runtime/structured-web-source.json +1 -0
  440. package/src/runtime/structured_http.py +105 -0
  441. package/src/runtime/structured_output.py +48 -0
  442. package/src/runtime/web-python-lock.json +802 -0
  443. package/src/runtime/web_user_admin.py +44 -0
  444. package/src/runtime/workflow_application.py +62 -0
  445. package/src/runtime/workflow_bindings.py +128 -0
  446. package/src/runtime/workflow_configuration.py +40 -0
  447. package/src/runtime/workflow_connection.py +105 -0
  448. package/src/runtime/workflow_contract.py +54 -0
  449. package/src/runtime/workflow_database.py +94 -0
  450. package/src/runtime/workflow_errors.py +6 -0
  451. package/src/runtime/workflow_http.py +178 -0
  452. package/src/runtime/workflow_identity.py +69 -0
  453. package/src/runtime/workflow_payload.py +118 -0
  454. package/src/runtime/workflow_process_stage.py +88 -0
  455. package/src/runtime/workflow_profile.py +91 -0
  456. package/src/runtime/workflow_review.py +106 -0
  457. package/src/runtime/workflow_role_bootstrap.py +104 -0
  458. package/src/runtime/workflow_schema.sql +72 -0
  459. package/src/runtime/workflow_worker.py +142 -0
  460. package/src/runtime-settings.mjs +15 -0
  461. package/src/s3-access.mjs +14 -0
  462. package/src/source-contracts.mjs +17 -0
  463. package/src/spec-kit.mjs +186 -0
  464. package/src/state-custody.mjs +32 -0
  465. package/src/state-inspection.mjs +45 -0
  466. package/src/state-spec-kit.mjs +13 -0
  467. package/src/storage-tests.mjs +25 -0
  468. package/src/structured-api.mjs +133 -0
  469. package/src/structured-contract.mjs +19 -0
  470. package/src/structured-operation-policy.mjs +2 -0
  471. package/src/structured-web.mjs +17 -0
  472. package/src/style.css +1 -0
  473. package/src/system-description.mjs +26 -0
  474. package/src/terraform-admission.mjs +66 -0
  475. package/src/terraform-composition.mjs +83 -0
  476. package/src/terraform-expressions.mjs +46 -0
  477. package/src/terraform-validation-coverage.mjs +11 -0
  478. package/src/terraform.mjs +128 -0
  479. package/src/text-statistics.mjs +51 -0
  480. package/src/upstream/openarchflow/format-payload.ts +26 -0
  481. package/src/upstream/openarchflow/import/mermaid.ts +205 -0
  482. package/src/upstream/openarchflow/import/sql-ddl.ts +109 -0
  483. package/src/upstream/openarchflow/layout.ts +54 -0
  484. package/src/upstream/openarchflow/providers/aws.ts +196 -0
  485. package/src/upstream/openarchflow/providers/azure.ts +126 -0
  486. package/src/upstream/openarchflow/providers/cloudnative.ts +71 -0
  487. package/src/upstream/openarchflow/providers/generic.ts +227 -0
  488. package/src/upstream/openarchflow/providers/integration.ts +22 -0
  489. package/src/upstream/openarchflow/providers/types.ts +2 -0
  490. package/src/upstream/openarchflow/templates.ts +937 -0
  491. package/src/upstream-catalog.mjs +10 -0
  492. package/src/useChatScroll.jsx +36 -0
  493. package/src/useEmulation.jsx +36 -0
  494. package/src/validation-receipt.mjs +10 -0
  495. package/src/visual-export.mjs +92 -0
  496. package/src/voice-conversation.mjs +117 -0
  497. package/src/work-intake.mjs +24 -0
  498. package/src/workflow-runtime-inventory.mjs +3 -0
@@ -0,0 +1,532 @@
1
+ import {BrainActivity} from "./BrainActivity.jsx";
2
+ import React, { useState } from "react";
3
+ import { Cloud, Code2, GitBranch, Plus, ShieldCheck, Sparkles, Upload } from "lucide-react";
4
+ import { PROVIDERS, pdmTemplate, template } from "./core.mjs";
5
+ import {
6
+ UPSTREAM_TEMPLATES,
7
+ importDiagram,
8
+ loadUpstreamTemplate,
9
+ } from "./integrations.ts";
10
+ import { importPulumiSnapshot, snapshotToProject } from "./pulumi.mjs";
11
+ const PROVIDER_OPTIONS = [
12
+ ["claude-code", "Claude", "account"],
13
+ ["codex", "ChatGPT", "account"],
14
+ ["copilot", "GitHub Copilot", "account"],
15
+ ["gemini-cli", "Gemini", "account"],
16
+ ["anthropic", "Claude", "key"],
17
+ ["openai", "OpenAI", "key"],
18
+ ["gemini-api", "Gemini", "key"],
19
+ ["xai", "Grok", "key"],
20
+ ["bedrock", "Amazon Bedrock", "aws"],
21
+ ];
22
+ const DEFAULT_MODEL = { anthropic: "claude-opus-5-5" };
23
+ // Neutral monograms in each provider's familiar colour (no vendor logo files are bundled).
24
+ const MONO = {
25
+ "claude-code": ["C", "#d97757"],
26
+ codex: ["G", "#10a37f"],
27
+ copilot: ["Co", "#24292f"],
28
+ "gemini-cli": ["G", "#4285f4"],
29
+ anthropic: ["C", "#b4583a"],
30
+ openai: ["O", "#0d8a6a"],
31
+ "gemini-api": ["G", "#1a73e8"],
32
+ xai: ["X", "#000000"],
33
+ bedrock: ["B", "#1f777c"],
34
+ };
35
+ export const EFFORT_LABEL = { none: "Instant", minimal: "Instant", low: "Fast", medium: "Balanced", high: "Deep", xhigh: "Deeper", max: "Max", ultra: "Ultra" };
36
+
37
+ // Pick the readable foreground for each solid provider badge background.
38
+ function badgeInk(hex){
39
+ const channels=hex.replace('#','').match(/../g).map(v=>parseInt(v,16)/255).map(v=>v<=.04045?v/12.92:((v+.055)/1.055)**2.4);
40
+ const luminance=.2126*channels[0]+.7152*channels[1]+.0722*channels[2];
41
+ return luminance>.179?'#000':'#fff';
42
+ }
43
+
44
+ // Check your connection: pick a provider, sign in from here if needed, check, continue.
45
+ export function Connections({ session, connection, onCheck, onSave, onRetry, welcome = false }) {
46
+ const [choice, setChoice] = useState(connection?.provider || "claude-code"),
47
+ [model, setModel] = useState(connection?.model || "claude-opus-5-5"),
48
+ [key, setKey] = useState(""),
49
+ [state, setState] = useState("idle"),
50
+ [error, setError] = useState(""),
51
+ [list, setList] = useState([]),
52
+ [effort, setEffort] = useState(connection?.effort || ""),
53
+ [reason, setReason] = useState(""),
54
+ [keyStored, setKeyStored] = useState(0);
55
+ const kind = PROVIDER_OPTIONS.find((o) => o[0] === choice)?.[2];
56
+ const capability = session?.providers?.[choice];
57
+ const name = PROVIDER_OPTIONS.find((o) => o[0] === choice)?.[1];
58
+ const signedIn = capability?.signedIn;
59
+ // Step 1 is signing in (or a working key); only then do models appear to choose from.
60
+ const ready =
61
+ !!session &&
62
+ (kind === "account" ? capability?.installed && signedIn !== false : capability?.available);
63
+ const listed = list.find((m) => m.id === model);
64
+ const efforts = listed?.efforts || [];
65
+ const choiceNow = { provider: choice, model: model.trim(), ...(effort && efforts.includes(effort) ? { effort } : {}) };
66
+ // Real models and thinking levels, as the provider's own CLI reports them.
67
+ React.useEffect(() => {
68
+ if (!session) return;
69
+ let live = true;
70
+ fetch("/api/models", {
71
+ method: "POST",
72
+ headers: { "Content-Type": "application/json", Authorization: `Bearer ${session.token}` },
73
+ body: JSON.stringify({ provider: choice }),
74
+ })
75
+ .then((r) => (r.ok ? r.json() : Promise.reject(Error(r.status === 404 ? "AtMem AI Architect's helper is out of date — restart it with npm run local." : "Couldn't load models."))))
76
+ .then(({ models, reason }) => {
77
+ if (!live) return;
78
+ setList(models || []);
79
+ setReason(reason || "");
80
+ const keep = (models || []).find((m) => m.id === model);
81
+ const pick = keep || models?.[0];
82
+ if (pick) {
83
+ setModel(pick.id);
84
+ if (!pick.efforts?.includes(effort)) setEffort(pick.defaultEffort || pick.efforts?.[0] || "");
85
+ } else setModel("");
86
+ })
87
+ .catch((e) => {
88
+ if (!live) return;
89
+ setError(e.message);
90
+ });
91
+ return () => {
92
+ live = false;
93
+ };
94
+ }, [choice, session?.token, signedIn, capability?.available, keyStored]);
95
+
96
+ async function signIn() {
97
+ setError("");
98
+ setState("signing-in");
99
+ try {
100
+ const response = await fetch("/api/login", {
101
+ method: "POST",
102
+ headers: { "Content-Type": "application/json", Authorization: `Bearer ${session.token}` },
103
+ body: JSON.stringify({ provider: choice }),
104
+ });
105
+ const result = await response.json();
106
+ if (!response.ok) throw Error(result.detail || "Couldn't start sign-in.");
107
+ if (result.url) window.open(result.url, "_blank", "noopener");
108
+ // Wait for the provider's page to finish; the CLI reports when it's done.
109
+ for (let i = 0; i < 60; i++) {
110
+ await new Promise((r) => setTimeout(r, 2000));
111
+ const latest = await onRetry();
112
+ if (latest?.providers?.[choice]?.signedIn) return setState("idle");
113
+ }
114
+ setState("idle");
115
+ setError("Sign-in didn't finish. Try again.");
116
+ } catch (e) {
117
+ setState("idle");
118
+ setError(e.message);
119
+ }
120
+ }
121
+ async function storeKey() {
122
+ setError("");
123
+ try {
124
+ const response = await fetch("/api/credentials", {
125
+ method: "POST",
126
+ headers: { "Content-Type": "application/json", Authorization: `Bearer ${session.token}` },
127
+ body: JSON.stringify({ provider: choice, key: key.trim() }),
128
+ });
129
+ if (!response.ok) throw Error("Couldn't use that key.");
130
+ setKey("");
131
+ setKeyStored((n) => n + 1);
132
+ await onRetry();
133
+ } catch (e) {
134
+ setError(e.message);
135
+ }
136
+ }
137
+ async function check() {
138
+ setError("");
139
+ setState("checking");
140
+ try {
141
+ if (kind === "key" && key.trim()) await storeKey();
142
+ await onCheck(choiceNow);
143
+ setState("ok");
144
+ } catch (e) {
145
+ setState("idle");
146
+ setError(e.message);
147
+ }
148
+ }
149
+ const blocked =
150
+ !ready ||
151
+ !model ||
152
+ (kind === "account" && !capability?.installed) ||
153
+ (kind === "key" && !capability?.available && !key.trim()) ||
154
+ (kind === "aws" && !capability?.available);
155
+ return (
156
+ <div className="connect">
157
+ <h2>{welcome ? "Check your connection" : "Connection"}</h2>
158
+ {!session && (
159
+ <p className="error-box">
160
+ Looks like AtMem AI Architect's helper isn't running. Start it with <code>npm run local</code>, then{" "}
161
+ <button className="link" onClick={onRetry}>
162
+ retry
163
+ </button>
164
+ .
165
+ </p>
166
+ )}
167
+ <div className="provider-grid" role="radiogroup" aria-label="Provider">
168
+ {PROVIDER_OPTIONS.map(([id, label, how]) => {
169
+ const cap = session?.providers?.[id];
170
+ return (
171
+ <button
172
+ key={id}
173
+ role="radio"
174
+ aria-checked={choice === id}
175
+ aria-label={label}
176
+ className={`provider-tile ${choice === id ? "on" : ""}`}
177
+ disabled={state === "checking" || state === "signing-in"}
178
+ onClick={() => {
179
+ setChoice(id);
180
+ setModel(DEFAULT_MODEL[id] || "");
181
+ setList([]);
182
+ setKey("");
183
+ setError("");
184
+ setState("idle");
185
+ }}
186
+ >
187
+ <span className="mono" style={{ background: MONO[id][1], color:badgeInk(MONO[id][1]) }}>
188
+ {MONO[id][0]}
189
+ </span>
190
+ <span>
191
+ {label}
192
+ <small>{how === "account" ? (cap?.signedIn ? "Signed in" : "Sign in") : how === "key" ? "API key" : "AWS credentials"}</small>
193
+ </span>
194
+ {cap?.signedIn && (
195
+ <span className="signed" aria-hidden="true">
196
+ ✓
197
+ </span>
198
+ )}
199
+ </button>
200
+ );
201
+ })}
202
+ </div>
203
+ {kind === "account" && session && (
204
+ <div className="signin">
205
+ {!capability?.installed ? (
206
+ <span className="warn-text">{name} app not found on this computer.</span>
207
+ ) : signedIn ? (
208
+ <span className="ok-text">✓ Signed in</span>
209
+ ) : state === "signing-in" ? (
210
+ <span className="muted">Finish signing in on the page that opened…</span>
211
+ ) : capability?.canSignInFromApp ? (
212
+ <button className="btn" onClick={signIn}>
213
+ Sign in to {name}
214
+ </button>
215
+ ) : (
216
+ <span className="muted">Sign-in is checked when you press Check.</span>
217
+ )}
218
+ </div>
219
+ )}
220
+ {kind === "key" && (
221
+ <label className="dialog-field">
222
+ API key
223
+ <input
224
+ type="password"
225
+ autoComplete="off"
226
+ aria-label="Provider API key"
227
+ value={key}
228
+ onChange={(e) => setKey(e.target.value)}
229
+ placeholder={capability?.available ? "Already set" : "Paste key"}
230
+ />
231
+ {key.trim() && (
232
+ <button type="button" className="btn ghost" onClick={storeKey}>
233
+ Use this key
234
+ </button>
235
+ )}
236
+ </label>
237
+ )}
238
+ {ready && (
239
+ <>
240
+ <label className="dialog-field">
241
+ Model {!list.length&&!reason&&<BrainActivity size={22}/>}
242
+ <select
243
+ aria-label="Model"
244
+ value={model}
245
+ disabled={!list.length}
246
+ onChange={(e) => {
247
+ const m = list.find((x) => x.id === e.target.value);
248
+ setModel(e.target.value);
249
+ if (!m?.efforts?.includes(effort)) setEffort(m?.defaultEffort || m?.efforts?.[0] || "");
250
+ }}
251
+ >
252
+ {list.length ? (
253
+ list.map((m) => (
254
+ <option key={m.id} value={m.id}>
255
+ {m.name}
256
+ </option>
257
+ ))
258
+ ) : (
259
+ <option value="">{!session ? "Waiting for AtMem AI Architect's helper…" : reason || "Loading your models…"}</option>
260
+ )}
261
+ </select>
262
+ </label>
263
+ {efforts.length > 0 && (
264
+ <div className="dialog-field">
265
+ Thinking
266
+ <div className="seg effort" role="radiogroup" aria-label="Thinking">
267
+ {efforts.map((e) => (
268
+ <button key={e} role="radio" aria-checked={effort === e} className={effort === e ? "on" : ""} onClick={() => setEffort(e)}>
269
+ {EFFORT_LABEL[e] || e}
270
+ </button>
271
+ ))}
272
+ </div>
273
+ </div>
274
+ )}
275
+ </>
276
+ )}
277
+ {error && (
278
+ <p role="status" className="error-box">
279
+ {error}
280
+ </p>
281
+ )}
282
+ {state === "ok" ? (
283
+ <>
284
+ <p className="ok-text">
285
+ ✓ Works — {name} · {listed?.name || model}
286
+ {choiceNow.effort ? ` · ${EFFORT_LABEL[choiceNow.effort] || choiceNow.effort}` : ""}
287
+ </p>
288
+ <button className="button run-button full" onClick={() => onSave(choiceNow)}>
289
+ Continue
290
+ </button>
291
+ </>
292
+ ) : (
293
+ <button className="button run-button full" disabled={blocked || state !== "idle"} onClick={check}>
294
+ {state === "checking" ? <><BrainActivity/> Checking…</> : "Check"}
295
+ </button>
296
+ )}
297
+ </div>
298
+ );
299
+ }
300
+
301
+ export function TemplateDialog({ onLoad }) {
302
+ return (
303
+ <>
304
+ <h2>Templates</h2>
305
+ <div className="section-label">Predictive maintenance · runnable</div>
306
+ <div className="template-list">
307
+ {["aws", "azure", "gcp", "ibm"].map((p) => (
308
+ <button key={p} onClick={() => onLoad(pdmTemplate(p))}>
309
+ <Sparkles size={19} />
310
+ <span>
311
+ <strong>Predictive maintenance · {PROVIDERS[p].name}</strong>
312
+ <small>Sensors → ML pipeline → GenAI insights → existing app</small>
313
+ </span>
314
+ <Plus size={16} />
315
+ </button>
316
+ ))}
317
+ </div>
318
+ <div className="section-label">Analytics assistant · runnable</div>
319
+ <div className="template-list">
320
+ {["aws", "azure", "gcp", "ibm"].map((p) => (
321
+ <button key={p} onClick={() => onLoad(template(p))}>
322
+ <Sparkles size={21} />
323
+ <span>
324
+ <strong>{PROVIDERS[p].name} · Predictive AI assistant</strong>
325
+ <small>
326
+ Data → model → AI → policy → response · local fixtures
327
+ </small>
328
+ </span>
329
+ <Plus size={16} />
330
+ </button>
331
+ ))}
332
+ </div>
333
+ <div className="section-label">OPENARCHFLOW TEMPLATES · DESIGN ONLY</div>
334
+ <div className="template-list">
335
+ {UPSTREAM_TEMPLATES.map((t) => (
336
+ <button key={t.id} onClick={() => onLoad(loadUpstreamTemplate(t.id))}>
337
+ <Cloud size={19} />
338
+ <span>
339
+ <strong>{t.name}</strong>
340
+ <small>{t.description}</small>
341
+ </span>
342
+ <Plus size={16} />
343
+ </button>
344
+ ))}
345
+ </div>
346
+ </>
347
+ );
348
+ }
349
+ export function ImportDialog({ onLoad, onNotify }) {
350
+ const [format, setFormat] = useState("mermaid"),
351
+ [code, setCode] = useState(
352
+ "flowchart LR\n Data[Customer data]\n Model[Prediction model]\n Agent[AI assistant]\n Data --> Model\n Model --> Agent",
353
+ );
354
+ return (
355
+ <>
356
+ <div className="eyebrow">OPENARCHFLOW IMPORT ENGINE</div>
357
+ <h2>Bring an existing design.</h2>
358
+ <p>
359
+ Parsers are integrated from the pinned upstream. Imported blocks are
360
+ architecture references; they are not runnable cloud resources.
361
+ </p>
362
+ <label className="dialog-field">
363
+ Format
364
+ <select
365
+ aria-label="Diagram import format"
366
+ value={format}
367
+ onChange={(e) => setFormat(e.target.value)}
368
+ >
369
+ <option value="mermaid">Mermaid flowchart</option>
370
+ <option value="sql">SQL CREATE TABLE (basic syntax)</option>
371
+ </select>
372
+ </label>
373
+ <textarea
374
+ className="code-input"
375
+ aria-label="Diagram source"
376
+ value={code}
377
+ onChange={(e) => setCode(e.target.value)}
378
+ />
379
+ <button
380
+ className="button run-button full"
381
+ onClick={() => {
382
+ try {
383
+ onLoad(importDiagram(code, format));
384
+ } catch (error) {
385
+ onNotify(error.message);
386
+ }
387
+ }}
388
+ >
389
+ <Upload size={15} />
390
+ Import as architecture
391
+ </button>
392
+ </>
393
+ );
394
+ }
395
+ export function PulumiDialog({
396
+ snapshot,
397
+ onSnapshot,
398
+ onLoad,
399
+ onExport,
400
+ onNotify,
401
+ environment,
402
+ }) {
403
+ return (
404
+ <>
405
+ <div className="eyebrow">PULUMI · PREFERRED INFRASTRUCTURE PATH</div>
406
+ <h2>Design ↔ managed resources.</h2>
407
+ <p>
408
+ Keep design intent and observed state separate, then review changes
409
+ before adopting them.
410
+ </p>
411
+ <div className="pulumi-path">
412
+ <span>Canvas</span>
413
+ <GitBranch size={18} />
414
+ <span>Pulumi program</span>
415
+ <GitBranch size={18} />
416
+ <span>Stack state</span>
417
+ </div>
418
+ <button className="button run-button full" onClick={onExport}>
419
+ <Code2 size={15} />
420
+ Export {environment} Pulumi scaffold
421
+ </button>
422
+ <p className="modal-fine">
423
+ Scaffold only: metadata components and graph dependencies.
424
+ Provider-specific cloud resource implementations are not generated yet.
425
+ </p>
426
+ <label className="snapshot-upload">
427
+ <Upload size={20} />
428
+ <strong>Import a Pulumi stack export</strong>
429
+ <small>Metadata only · inputs, outputs and secrets discarded</small>
430
+ <input
431
+ type="file"
432
+ accept=".json,application/json"
433
+ aria-label="Import Pulumi snapshot"
434
+ onChange={async (e) => {
435
+ try {
436
+ const file = e.target.files?.[0];
437
+ if (!file) return;
438
+ if (file.size > 10_000_000)
439
+ throw Error("Snapshot must be smaller than 10 MB.");
440
+ onSnapshot(importPulumiSnapshot(JSON.parse(await file.text())));
441
+ } catch (error) {
442
+ onNotify(error.message);
443
+ }
444
+ e.target.value = "";
445
+ }}
446
+ />
447
+ </label>
448
+ {snapshot && (
449
+ <div className="snapshot-result">
450
+ <strong>
451
+ {snapshot.resources.length} resource references imported
452
+ </strong>
453
+ <p>{snapshot.notice}</p>
454
+ <div className="snapshot-resources">
455
+ {snapshot.resources.slice(0, 12).map((r) => (
456
+ <div key={r.id}>
457
+ <span>{PROVIDERS[r.provider].name}</span>
458
+ <strong>{r.name}</strong>
459
+ <small>{r.type}</small>
460
+ </div>
461
+ ))}
462
+ </div>
463
+ <button
464
+ className="button subtle full"
465
+ onClick={() => {
466
+ try {
467
+ onLoad(snapshotToProject(snapshot));
468
+ } catch (error) {
469
+ onNotify(error.message);
470
+ }
471
+ }}
472
+ >
473
+ Review these references on the canvas
474
+ </button>
475
+ </div>
476
+ )}
477
+ <div className="inspector-info">
478
+ <ShieldCheck size={17} />
479
+ <span>
480
+ Pulumi import can generate code for existing resources. Refresh
481
+ updates recorded state; it does not automatically rewrite source. This
482
+ MVP imports snapshot metadata only. No Pulumi commands or cloud APIs
483
+ are executed.
484
+ </span>
485
+ </div>
486
+ </>
487
+ );
488
+ }
489
+ export function FrontPanel({ project, run, onSelect }) {
490
+ return (
491
+ <section className="front-panel" aria-label="Front panel">
492
+ {project.nodes.map((n, i) => {
493
+ const step = run?.steps.find((s) => s.id === n.id);
494
+ const o = step?.output;
495
+ const value = o?.measures
496
+ ? `${o.measures.filter((m) => m.pass).length}/${o.measures.length} ✓`
497
+ : o?.work_order && n.data.kind === "tool"
498
+ ? o.work_order.id
499
+ : o?.drift && n.data.kind === "monitor"
500
+ ? `PSI ${o.drift.psi}`
501
+ : o?.prediction && n.data.kind === "predict"
502
+ ? `${Math.round(o.prediction.failure_probability * 100)}%`
503
+ : o?.training && n.data.kind === "train"
504
+ ? `P ${o.training.precision}`
505
+ : o?.coverage !== undefined && n.data.kind === "stream"
506
+ ? `${Math.round(o.coverage * 100)}%`
507
+ :
508
+ step?.output?.churn_probability !== undefined
509
+ ? `${Math.round(step.output.churn_probability * 100)}%`
510
+ : step?.output?.assertions
511
+ ? `${Object.values(step.output.assertions).filter(Boolean).length} ✓`
512
+ : step?.status === "failed"
513
+ ? "✕"
514
+ : step
515
+ ? "✓"
516
+ : "—";
517
+ return (
518
+ <button
519
+ key={n.id}
520
+ onClick={() => onSelect(n.id)}
521
+ className={`indicator ${step?.status || ""}`}
522
+ title={step?.error || step?.status || "Not run"}
523
+ >
524
+ <span className="indicator-number">{i + 1}</span>
525
+ <strong>{value}</strong>
526
+ <span>{n.data.label}</span>
527
+ </button>
528
+ );
529
+ })}
530
+ </section>
531
+ );
532
+ }
@@ -0,0 +1,28 @@
1
+ const toolNames={'project.read':'Read the current design','memory.lookup':'Looked up project memory','knowledge.lookup':'Looked up engineering sources','skills.lookup':'Checked engineering guidance','pricing.lookup':'Checked provider pricing evidence','pricing.aws_s3':'Checked provider pricing evidence'};
2
+ export function publicStepText(event){
3
+ const names={context_started:'Reading the design context',context_ready:'Design context ready',pass_started:'Preparing the next response',model_started:'Preparing a response',model_checked:'Checked the response',response_repair:'Retrying the reply format',response_ready:'Response ready',failed:'Could not finish',cancelled:'Stopped waiting'};
4
+ if(event.kind==='model_message')return event.text;
5
+ if(event.details?.tool){const label=toolNames[event.details.tool]||'Checked supporting evidence';return (event.kind==='tool_started'?label.replace('Looked up','Looking up').replace('Checked','Checking').replace('Read the','Reading the'):label)+(event.kind==='tool_cached'?' · used a saved result':event.kind==='tool_finished'&&event.details.success===false?' · evidence unavailable':'');}
6
+ return names[event.kind]||event.text||'Work update recorded';
7
+ }
8
+ const detail=event=>[...(event.details?.recordCount!==undefined?[event.details.recordCount+' relevant memory references']:[]),...(event.details?.skillIds?.length?['Guidance: '+event.details.skillIds.join(', ')]:[])].join(' · ');
9
+ export function architectureSteps(events){
10
+ const steps=[],pending=new Map();
11
+ for(const event of events){
12
+ const tool=event.details?.tool;
13
+ if(event.kind==='tool_started'&&tool){
14
+ // Without call IDs, overlapping starts are ambiguous and stay separate.
15
+ if(pending.has(tool))pending.set(tool,null);else pending.set(tool,steps.length);
16
+ }
17
+ if(['tool_finished','tool_cached'].includes(event.kind)&&tool&&pending.get(tool)!=null){
18
+ const index=pending.get(tool);steps[index]={...steps[index],text:publicStepText(event),detail:detail(event)||steps[index].detail,sources:[...steps[index].sources,event.sequence]};pending.delete(tool);continue;
19
+ }
20
+ if(['tool_finished','tool_cached'].includes(event.kind)&&tool)pending.delete(tool);
21
+ steps.push({id:event.sequence,text:publicStepText(event),message:event.kind==='model_message',sources:[event.sequence],...(detail(event)?{detail:detail(event)}:{})});
22
+ }
23
+ return steps;
24
+ }
25
+ export function architectureActivityLabel(turn,state,active){
26
+ const current=turn.clientStatus==='response_received'&&state==='running'?'response_ready':state;
27
+ return ({running:active?'Working':'Awaiting details',response_ready:'Response received',failed:'Could not finish',cancelled:'Stopped waiting',recovery_required:'Outcome unknown after restart',details_unavailable:'Some details unavailable'}[current])||({submitted:active?'Working':'Awaiting details',response_received:'Response received',failed:'Request failed',cancelled:'Stopped waiting'}[turn.clientStatus])||'Activity';
28
+ }
@@ -0,0 +1,31 @@
1
+ // Qualification requirements, not implemented-resource or emulator capability claims.
2
+ const families=[
3
+ ['iot','AI on IoT telemetry','Analyze synthetic sensor events for anomalous device behavior. Preserve device identity, timestamps and units. Include ingestion, durable buffering, validation, inference, results and an operator alert.', ['Reject unknown device and invalid units','Duplicate events produce one result','Late and out-of-order telemetry follows an explicit policy','Disconnected input recovers by replay','Anomaly output names evidence and model version'], 'Which matters more for the first test: immediate alerts or reliable processing after a device reconnects?'],
4
+ ['observability','AI on logs and traces','Correlate synthetic logs and distributed traces to explain a service incident. Include collection, redaction, storage/search, an AI analysis runtime and an operator-facing answer with source evidence. Treat log text as untrusted.', ['Redact secrets before model input','Link conclusions to exact trace or log IDs','Prompt injection in a log cannot issue tool calls','Missing spans yield uncertainty rather than invented causes','Repeated ingestion preserves a consistent incident timeline'], 'Which logs and traces can we use, and which fields must never reach the model?'],
5
+ ['rag','Permission-aware RAG','Answer questions over a small synthetic document collection with citations. Include ingestion, retrieval, model runtime, identity enforcement and an authenticated application. Use bounded keyword retrieval for this first test and keep all source permissions.', ['Denied documents never reach the model','Known questions cite current source revisions','Unsupported questions abstain','Updates and deletions change retrieval','Revocation during generation suppresses the answer'], 'Who may read each source, and how quickly must a revoked permission take effect?'],
6
+ ['chatbot','Authenticated AI chatbot','Build an authenticated conversational assistant for synthetic users. Include an application, per-user conversation state, model runtime, bounded context and an escalation path. No external actions in this first test.', ['One user cannot read another conversation','Context and response sizes are bounded','Model outage produces a recoverable response','Deleting a conversation removes its stored context','Escalation retains the approved conversation context'], 'Should conversation history persist between visits, and who may inspect it?'],
7
+ ['version-control','AI for version control','Review a synthetic pull request from an existing repository. Retrieve only the authorized diff and relevant files, analyze it with AI, and draft review comments linked to changed lines. Preserve the existing repository. Never push, merge or execute repository code.', ['Repository and branch permissions enforced','Untrusted repository instructions cannot trigger execution','Findings link to lines in the reviewed commit','A changed head commit invalidates the review','Retry does not post duplicate comments and posting requires approval'], 'Should the first version only draft comments, or also post them after explicit approval?'],
8
+ ['maintenance','Predictive maintenance','Predict equipment maintenance needs from synthetic sensor histories and maintenance records. Include ingestion, feature preparation, a versioned prediction model, held-out evaluation, drift monitoring and an operator work-order draft. No automatic equipment control.', ['Time-based split prevents future-label leakage','Missing sensors produce an explicit degraded result','Prediction records include feature and model versions','Evaluate false alarms and missed faults on held-out data','Work orders require approval and are idempotent'], 'What failure are we predicting, and how much advance warning would make a prediction useful?'],
9
+ ['customer-support','AI customer support','Assist support staff using a synthetic ticket queue, approved knowledge and customer records from an existing CRM. Include authorized retrieval, grounded answer drafting, a staff interface and human escalation. Never issue refunds or modify customer records automatically.', ['Customer and tenant boundaries preserved','Answers cite approved knowledge','Unsupported promises escalate to staff','Sensitive customer fields excluded from model input','Approved ticket updates are idempotent and auditable'], 'Which customer information may the assistant read, and which actions must remain with a person?'],
10
+ ['call-center','AI call center and CRM','Assist an agent during a synthetic support call. Include consent, audio ingestion, transcription, PII redaction, grounded agent suggestions, an approved call summary and a draft update to an existing CRM. Do not place calls or write CRM records automatically.', ['No audio processed before consent','Partial and final transcripts remain ordered','Sensitive audio-derived fields are redacted before generation','Unsupported suggestions are withheld or escalated','An approved CRM update uses the final transcript and cannot duplicate on retry'], 'Are we helping a human during the call, summarizing afterwards, or both?'],
11
+ ['cloud-operations','AI cloud infrastructure operations','Analyze a synthetic cloud inventory and propose an infrastructure correction. Include read-only inventory, policy checks, plan generation, a reviewable diff and approval/audit controls. Detect drift. Never apply, delete resources or request broader credentials automatically.', ['Inventory credentials are read-only','Untrusted resource tags cannot trigger commands','Plans identify affected resources and costs as estimates','Drift after review invalidates approval','Apply requires separate authorization and a rollback or recovery plan'], 'Which infrastructure may we inspect, and should this stage stop at a reviewed Terraform plan?'],
12
+ ['cybersecurity','AI cybersecurity triage','Triage synthetic security alerts using approved logs and asset context. Include ingestion, redaction, evidence retrieval, AI triage, an analyst queue and an auditable response proposal. Do not isolate hosts, disable users or execute payloads automatically.', ['Payloads and log instructions are treated as untrusted data','Restricted security evidence stays within analyst permissions','Severity claims cite observed evidence and uncertainty','Duplicate alerts preserve the investigation audit trail','Containment requires explicit approval and reversible action planning'], 'Which response actions may we recommend, and who approves containment?'],
13
+ ];
14
+ export const AI_QUALIFICATION_FAMILIES=families.map(([id,name,prompt,checks,question])=>({id,name,prompt,checks,question}));
15
+ export const AI_QUALIFICATION_SCENARIOS=['aws','azure','gcp','ibm'].flatMap(provider=>AI_QUALIFICATION_FAMILIES.map(f=>({...f,id:`${provider}-${f.id}`,family:f.id,provider,prompt:`Use ${({aws:'AWS',azure:'Azure',gcp:'Google Cloud',ibm:'IBM Cloud'})[provider]} for this synthetic architecture qualification. ${f.prompt} Acceptance criteria: ${f.checks.join("; ")}. Draw the complete end-to-end architecture with concrete service choices and connected flows. Explain the first local test, distinguish mocked model behavior from actual model validation, and ask one useful missing-decision question. Do not reduce this application to storage to satisfy generator coverage. Do not invent successful deployment or approved region/account access.`})));
16
+
17
+ // Bounded structural assessment only; label matching cannot qualify implementations.
18
+ export function assessAiArchitecture(project,scenario){
19
+ const nodes=(project.nodes||[]).filter(n=>n.data.kind!=='note'),ids=new Set(nodes.map(n=>n.id)),edges=(project.edges||[]).filter(e=>ids.has(e.source)&&ids.has(e.target));
20
+ const seen=new Set(nodes.length?[nodes[0].id]:[]);let previous=-1;
21
+ while(previous!==seen.size){previous=seen.size;for(const e of edges)if(seen.has(e.source)||seen.has(e.target)){seen.add(e.source);seen.add(e.target);}}
22
+ const proposed=nodes.filter(n=>n.data.origin!=='existing'&&n.data.provider!=='tools');
23
+ const checks=[
24
+ {name:'Application contains at least three required components',passed:nodes.length>=3},
25
+ {name:'Required components form one connected graph',passed:nodes.length>0&&seen.size===nodes.length},
26
+ {name:'Proposed cloud resources retain the requested provider',passed:proposed.length>0&&proposed.every(n=>n.data.provider===scenario.provider)},
27
+ {name:'Proposed cloud components name concrete services',passed:proposed.length>0&&proposed.every(n=>typeof n.data.service==='string'&&n.data.service.trim().length>0)},
28
+ {name:'AI application has not collapsed into only object storage',passed:proposed.some(n=>!(/storage|bucket|blob|amazon s3/i.test(n.data.service||n.data.label)))},
29
+ ];
30
+ return {kind:'static-graph-checks',checks,passed:checks.every(c=>c.passed),limitations:['Connectivity and service labels do not prove a complete design, implemented integrations, model quality or deployability.'],acceptanceRequirements:scenario.checks};
31
+ }
@@ -0,0 +1,32 @@
1
+ import {WORKFLOW_API_FILES} from './workflow-runtime-inventory.mjs';
2
+ import sources from './runtime/invoice-sources.json' with {type:'json'};
3
+ import {approvalProfiles} from './approval-applications.mjs';
4
+ import {resourceAddress} from './identifiers.mjs';
5
+ import {invoiceDependencies as workflowDependencies} from './invoice-dependencies.mjs';
6
+ import {pythonContainer} from './python-container.mjs';
7
+ const modules=WORKFLOW_API_FILES;
8
+ export function approvalApplicationFiles(project,environment){
9
+ const files={},records=[];
10
+ for(const {node,profile}of approvalProfiles(project)){
11
+ const root='applications/'+resourceAddress(node.id)+'/';
12
+ for(const name of modules){if(typeof sources[name]!=='string')throw Error('Shared application runtime inventory is incomplete: '+name);files[root+name]=sources[name];}
13
+ files[root+'workflow_schema.sql']=sources['workflow_schema.sql'];
14
+ const deferred=profile.format==='approval-application-template-v1',metadata=deferred?'application-template.json':'application-profile.json';
15
+ files[root+metadata]=JSON.stringify(profile,null,2)+'\n';
16
+ files[root+'api.py']='"""Owned API entrypoint; unresolved bindings never start a runtime."""\nimport os\nfrom pathlib import Path\nfrom workflow_application import load_profile,create_native_api\nfrom workflow_bindings import load_bound_profile\n\ndef app_factory(*,connection=None,jwks=None,binding_directory=None):\n root=Path(__file__).parent\n profile=load_bound_profile(root/"application-template.json",binding_directory or root/"runtime-binding") if (root/"application-template.json").exists() else load_profile(root/"application-profile.json")\n return create_native_api(profile,os.environ,connection=connection,jwks=jwks)\n';
17
+ if(deferred)files[root+'resolve-profile.py']='"""Resolve reviewed public output records offline; never query a cloud."""\nimport argparse\nfrom pathlib import Path\nimport sys\nsys.path.insert(0,str(Path(__file__).resolve().parent))\nfrom workflow_bindings import write_binding\nif __name__=="__main__":\n parser=argparse.ArgumentParser();parser.add_argument("--outputs",required=True);parser.add_argument("--out",required=True);args=parser.parse_args()\n write_binding(Path(__file__).with_name("application-template.json"),args.outputs,args.out)\n print("Public bindings resolved structurally; cloud and operating acceptance remain unverified.")\n';
18
+ const runtime=workflowDependencies(profile.provider),testing=workflowDependencies(profile.provider,{tests:true});
19
+ files[root+'requirements.lock']=runtime.requirements;files[root+'test-requirements.lock']=testing.requirements;
20
+ files[root+'dependency-sources.json']=JSON.stringify({sources:runtime.sources,resolutions:runtime.resolutions},null,2)+'\n';
21
+ files[root+'Dockerfile']=pythonContainer('api',[...modules,'api.py'],[metadata],{web:false,contract:false,assets:['workflow_schema.sql'],concurrency:32});
22
+ files[root+'.dockerignore']='*\n!requirements.lock\n!'+metadata+'\n!workflow_schema.sql\n'+[...modules,'api.py'].map(name=>'!'+name+'\n').join('');
23
+ const pending=['Provider API/worker/database/identity resource and environment linkage','Domain processor and reviewed destination mapping with real application acceptance','Explicit SQL initialization, role/membership admission, recovery/retention and operating acceptance'];
24
+ if(deferred)pending.push('Resolve the public native-output references into a fresh profile/receipt bundle before runtime startup');
25
+ if(profile.environment!==environment)pending.push('Profile environment '+profile.environment+' differs from export environment '+environment+'; retain and reconcile this choice');
26
+ const record={componentId:node.id,provider:profile.provider,profileEnvironment:profile.environment,exportEnvironment:environment,path:root,apiEntrypoint:'api:app_factory',workerEntrypoint:null,bindingStatus:deferred?'unresolved':'declared',sourceStatus:'shared-api-assembly-generated',infrastructureStatus:'not_implemented',applicationStatus:'not_verified',pending,cloudOperations:false};
27
+ records.push(record);files[root+'assembly-status.json']=JSON.stringify(record,null,2)+'\n';
28
+ files[root+'BUILD.md']='# Typed approval application source\n\nRead the application profile or template and assembly-status.json. For a template, run python -I resolve-profile.py --outputs /ABSOLUTE/PUBLIC-OUTPUT-LEDGER.json --out /ABSOLUTE/FRESH-BINDING-DIRECTORY. Supply that owned directory as the runtime-binding mount; a matching receipt is required before startup. The resolver performs no cloud lookup or verification. The shared API entrypoint and exact locked runtime are emitted from this component contract. Build the API image with the included Dockerfile; do not publish/deploy without authorization.\n\nThis does not implement the domain processor or generate provider resources. Preserve all requirements and existing systems. Write the domain stage from the full brief, then use create_native_worker(profile, environment, processor, deliver) in a concrete worker entrypoint. It must retain fixed profile/role/kind/realm/destination bindings; no metadata-driven imports, no dummy processor or unconditional acceptance. Run positive/negative local end-to-end checks before recording implementation.\n\nInitialize SQL only through the reviewed operator role. Enroll approved native users using membership_key(profile, complete_verified_subject); token role claims do not grant membership. Keep API and worker credentials separate and outside source. Verify provider transport/IAM/network, image/source identity, retention/recovery and target environment independently. Schema/compilation or an importable API is not application acceptance. No work gate is cleared by these files.\n';
29
+ }
30
+ if(records.length)files['approval-applications.json']=JSON.stringify({version:1,applications:records,boundary:'Component-selected shared source and explicit pending work; no whole application, infrastructure, account or deployment acceptance'},null,2)+'\n';
31
+ return files;
32
+ }