thinkwork-cli 0.12.11 → 0.12.15

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 (474) hide show
  1. package/README.md +42 -38
  2. package/dist/{api-client-ASJWIG3Z.js → api-client-4VT3FWOH.js} +1 -1
  3. package/dist/{chunk-JEHV35EU.js → chunk-H7AB42ES.js} +340 -30
  4. package/dist/cli.js +22157 -9229
  5. package/dist/commands/enterprise/templates/deploy-repo/.github/workflows/deploy.yml +17 -6
  6. package/dist/commands/enterprise/templates/deploy-repo/docs/runbook.md +81 -9
  7. package/dist/commands/enterprise/templates/deploy-repo/scripts/apply-release.mjs +183 -21
  8. package/dist/commands/enterprise/templates/deploy-repo/scripts/smoke.mjs +1 -2
  9. package/dist/commands/enterprise/templates/deploy-repo/terraform/main.tf +286 -0
  10. package/dist/drizzle/0000_petite_marvel_apes.sql +1188 -0
  11. package/dist/drizzle/0001_milky_surge.sql +103 -0
  12. package/dist/drizzle/0002_aberrant_mattie_franklin.sql +41 -0
  13. package/dist/drizzle/0003_exotic_ogun.sql +3 -0
  14. package/dist/drizzle/0004_glamorous_magneto.sql +2 -0
  15. package/dist/drizzle/0005_ancient_nocturne.sql +2 -0
  16. package/dist/drizzle/0006_new_colonel_america.sql +2 -0
  17. package/dist/drizzle/0007_unique_external_task_id.sql +31 -0
  18. package/dist/drizzle/0008_external_task_id_column.sql +43 -0
  19. package/dist/drizzle/0009_evaluations.sql +64 -0
  20. package/dist/drizzle/0010_eval_agent_template.sql +2 -0
  21. package/dist/drizzle/0011_eval_run_template.sql +2 -0
  22. package/dist/drizzle/0012_eval_seed_unique.sql +16 -0
  23. package/dist/drizzle/0013_motionless_white_queen.sql +140 -0
  24. package/dist/drizzle/0014_wiki_aggregation.sql +11 -0
  25. package/dist/drizzle/0015_pg_trgm_alias_title_indexes.sql +9 -0
  26. package/dist/drizzle/0016_wiki_schema_drops.sql +24 -0
  27. package/dist/drizzle/0017_wiki_places.sql +46 -0
  28. package/dist/drizzle/0018_agent_workspace_overlay.sql +26 -0
  29. package/dist/drizzle/0018_cool_firebird.sql +24 -0
  30. package/dist/drizzle/0018_skill_runs.sql +84 -0
  31. package/dist/drizzle/0019_condemned_dragon_man.sql +95 -0
  32. package/dist/drizzle/0019_webhook_skill_runs.sql +58 -0
  33. package/dist/drizzle/0020_crazy_the_anarchist.sql +9 -0
  34. package/dist/drizzle/0020_mutation_idempotency.sql +64 -0
  35. package/dist/drizzle/0021_crm_work_links.sql +76 -0
  36. package/dist/drizzle/0021_skill_runs_completion_hmac.sql +33 -0
  37. package/dist/drizzle/0022_add_billing_tables.sql +70 -0
  38. package/dist/drizzle/0022_seed_thinkwork_admin_permissions.sql +160 -0
  39. package/dist/drizzle/0022_stripe_billing_indexes.sql +48 -0
  40. package/dist/drizzle/0023_tenants_deactivation.sql +27 -0
  41. package/dist/drizzle/0024_tenant_mcp_admin_keys.sql +63 -0
  42. package/dist/drizzle/0025_v1_agent_architecture.sql +182 -0
  43. package/dist/drizzle/0026_thread_turns_add_kind.sql +28 -0
  44. package/dist/drizzle/0027_capability_catalog_and_manifests.sql +219 -0
  45. package/dist/drizzle/0028_aws_s3_extension.sql +26 -0
  46. package/dist/drizzle/0029_collapse_execution_types.sql +42 -0
  47. package/dist/drizzle/0030_retire_composition_primitives.sql +48 -0
  48. package/dist/drizzle/0031_thread_cleanup_drops.sql +131 -0
  49. package/dist/drizzle/0032_add_browser_automation_template_config.sql +24 -0
  50. package/dist/drizzle/0033_agent_operation_leases.sql +32 -0
  51. package/dist/drizzle/0034_agent_workspace_events.sql +116 -0
  52. package/dist/drizzle/0035_workspace_review_decisions.sql +19 -0
  53. package/dist/drizzle/0036_user_scoped_memory_wiki.sql +152 -0
  54. package/dist/drizzle/0037_user_profile_operating_model.sql +34 -0
  55. package/dist/drizzle/0042_agent_runtime_selector.sql +41 -0
  56. package/dist/drizzle/0043_wiki_search_tsv_tokenization.sql +48 -0
  57. package/dist/drizzle/0044_add_web_search_template_config.sql +7 -0
  58. package/dist/drizzle/0045_add_send_email_template_config.sql +7 -0
  59. package/dist/drizzle/0046_tenant_mcp_context_tools.sql +26 -0
  60. package/dist/drizzle/0047_add_context_engine_template_config.sql +7 -0
  61. package/dist/drizzle/0048_tenant_context_provider_settings.sql +22 -0
  62. package/dist/drizzle/0050_brain_v0_entity_subtype.sql +29 -0
  63. package/dist/drizzle/0051_brain_v0_tenant_entity_pages.sql +170 -0
  64. package/dist/drizzle/0052_brain_v0_external_refs.sql +41 -0
  65. package/dist/drizzle/0053_brain_v0_unresolved_mentions_subtype.sql +48 -0
  66. package/dist/drizzle/0054_wiki_compile_jobs_input.sql +28 -0
  67. package/dist/drizzle/0055_routines_stepfunctions_substrate.sql +202 -0
  68. package/dist/drizzle/0056_routine_step_events_dedup_idx.sql +25 -0
  69. package/dist/drizzle/0057_archive_legacy_python_routines.sql +36 -0
  70. package/dist/drizzle/0058_routines_visibility_and_owning_agent.sql +61 -0
  71. package/dist/drizzle/0061_routine_execution_asl_version_id.sql +29 -0
  72. package/dist/drizzle/0062_migrate_pi_to_flue.sql +110 -0
  73. package/dist/drizzle/0063_threads_session_data.sql +23 -0
  74. package/dist/drizzle/0064_tenant_credentials.sql +65 -0
  75. package/dist/drizzle/0067_thinkwork_computers_phase_one.sql +174 -0
  76. package/dist/drizzle/0068_drop_system_workflows_and_activation.sql +115 -0
  77. package/dist/drizzle/0069_compliance_schema.sql +364 -0
  78. package/dist/drizzle/0070_compliance_aurora_roles.sql +171 -0
  79. package/dist/drizzle/0072_threads_computer_ownership.sql +24 -0
  80. package/dist/drizzle/0073_compliance_tenant_anchor_state.sql +105 -0
  81. package/dist/drizzle/0074_compliance_event_hash_index.sql +49 -0
  82. package/dist/drizzle/0075_scheduled_jobs_computer_ownership.sql +27 -0
  83. package/dist/drizzle/0076_scheduled_jobs_marco_backfill.sql +69 -0
  84. package/dist/drizzle/0077_computers_primary_agent_id.sql +38 -0
  85. package/dist/drizzle/0078_tenant_customize_catalog.sql +46 -0
  86. package/dist/drizzle/0079_seed_tenant_customize_catalog.sql +53 -0
  87. package/dist/drizzle/0081_routines_catalog_slug.sql +42 -0
  88. package/dist/drizzle/0082_messages_parts_jsonb.sql +52 -0
  89. package/dist/drizzle/0083_computer_runbooks.sql +103 -0
  90. package/dist/drizzle/0084_artifacts_favorited_at.sql +32 -0
  91. package/dist/drizzle/0085_seed_thinkwork_computer_default_template.sql +46 -0
  92. package/dist/drizzle/0086_update_default_template_models.sql +19 -0
  93. package/dist/drizzle/0087_retire_oss_connectors.sql +77 -0
  94. package/dist/drizzle/0088_compliance_event_types_finance_pilot.sql +37 -0
  95. package/dist/drizzle/0089_remove_maniflow_eval_seeds.sql +81 -0
  96. package/dist/drizzle/0089_wiki_schema_extraction.sql +315 -0
  97. package/dist/drizzle/0090_brain_schema_extraction.sql +274 -0
  98. package/dist/drizzle/0091_drop_wiki_brain_compat_views.sql +118 -0
  99. package/dist/drizzle/0092_finish_oss_connector_retirement.sql +97 -0
  100. package/dist/drizzle/0093_eval_runs_scheduled_job_id.sql +23 -0
  101. package/dist/drizzle/0094_slack_workspace_app.sql +140 -0
  102. package/dist/drizzle/0095_eval_runs_computer_id.sql +22 -0
  103. package/dist/drizzle/0096_true_redteam_eval_seed_cleanup.sql +67 -0
  104. package/dist/drizzle/0097_shared_computers.sql +191 -0
  105. package/dist/drizzle/0098_business_ontology.sql +587 -0
  106. package/dist/drizzle/0099_thread_idle_learning.sql +145 -0
  107. package/dist/drizzle/0100_ontology_gated_brain_dynamic_subtypes.sql +7 -0
  108. package/dist/drizzle/0101_ontology_gated_unresolved_mentions_dynamic_subtypes.sql +7 -0
  109. package/dist/drizzle/0102_wiki_brain_owner_repair.sql +87 -0
  110. package/dist/drizzle/0103_brain_section_source_trigger_repair.sql +75 -0
  111. package/dist/drizzle/0104_expand_seed_ontology_for_user_memory.sql +166 -0
  112. package/dist/drizzle/0105_spaces_domain.sql +349 -0
  113. package/dist/drizzle/0106_expand_seed_ontology_for_triples.sql +173 -0
  114. package/dist/drizzle/0106_space_threads_participants.sql +197 -0
  115. package/dist/drizzle/0107_linked_task_mirror.sql +245 -0
  116. package/dist/drizzle/0108_message_mentions.sql +95 -0
  117. package/dist/drizzle/0109_space_owned_threads.sql +217 -0
  118. package/dist/drizzle/0110_thread_participant_read_state.sql +21 -0
  119. package/dist/drizzle/0111_agents_tenant_name_unique.sql +38 -0
  120. package/dist/drizzle/0112_recast_spaces_as_contextual_workrooms.sql +138 -0
  121. package/dist/drizzle/0113_agents_own_runtime_fields.sql +48 -0
  122. package/dist/drizzle/0114_migrate_templates_to_agents_and_spaces.sql +361 -0
  123. package/dist/drizzle/0115_remove_computer_eval_template_dependencies.sql +69 -0
  124. package/dist/drizzle/0116_backfill_thread_participants_access.sql +126 -0
  125. package/dist/drizzle/0117_space_access_mode.sql +40 -0
  126. package/dist/drizzle/0118_normalize_tenant_member_principal_type.sql +41 -0
  127. package/dist/drizzle/0119_space_knowledge_bases.sql +126 -0
  128. package/dist/drizzle/0120_space_automations.sql +58 -0
  129. package/dist/drizzle/0121_drop_computer_runbooks.sql +26 -0
  130. package/dist/drizzle/0122_space_email_triggers.sql +24 -0
  131. package/dist/drizzle/0123_single_platform_agent_and_overrides.sql +58 -0
  132. package/dist/drizzle/0124_thread_turns_finalized_at.sql +17 -0
  133. package/dist/drizzle/0125_drop_space_agent_assignments.sql +42 -0
  134. package/dist/drizzle/0126_migrate_flue_to_pi.sql +42 -0
  135. package/dist/drizzle/0127_runtime_type_observability.sql +28 -0
  136. package/dist/drizzle/0128_drop_eval_test_cases_agent_id.sql +37 -0
  137. package/dist/drizzle/0129_drop_code_factory_tables.sql +43 -0
  138. package/dist/drizzle/0129_eval_results_system_prompt.sql +30 -0
  139. package/dist/drizzle/0130_drop_teams_and_team_id_columns.sql +54 -0
  140. package/dist/drizzle/0131_drop_skill_catalog_and_tenant_skills.sql +33 -0
  141. package/dist/drizzle/0132_drop_computer_tables.sql +31 -0
  142. package/dist/drizzle/0133_drop_seed_view_tombstones.sql +79 -0
  143. package/dist/drizzle/0133_thread_turns_system_prompt.sql +22 -0
  144. package/dist/drizzle/0134_drop_dead_agent_runtime_tables.sql +53 -0
  145. package/dist/drizzle/0135_native_checklist_linked_tasks.sql +48 -0
  146. package/dist/drizzle/0136_goal_ledger.sql +55 -0
  147. package/dist/drizzle/0136_space_email_trigger_status.sql +66 -0
  148. package/dist/drizzle/0137_thread_participant_pins.sql +25 -0
  149. package/dist/drizzle/0138_users_cognito_sub.sql +30 -0
  150. package/dist/drizzle/0139_mobile_turn_client_id.sql +23 -0
  151. package/dist/drizzle/0140_workspace_folder_names.sql +36 -0
  152. package/dist/drizzle/0141_eval_runs_desktop_pi_provenance.sql +31 -0
  153. package/dist/drizzle/0142_pi_only_agent_runtime.sql +61 -0
  154. package/dist/drizzle/0143_add_web_extract_builtin_config.sql +28 -0
  155. package/dist/drizzle/0144_skill_catalog_index.sql +40 -0
  156. package/dist/drizzle/0145_knowledge_graph_thread_ingest.sql +512 -0
  157. package/dist/drizzle/0146_knowledge_graph_source_scope.sql +413 -0
  158. package/dist/drizzle/0147_knowledge_graph_scope_trigger_qualification.sql +211 -0
  159. package/dist/drizzle/0148_user_cost_attribution.sql +171 -0
  160. package/dist/drizzle/0149_managed_mcp_servers.sql +64 -0
  161. package/dist/drizzle/0149_user_model_approvals.sql +89 -0
  162. package/dist/drizzle/0150_bootstrap_first_admin_claim.sql +11 -0
  163. package/dist/drizzle/0151_managed_deployments.sql +91 -0
  164. package/dist/drizzle/0152_agent_profiles.sql +81 -0
  165. package/dist/drizzle/0153_message_mentions_agent_profile.sql +9 -0
  166. package/dist/drizzle/0154_customer_deployment_sessions.sql +61 -0
  167. package/dist/drizzle/0155_tenant_model_catalog.sql +152 -0
  168. package/dist/drizzle/0156_bootstrap_credential_leases.sql +52 -0
  169. package/dist/drizzle/0157_knowledge_graph_observations_source.sql +79 -0
  170. package/dist/drizzle/0158_pending_user_questions.sql +80 -0
  171. package/dist/drizzle/0158_wiki_tenant_scope.sql +38 -0
  172. package/dist/drizzle/0159_agent_profiles_space_local.sql +49 -0
  173. package/dist/drizzle/0159_application_plugins.sql +193 -0
  174. package/dist/drizzle/0159_eval_scoring_version.sql +46 -0
  175. package/dist/drizzle/0160_compliance_event_types_plugins.sql +37 -0
  176. package/dist/drizzle/0160_eval_datasets.sql +75 -0
  177. package/dist/drizzle/0160_eval_results_thread_turn.sql +35 -0
  178. package/dist/drizzle/0161_eval_run_pinning.sql +54 -0
  179. package/dist/drizzle/0161_tenant_mcp_servers_plugin_source.sql +62 -0
  180. package/dist/drizzle/0162_eval_result_override.sql +49 -0
  181. package/dist/drizzle/0163_eval_replay_tool_allowlist.sql +50 -0
  182. package/dist/drizzle/0164_eval_replay_tool_override_mode.sql +52 -0
  183. package/dist/drizzle/0165_plugin_premium_entitlements.sql +153 -0
  184. package/dist/drizzle/0166_company_brain_substrate_contract.sql +386 -0
  185. package/dist/drizzle/0167_company_brain_artifact_manifest_runtime.sql +85 -0
  186. package/dist/drizzle/0168_eval_skill_gate.sql +44 -0
  187. package/dist/drizzle/0169_release_update_jobs.sql +67 -0
  188. package/dist/drizzle/0170_email_channel_plugin.sql +291 -0
  189. package/dist/drizzle/0171_linked_task_external_providers.sql +30 -0
  190. package/dist/drizzle/0172_email_channel_sendgrid_provider.sql +8 -0
  191. package/dist/drizzle/0173_auth_provider_resources.sql +83 -0
  192. package/dist/drizzle/0174_workos_auth_bridges.sql +37 -0
  193. package/dist/drizzle/0175_workos_auth_sessions.sql +38 -0
  194. package/dist/drizzle/0176_n8n_agent_step_runs.sql +107 -0
  195. package/dist/drizzle/0177_workflow_control_plane.sql +281 -0
  196. package/dist/drizzle/0178_workflow_backfill_existing_routines.sql +525 -0
  197. package/dist/drizzle/0179_tenant_goal_budget_settings.sql +21 -0
  198. package/dist/drizzle/0180_skill_drafts.sql +89 -0
  199. package/dist/drizzle/0181_skill_draft_publish_status.sql +21 -0
  200. package/dist/drizzle/0182_agent_loops.sql +260 -0
  201. package/dist/drizzle/0183_okf_artifact_manifests.sql +52 -0
  202. package/dist/drizzle/0184_skill_catalog_trust_cache.sql +35 -0
  203. package/dist/drizzle/0185_agent_loop_space.sql +16 -0
  204. package/dist/drizzle/0186_tenant_mcp_runtime_metadata.sql +10 -0
  205. package/dist/drizzle/0187_native_work_items.sql +220 -0
  206. package/dist/drizzle/0188_company_etl_plugin_rename.sql +99 -0
  207. package/dist/drizzle/0189_trace_cost_substrate.sql +247 -0
  208. package/dist/drizzle/0190_billing_export_reconciliation.sql +101 -0
  209. package/dist/drizzle/0191_open_engine_work_item_queue.sql +66 -0
  210. package/dist/drizzle/0192_work_item_labels.sql +44 -0
  211. package/dist/drizzle/0193_work_item_documents.sql +31 -0
  212. package/dist/drizzle/0194_memory_retain_attempts.sql +103 -0
  213. package/dist/drizzle/0194_work_item_comments.sql +35 -0
  214. package/dist/drizzle/0195_plugin_app_overlays.sql +45 -0
  215. package/dist/drizzle/0196_pi_extensions.sql +118 -0
  216. package/dist/drizzle/0197_eval_profiles.sql +150 -0
  217. package/dist/drizzle/0198_eval_runs_unstable.sql +27 -0
  218. package/dist/drizzle/0199_eval_runs_cost_partial.sql +27 -0
  219. package/dist/drizzle/meta/_journal.json +160 -0
  220. package/dist/plugins/README.md +162 -0
  221. package/dist/plugins/catalog/package.json +40 -0
  222. package/dist/plugins/catalog/scripts/build-catalog.ts +120 -0
  223. package/dist/plugins/catalog/scripts/generate-plugin-registry.ts +144 -0
  224. package/dist/plugins/catalog/src/__tests__/build-catalog.test.ts +86 -0
  225. package/dist/plugins/catalog/src/__tests__/catalog.test.ts +308 -0
  226. package/dist/plugins/catalog/src/__tests__/contracts.test.ts +861 -0
  227. package/dist/plugins/catalog/src/__tests__/plugin-package.test.ts +124 -0
  228. package/dist/plugins/catalog/src/__tests__/plugin-registry.test.ts +120 -0
  229. package/dist/plugins/catalog/src/catalog.ts +434 -0
  230. package/dist/plugins/catalog/src/contracts.ts +1498 -0
  231. package/dist/plugins/catalog/src/index.ts +4 -0
  232. package/dist/plugins/catalog/src/plugin-package.ts +171 -0
  233. package/dist/plugins/catalog/src/registry/generated-first-party.ts +76 -0
  234. package/dist/plugins/catalog/src/registry/index.ts +1 -0
  235. package/dist/plugins/catalog/tsconfig.json +8 -0
  236. package/dist/plugins/company-brain/README.md +37 -0
  237. package/dist/plugins/company-brain/package.json +33 -0
  238. package/dist/plugins/company-brain/runtime/cognee/Dockerfile +11 -0
  239. package/dist/plugins/company-brain/smoke/cognee-managed-app-smoke.mjs +458 -0
  240. package/dist/plugins/company-brain/smoke/cognee-memory-cutover-smoke.mjs +539 -0
  241. package/dist/plugins/company-brain/smoke/company-brain-context-engine-smoke.mjs +312 -0
  242. package/dist/plugins/company-brain/smoke/company-brain-operations-smoke.mjs +449 -0
  243. package/dist/plugins/company-brain/smoke/company-brain-plugin-smoke.mjs +655 -0
  244. package/dist/plugins/company-brain/smoke/hindsight-memory-isolation-smoke.mjs +474 -0
  245. package/dist/plugins/company-brain/src/api/cognee-client.ts +896 -0
  246. package/dist/plugins/company-brain/src/api/cognee-cluster-identity.ts +49 -0
  247. package/dist/plugins/company-brain/src/api/cognee-memory-scope.ts +84 -0
  248. package/dist/plugins/company-brain/src/api/context-engine-provider.ts +888 -0
  249. package/dist/plugins/company-brain/src/api/migration.ts +665 -0
  250. package/dist/plugins/company-brain/src/deployment/cognee-managed-app.ts +396 -0
  251. package/dist/plugins/company-brain/src/index.ts +62 -0
  252. package/dist/plugins/company-brain/src/manifest.ts +112 -0
  253. package/dist/plugins/company-brain/terraform/cognee/README.md +263 -0
  254. package/dist/plugins/company-brain/terraform/cognee/main.tf +766 -0
  255. package/dist/plugins/company-brain/terraform/cognee/outputs.tf +144 -0
  256. package/dist/plugins/company-brain/terraform/cognee/variables.tf +402 -0
  257. package/dist/plugins/company-brain/test/api/cognee-client.test.ts +562 -0
  258. package/dist/plugins/company-brain/test/api/cognee-memory-scope.test.ts +74 -0
  259. package/dist/plugins/company-brain/test/api/context-engine-provider.test.ts +447 -0
  260. package/dist/plugins/company-brain/test/api/migration.test.ts +465 -0
  261. package/dist/plugins/company-brain/test/manifest.test.ts +95 -0
  262. package/dist/plugins/company-brain/tsconfig.json +8 -0
  263. package/dist/plugins/company-data/README.md +49 -0
  264. package/dist/plugins/company-data/package.json +21 -0
  265. package/dist/plugins/company-data/src/index.ts +30 -0
  266. package/dist/plugins/company-data/src/manifest.ts +26 -0
  267. package/dist/plugins/company-data/test/manifest.test.ts +116 -0
  268. package/dist/plugins/company-data/tsconfig.json +8 -0
  269. package/dist/plugins/company-etl/README.md +46 -0
  270. package/dist/plugins/company-etl/package.json +21 -0
  271. package/dist/plugins/company-etl/src/index.ts +29 -0
  272. package/dist/plugins/company-etl/src/manifest.ts +26 -0
  273. package/dist/plugins/company-etl/test/manifest.test.ts +108 -0
  274. package/dist/plugins/company-etl/tsconfig.json +8 -0
  275. package/dist/plugins/email-channel/README.md +41 -0
  276. package/dist/plugins/email-channel/package.json +22 -0
  277. package/dist/plugins/email-channel/src/index.ts +36 -0
  278. package/dist/plugins/email-channel/src/manifest.ts +44 -0
  279. package/dist/plugins/email-channel/src/provider-contract.ts +36 -0
  280. package/dist/plugins/email-channel/test/manifest.test.ts +119 -0
  281. package/dist/plugins/email-channel/tsconfig.json +8 -0
  282. package/dist/plugins/lastmile/README.md +50 -0
  283. package/dist/plugins/lastmile/package.json +23 -0
  284. package/dist/plugins/lastmile/smoke/lastmile-plugin-smoke.mjs +661 -0
  285. package/dist/plugins/lastmile/src/api/tasks-adapter.ts +572 -0
  286. package/dist/plugins/lastmile/src/discovery.fixture.ts +64 -0
  287. package/dist/plugins/lastmile/src/index.ts +46 -0
  288. package/dist/plugins/lastmile/src/manifest.ts +139 -0
  289. package/dist/plugins/lastmile/test/api/tasks-adapter.test.ts +266 -0
  290. package/dist/plugins/lastmile/test/discovery.test.ts +88 -0
  291. package/dist/plugins/lastmile/tsconfig.json +8 -0
  292. package/dist/plugins/n8n/README.md +201 -0
  293. package/dist/plugins/n8n/n8n-app/README.md +33 -0
  294. package/dist/plugins/n8n/n8n-app/package.json +23 -0
  295. package/dist/plugins/n8n/n8n-app/src/application-config.ts +45 -0
  296. package/dist/plugins/n8n/n8n-app/src/front-components/thinkwork-workflows.front-component.tsx +970 -0
  297. package/dist/plugins/n8n/n8n-app/src/lib/n8n-app-data.ts +190 -0
  298. package/dist/plugins/n8n/n8n-app/src/vite-env.d.ts +7 -0
  299. package/dist/plugins/n8n/n8n-app/tsconfig.json +15 -0
  300. package/dist/plugins/n8n/package.json +35 -0
  301. package/dist/plugins/n8n/runtime/Dockerfile +18 -0
  302. package/dist/plugins/n8n/runtime/n8n-task-runners.json +14 -0
  303. package/dist/plugins/n8n/runtime/n8n-task-runners.json.template +14 -0
  304. package/dist/plugins/n8n/runtime/package-lock.json +13 -0
  305. package/dist/plugins/n8n/runtime/package.json +7 -0
  306. package/dist/plugins/n8n/scripts/sync-thinkwork-app.mjs +268 -0
  307. package/dist/plugins/n8n/smoke/README.md +95 -0
  308. package/dist/plugins/n8n/smoke/n8n-agent-step-bridge-smoke.mjs +866 -0
  309. package/dist/plugins/n8n/smoke/n8n-integrated-app-smoke.mjs +262 -0
  310. package/dist/plugins/n8n/smoke/n8n-managed-app-smoke.mjs +409 -0
  311. package/dist/plugins/n8n/smoke/n8n-mcp-smoke.mjs +624 -0
  312. package/dist/plugins/n8n/src/deployment/image-build.ts +172 -0
  313. package/dist/plugins/n8n/src/deployment/managed-app.ts +429 -0
  314. package/dist/plugins/n8n/src/index.ts +79 -0
  315. package/dist/plugins/n8n/src/manifest.ts +403 -0
  316. package/dist/plugins/n8n/src/package-config.ts +186 -0
  317. package/dist/plugins/n8n/src/skills/n8n-workflow-operator/SKILL.md +76 -0
  318. package/dist/plugins/n8n/src/skills/n8n-workflow-operator/references/mcp-tooling.md +40 -0
  319. package/dist/plugins/n8n/src/skills/n8n-workflow-operator/references/validation-and-handoff.md +40 -0
  320. package/dist/plugins/n8n/src/skills/n8n-workflow-operator/references/workflow-authoring.md +45 -0
  321. package/dist/plugins/n8n/terraform/n8n/README.md +113 -0
  322. package/dist/plugins/n8n/terraform/n8n/main.tf +918 -0
  323. package/dist/plugins/n8n/terraform/n8n/outputs.tf +124 -0
  324. package/dist/plugins/n8n/terraform/n8n/scripts/sync-database.py +250 -0
  325. package/dist/plugins/n8n/terraform/n8n/scripts/test_sync_database.py +55 -0
  326. package/dist/plugins/n8n/terraform/n8n/variables.tf +354 -0
  327. package/dist/plugins/n8n/test/image-build.test.ts +118 -0
  328. package/dist/plugins/n8n/test/integrated-app-contract.test.ts +353 -0
  329. package/dist/plugins/n8n/test/manifest.test.ts +278 -0
  330. package/dist/plugins/n8n/test/package-config.test.ts +57 -0
  331. package/dist/plugins/n8n/tsconfig.json +8 -0
  332. package/dist/plugins/sendgrid/README.md +30 -0
  333. package/dist/plugins/sendgrid/package.json +22 -0
  334. package/dist/plugins/sendgrid/src/index.ts +36 -0
  335. package/dist/plugins/sendgrid/src/manifest.ts +37 -0
  336. package/dist/plugins/sendgrid/src/provider-contract.ts +14 -0
  337. package/dist/plugins/sendgrid/test/manifest.test.ts +80 -0
  338. package/dist/plugins/sendgrid/tsconfig.json +8 -0
  339. package/dist/plugins/twenty/README.md +78 -0
  340. package/dist/plugins/twenty/package.json +27 -0
  341. package/dist/plugins/twenty/scripts/__tests__/sync-thinkwork-app.test.mjs +67 -0
  342. package/dist/plugins/twenty/scripts/sync-thinkwork-app.mjs +185 -0
  343. package/dist/plugins/twenty/scripts/wire-thinkwork-workflow.mjs +658 -0
  344. package/dist/plugins/twenty/smoke/twenty-managed-app-smoke.mjs +359 -0
  345. package/dist/plugins/twenty/smoke/twenty-mcp-oauth-smoke.mjs +574 -0
  346. package/dist/plugins/twenty/src/api/cutover.ts +209 -0
  347. package/dist/plugins/twenty/src/deployment/managed-app.ts +253 -0
  348. package/dist/plugins/twenty/src/index.ts +55 -0
  349. package/dist/plugins/twenty/src/manifest.ts +259 -0
  350. package/dist/plugins/twenty/terraform/twenty/README.md +97 -0
  351. package/dist/plugins/twenty/terraform/twenty/main.tf +829 -0
  352. package/dist/plugins/twenty/terraform/twenty/outputs.tf +79 -0
  353. package/dist/plugins/twenty/terraform/twenty/variables.tf +268 -0
  354. package/dist/plugins/twenty/test/api/cutover.test.ts +183 -0
  355. package/dist/plugins/twenty/test/manifest.test.ts +463 -0
  356. package/dist/plugins/twenty/tsconfig.json +9 -0
  357. package/dist/plugins/twenty/twenty-app/.nvmrc +1 -0
  358. package/dist/plugins/twenty/twenty-app/README.md +148 -0
  359. package/dist/plugins/twenty/twenty-app/package.json +30 -0
  360. package/dist/plugins/twenty/twenty-app/src/application-config.ts +44 -0
  361. package/dist/plugins/twenty/twenty-app/src/constants/universal-identifiers.ts +18 -0
  362. package/dist/plugins/twenty/twenty-app/src/default-role.ts +24 -0
  363. package/dist/plugins/twenty/twenty-app/src/front-components/thinkwork-settings.front-component.tsx +299 -0
  364. package/dist/plugins/twenty/twenty-app/src/logic-functions/thinkwork-webhook.logic-function.ts +354 -0
  365. package/dist/plugins/twenty/twenty-app/tsconfig.json +14 -0
  366. package/dist/plugins/twenty/twenty-app/yarn.lock +4144 -0
  367. package/dist/plugins/workos-auth/package.json +22 -0
  368. package/dist/plugins/workos-auth/src/index.ts +30 -0
  369. package/dist/plugins/workos-auth/src/manifest.ts +40 -0
  370. package/dist/plugins/workos-auth/src/provider-contract.ts +39 -0
  371. package/dist/plugins/workos-auth/test/manifest.test.ts +94 -0
  372. package/dist/plugins/workos-auth/tsconfig.json +8 -0
  373. package/dist/scripts/bootstrap-workspace.sh +162 -0
  374. package/dist/scripts/post-deploy.sh +290 -0
  375. package/dist/terraform/examples/greenfield/main.tf +903 -75
  376. package/dist/terraform/examples/greenfield/terraform.tfvars.example +67 -8
  377. package/dist/terraform/modules/app/agentcore-code-interpreter/Dockerfile.sandbox-base +2 -2
  378. package/dist/terraform/modules/app/agentcore-code-interpreter/README.md +8 -9
  379. package/dist/terraform/modules/app/agentcore-code-interpreter/sandbox/sitecustomize.py +227 -0
  380. package/dist/terraform/modules/app/agentcore-code-interpreter/sandbox/test_sitecustomize.py +277 -0
  381. package/dist/terraform/modules/app/agentcore-memory/README.md +6 -6
  382. package/dist/terraform/modules/app/agentcore-memory/main.tf +1 -1
  383. package/dist/terraform/modules/app/agentcore-memory/scripts/create_or_find_memory.sh +40 -9
  384. package/dist/terraform/modules/app/agentcore-pi/README.md +61 -0
  385. package/dist/terraform/modules/app/agentcore-pi/main.tf +453 -0
  386. package/dist/terraform/modules/app/agentcore-pi/outputs.tf +38 -0
  387. package/dist/terraform/modules/app/agentcore-pi/variables.tf +145 -0
  388. package/dist/terraform/modules/app/agentcore-platform/main.tf +83 -0
  389. package/dist/terraform/modules/app/agentcore-runtime/main.tf +9 -11
  390. package/dist/terraform/modules/app/appsync-subscriptions/main.tf +5 -1
  391. package/dist/terraform/modules/app/customer-domain/main.tf +483 -0
  392. package/dist/terraform/modules/app/deployment-control-plane/README.md +47 -0
  393. package/dist/terraform/modules/app/deployment-control-plane/buildspec.yml +24 -0
  394. package/dist/terraform/modules/app/deployment-control-plane/main.tf +614 -0
  395. package/dist/terraform/modules/app/deployment-control-plane/outputs.tf +54 -0
  396. package/dist/terraform/modules/app/deployment-control-plane/runner.py +4720 -0
  397. package/dist/terraform/modules/app/deployment-control-plane/test_runner_bundle.py +3026 -0
  398. package/dist/terraform/modules/app/deployment-control-plane/variables.tf +96 -0
  399. package/dist/terraform/modules/app/hindsight-memory/README.md +25 -23
  400. package/dist/terraform/modules/app/hindsight-memory/main.tf +26 -2
  401. package/dist/terraform/modules/app/lambda-api/eval-fanout.tf +17 -50
  402. package/dist/terraform/modules/app/lambda-api/handlers.tf +1290 -679
  403. package/dist/terraform/modules/app/lambda-api/iam-grouped.tf +933 -0
  404. package/dist/terraform/modules/app/lambda-api/main.tf +14 -527
  405. package/dist/terraform/modules/app/lambda-api/mcp-oauth.tf +3 -19
  406. package/dist/terraform/modules/app/lambda-api/outputs.tf +50 -6
  407. package/dist/terraform/modules/app/lambda-api/runtime-config.tf +163 -0
  408. package/dist/terraform/modules/app/lambda-api/slack-app-secrets.tf +3 -1
  409. package/dist/terraform/modules/app/lambda-api/stripe-secrets.tf +3 -1
  410. package/dist/terraform/modules/app/lambda-api/variables.tf +240 -53
  411. package/dist/terraform/modules/app/lambda-api/workspace-events.tf +2 -25
  412. package/dist/terraform/modules/app/ses-email/main.tf +143 -30
  413. package/dist/terraform/modules/app/static-site/main.tf +4 -3
  414. package/dist/terraform/modules/app/www-dns/main.tf +45 -5
  415. package/dist/terraform/modules/app/www-dns/outputs.tf +10 -0
  416. package/dist/terraform/modules/app/www-dns/variables.tf +24 -0
  417. package/dist/terraform/modules/data/aurora-postgres/main.tf +15 -1
  418. package/dist/terraform/modules/data/compliance-exports-bucket/main.tf +1 -1
  419. package/dist/terraform/modules/data/compliance-exports-bucket/variables.tf +6 -0
  420. package/dist/terraform/modules/foundation/cognito/main.tf +167 -11
  421. package/dist/terraform/modules/foundation/cognito/outputs.tf +5 -0
  422. package/dist/terraform/modules/foundation/cognito/variables.tf +110 -0
  423. package/dist/terraform/modules/foundation/vpc/main.tf +45 -3
  424. package/dist/terraform/modules/foundation/vpc/outputs.tf +20 -0
  425. package/dist/terraform/modules/foundation/vpc/variables.tf +18 -0
  426. package/dist/terraform/modules/thinkwork/README.md +71 -0
  427. package/dist/terraform/modules/thinkwork/main.tf +1325 -174
  428. package/dist/terraform/modules/thinkwork/outputs.tf +457 -24
  429. package/dist/terraform/modules/thinkwork/variables.tf +1169 -93
  430. package/dist/terraform/schema.graphql +82 -9
  431. package/dist/workspace-defaults/files/AGENTS.md +344 -0
  432. package/dist/workspace-defaults/files/CONTEXT.md +8 -0
  433. package/dist/workspace-defaults/files/GUARDRAILS.md +51 -0
  434. package/dist/workspace-defaults/files/MEMORY_GUIDE.md +65 -0
  435. package/dist/workspace-defaults/files/ROUTER.md +24 -0
  436. package/dist/workspace-defaults/files/SPACE.md +62 -0
  437. package/dist/workspace-defaults/files/TOOLS.md +65 -0
  438. package/dist/workspace-defaults/files/USER.md +40 -0
  439. package/dist/workspace-defaults/files/mcp.json +3 -0
  440. package/dist/workspace-defaults/files/memory/contacts.md +13 -0
  441. package/dist/workspace-defaults/files/memory/lessons.md +13 -0
  442. package/dist/workspace-defaults/files/memory/preferences.md +12 -0
  443. package/dist/workspace-defaults/files/skills/.gitkeep +1 -0
  444. package/dist/workspace-defaults/files/skills/artifact-builder/SKILL.md +79 -0
  445. package/dist/workspace-defaults/files/skills/artifact-builder/references/crm-dashboard.md +166 -0
  446. package/dist/workspace-defaults/files/skills/automation-loop-designer/SKILL.md +120 -0
  447. package/dist/workspace-defaults/files/skills/skill-creator/LICENSE.txt +202 -0
  448. package/dist/workspace-defaults/files/skills/skill-creator/SKILL.md +485 -0
  449. package/dist/workspace-defaults/files/skills/skill-creator/UPSTREAM.json +124 -0
  450. package/dist/workspace-defaults/files/skills/skill-creator/agents/analyzer.md +274 -0
  451. package/dist/workspace-defaults/files/skills/skill-creator/agents/comparator.md +202 -0
  452. package/dist/workspace-defaults/files/skills/skill-creator/agents/grader.md +223 -0
  453. package/dist/workspace-defaults/files/skills/skill-creator/assets/eval_review.html +146 -0
  454. package/dist/workspace-defaults/files/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  455. package/dist/workspace-defaults/files/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  456. package/dist/workspace-defaults/files/skills/skill-creator/references/schemas.md +430 -0
  457. package/dist/workspace-defaults/files/skills/skill-creator/scripts/__init__.py +0 -0
  458. package/dist/workspace-defaults/files/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  459. package/dist/workspace-defaults/files/skills/skill-creator/scripts/generate_report.py +326 -0
  460. package/dist/workspace-defaults/files/skills/skill-creator/scripts/improve_description.py +247 -0
  461. package/dist/workspace-defaults/files/skills/skill-creator/scripts/package_skill.py +136 -0
  462. package/dist/workspace-defaults/files/skills/skill-creator/scripts/quick_validate.py +103 -0
  463. package/dist/workspace-defaults/files/skills/skill-creator/scripts/run_eval.py +310 -0
  464. package/dist/workspace-defaults/files/skills/skill-creator/scripts/run_loop.py +328 -0
  465. package/dist/workspace-defaults/files/skills/skill-creator/scripts/utils.py +47 -0
  466. package/package.json +1 -1
  467. package/dist/terraform/modules/app/agentcore-flue/README.md +0 -58
  468. package/dist/terraform/modules/app/agentcore-flue/main.tf +0 -323
  469. package/dist/terraform/modules/app/agentcore-flue/outputs.tf +0 -23
  470. package/dist/terraform/modules/app/agentcore-flue/variables.tf +0 -97
  471. package/dist/terraform/modules/app/computer-runtime/README.md +0 -15
  472. package/dist/terraform/modules/app/computer-runtime/main.tf +0 -406
  473. package/dist/terraform/modules/app/computer-runtime/outputs.tf +0 -75
  474. package/dist/terraform/modules/app/computer-runtime/variables.tf +0 -66
@@ -50,127 +50,1042 @@ variable "google_oauth_client_secret" {
50
50
  default = ""
51
51
  }
52
52
 
53
+ variable "microsoft_oauth_client_id" {
54
+ description = "Microsoft OAuth client ID reserved for future Cognito/OAuth wiring. Accepted here so deployment-control-plane generated wrappers stay forward-compatible."
55
+ type = string
56
+ default = ""
57
+ }
58
+
59
+ variable "microsoft_oauth_client_secret" {
60
+ description = "Microsoft OAuth client secret reserved for future Cognito/OAuth wiring."
61
+ type = string
62
+ sensitive = true
63
+ default = ""
64
+ }
65
+
66
+ variable "microsoft_oauth_tenant" {
67
+ description = "Microsoft OAuth tenant reserved for future Cognito/OAuth wiring."
68
+ type = string
69
+ default = "organizations"
70
+ }
71
+
72
+ variable "oidc_identity_providers" {
73
+ description = "Additional Cognito OIDC identity providers for customer bootstrap."
74
+ type = list(object({
75
+ provider_name = string
76
+ client_id = string
77
+ client_secret = string
78
+ issuer_url = string
79
+ authorize_scopes = optional(string, "openid email profile")
80
+ authorize_url = optional(string, "")
81
+ token_url = optional(string, "")
82
+ attributes_url = optional(string, "")
83
+ jwks_uri = optional(string, "")
84
+ attribute_mapping = optional(object({
85
+ email = optional(string, "email")
86
+ name = optional(string, "name")
87
+ username = optional(string, "sub")
88
+ }), {})
89
+ }))
90
+ default = []
91
+ }
92
+
93
+ variable "saml_identity_providers" {
94
+ description = "Additional Cognito SAML identity providers for customer bootstrap."
95
+ type = list(object({
96
+ provider_name = string
97
+ metadata_url = string
98
+ idp_identifiers = optional(list(string), [])
99
+ attribute_mapping = optional(object({
100
+ email = optional(string, "email")
101
+ name = optional(string, "name")
102
+ username = optional(string, "NameID")
103
+ }), {})
104
+ }))
105
+ default = []
106
+ }
107
+
53
108
  variable "redirect_success_url" {
54
109
  description = "Default OAuth-callback redirect target when no per-request returnUrl is supplied. Mobile callers pass thinkwork:// custom scheme; web falls through to this."
55
110
  type = string
56
- default = "https://app.thinkwork.ai/settings/credentials"
111
+ default = "https://app.thinkwork.ai/settings/credentials"
112
+ }
113
+
114
+ variable "platform_operator_emails" {
115
+ description = "Comma-separated allowlist of emails permitted to invoke operator-gated GraphQL mutations (updateTenantPolicy, sandbox fixture setup, etc.). Forwarded to graphql-http as THINKWORK_PLATFORM_OPERATOR_EMAILS. Empty ⇒ the gate rejects every call."
116
+ type = string
117
+ default = ""
118
+ }
119
+
120
+ variable "okf_wiki_efs_enabled" {
121
+ description = "Provision the OKF Wiki Navigator EFS current-view substrate and mount it into the okf-efs-refresh Lambda plus Pi."
122
+ type = bool
123
+ default = true
124
+ }
125
+
126
+ variable "okf_wiki_create_vpc_endpoints" {
127
+ description = "Create private AWS service VPC endpoints required by VPC-attached OKF hydrator and Pi Lambdas. Disable only when equivalent NAT or endpoints already exist."
128
+ type = bool
129
+ default = true
130
+ }
131
+
132
+ variable "okf_wiki_create_nat_gateway" {
133
+ description = "Create NAT egress for private subnets when OKF EFS attaches Pi to the VPC. Disable only when equivalent public egress already exists."
134
+ type = bool
135
+ default = true
136
+ }
137
+
138
+ variable "enable_deployment_control_plane" {
139
+ description = "Enable the AWS-native deployment control plane used for GitHub-free customer deployments."
140
+ type = bool
141
+ default = true
142
+ }
143
+
144
+ variable "deployment_state_machine_arn" {
145
+ description = "Existing deployment orchestration Step Functions ARN for environments whose controller is bootstrapped outside this app stack."
146
+ type = string
147
+ default = ""
148
+ }
149
+
150
+ variable "deployment_evidence_bucket" {
151
+ description = "Existing deployment evidence bucket for environments whose controller is bootstrapped outside this app stack."
152
+ type = string
153
+ default = ""
154
+ }
155
+
156
+ variable "deployment_release_version" {
157
+ description = "Selected ThinkWork release version stored in the deployment control plane."
158
+ type = string
159
+ default = "unresolved"
160
+ }
161
+
162
+ variable "deployment_release_manifest_url" {
163
+ description = "Selected ThinkWork release manifest URL stored in the deployment control plane."
164
+ type = string
165
+ default = ""
166
+ }
167
+
168
+ variable "deployment_release_manifest_sha256" {
169
+ description = "Selected ThinkWork release manifest SHA-256 stored in the deployment control plane."
170
+ type = string
171
+ default = ""
172
+ }
173
+
174
+ variable "deployment_release_manifest_signature_url" {
175
+ description = "Optional selected ThinkWork release manifest detached signature URL stored in the deployment control plane."
176
+ type = string
177
+ default = ""
178
+ }
179
+
180
+ variable "deployment_release_manifest_trust_policy" {
181
+ description = "Release manifest trust policy for the deployment control plane: allow_unsigned_canary or require_signature."
182
+ type = string
183
+ default = "allow_unsigned_canary"
184
+
185
+ validation {
186
+ condition = contains(["allow_unsigned_canary", "require_signature"], var.deployment_release_manifest_trust_policy)
187
+ error_message = "deployment_release_manifest_trust_policy must be allow_unsigned_canary or require_signature."
188
+ }
189
+ }
190
+
191
+ variable "deployment_release_manifest_trusted_keys_json" {
192
+ description = "JSON array of trusted release signing keys for the deployment control plane."
193
+ type = string
194
+ default = "[]"
195
+
196
+ validation {
197
+ condition = can(jsondecode(var.deployment_release_manifest_trusted_keys_json))
198
+ error_message = "deployment_release_manifest_trusted_keys_json must be valid JSON."
199
+ }
200
+ }
201
+
202
+ variable "deployment_terraform_state_bucket" {
203
+ description = "Customer-owned S3 bucket used by the GitHub-free deployment runner for ThinkWork app Terraform state. Empty uses the legacy thinkwork-terraform-state bucket name."
204
+ type = string
205
+ default = ""
206
+ }
207
+
208
+ variable "deployment_terraform_lock_table" {
209
+ description = "Customer-owned DynamoDB table used by the GitHub-free deployment runner for ThinkWork app Terraform state locking. Empty uses the legacy thinkwork-terraform-locks table name."
210
+ type = string
211
+ default = ""
212
+ }
213
+
214
+ variable "deployment_release_artifact_bucket" {
215
+ description = "Customer-owned S3 bucket used by the GitHub-free deployment runner to stage release Lambda artifacts. Empty uses the legacy thinkwork-release-artifacts bucket name."
216
+ type = string
217
+ default = ""
218
+ }
219
+
220
+ variable "deployment_terraform_module_source" {
221
+ description = "Terraform Registry source the GitHub-free deployment runner should use for the ThinkWork composite module."
222
+ type = string
223
+ default = "thinkwork-ai/thinkwork/aws"
224
+ }
225
+
226
+ variable "deployment_terraform_module_version" {
227
+ description = "Terraform Registry module version the GitHub-free deployment runner should deploy. Empty derives from deployment_release_version."
228
+ type = string
229
+ default = ""
230
+ }
231
+
232
+ variable "deployment_control_plane_log_retention_days" {
233
+ description = "CloudWatch log retention for deployment control-plane state machine and runner logs."
234
+ type = number
235
+ default = 30
236
+ }
237
+
238
+ variable "deployment_control_plane_create_secret_placeholders" {
239
+ description = "Create placeholder Secrets Manager containers for deployment-control-plane bootstrap secrets."
240
+ type = bool
241
+ default = true
242
+ }
243
+
244
+ variable "bootstrap_credential_lease_kms_key_id" {
245
+ description = "Optional KMS key ID or ARN used by Secrets Manager for temporary customer bootstrap credential leases. Empty uses the AWS-managed Secrets Manager key."
246
+ type = string
247
+ default = ""
248
+ }
249
+
250
+ # ---------------------------------------------------------------------------
251
+ # BYO Foundation (all optional — defaults to creating everything)
252
+ # ---------------------------------------------------------------------------
253
+
254
+ variable "create_vpc" {
255
+ description = "Create a new VPC (false = BYO)"
256
+ type = bool
257
+ default = true
258
+ }
259
+
260
+ variable "existing_vpc_id" {
261
+ type = string
262
+ default = null
263
+ }
264
+
265
+ variable "existing_public_subnet_ids" {
266
+ type = list(string)
267
+ default = []
268
+ }
269
+
270
+ variable "existing_private_subnet_ids" {
271
+ type = list(string)
272
+ default = []
273
+ }
274
+
275
+ variable "existing_public_route_table_ids" {
276
+ description = "Route table IDs for existing_public_subnet_ids when create_vpc = false. Used by gateway endpoints such as OKF S3 access."
277
+ type = list(string)
278
+ default = []
279
+ }
280
+
281
+ variable "existing_private_route_table_ids" {
282
+ description = "Route table IDs for existing_private_subnet_ids when create_vpc = false. Used by gateway endpoints such as OKF S3 access."
283
+ type = list(string)
284
+ default = []
285
+ }
286
+
287
+ variable "create_cognito" {
288
+ description = "Create a new Cognito user pool (false = BYO)"
289
+ type = bool
290
+ default = true
291
+ }
292
+
293
+ variable "existing_user_pool_id" {
294
+ type = string
295
+ default = null
296
+ }
297
+
298
+ variable "existing_user_pool_arn" {
299
+ type = string
300
+ default = null
301
+ }
302
+
303
+ variable "existing_admin_client_id" {
304
+ type = string
305
+ default = null
306
+ }
307
+
308
+ variable "existing_mobile_client_id" {
309
+ type = string
310
+ default = null
311
+ }
312
+
313
+ variable "existing_identity_pool_id" {
314
+ type = string
315
+ default = null
316
+ }
317
+
318
+ variable "create_database" {
319
+ description = "Create a new Aurora cluster (false = BYO)"
320
+ type = bool
321
+ default = true
322
+ }
323
+
324
+ variable "existing_db_cluster_arn" {
325
+ type = string
326
+ default = null
327
+ }
328
+
329
+ variable "existing_db_secret_arn" {
330
+ type = string
331
+ default = null
332
+ }
333
+
334
+ variable "existing_db_endpoint" {
335
+ type = string
336
+ default = null
337
+ }
338
+
339
+ variable "existing_db_security_group_id" {
340
+ type = string
341
+ default = null
342
+ }
343
+
344
+ variable "database_engine" {
345
+ description = "Database engine: 'aurora-serverless' (production) or 'rds-postgres' (dev/test, cheaper)"
346
+ type = string
347
+ default = "aurora-serverless"
348
+ }
349
+
350
+ variable "enable_hindsight" {
351
+ description = "Enable Hindsight long-term memory. Full ThinkWork installs default this on because Hindsight is the canonical user and Space memory provider; set false only for explicit low-cost/development AgentCore-only deployments."
352
+ type = bool
353
+ default = true
354
+ }
355
+
356
+ variable "memory_engine" {
357
+ description = "Active long-term memory engine for canonical recall/inspect/export. Exactly one engine is authoritative per deployment. Empty auto-selects Hindsight for full installs. Accepted values: 'hindsight' (requires enable_hindsight = true), 'agentcore' (explicit low-cost/development managed-memory mode), or legacy diagnostic 'cognee' (requires enable_cognee = true and is not the supported user/Space memory path). Legacy value 'managed' maps to 'agentcore'."
358
+ type = string
359
+ default = ""
360
+
361
+ validation {
362
+ condition = var.memory_engine == "" || contains(["managed", "hindsight", "agentcore", "cognee"], var.memory_engine)
363
+ error_message = "memory_engine must be empty, 'hindsight', 'agentcore', 'cognee', or legacy 'managed'."
364
+ }
365
+
366
+ }
367
+
368
+ variable "hindsight_image_tag" {
369
+ description = "Hindsight Docker image tag (used when enable_hindsight = true)"
370
+ type = string
371
+ default = "0.5.0"
372
+ }
373
+
374
+ variable "hindsight_enable_auto_consolidation" {
375
+ description = "Run Hindsight's observation consolidation engine automatically after retain (used when enable_hindsight = true)."
376
+ type = bool
377
+ default = true
378
+ }
379
+
380
+ variable "hindsight_consolidation_dedup_threshold" {
381
+ description = "Cosine-similarity threshold for Hindsight near-duplicate observation reconciliation (0.0-1.0; 1.0 disables)."
382
+ type = string
383
+ default = "0.97"
384
+ }
385
+
386
+ variable "hindsight_observations_mission" {
387
+ description = "Service-level default observations mission for Hindsight consolidation. Empty string falls back to the image default. Per-bank config overrides apply on top."
388
+ type = string
389
+ default = "Synthesize durable, institutional facts about the business: customers, projects, decisions, processes, tools, relationships, and recurring patterns. Filter out ephemeral state, secrets, and personal small talk."
390
+ }
391
+
392
+ variable "enable_cognee" {
393
+ description = "Enable Cognee as optional ThinkWork Brain ontology/knowledge-graph infrastructure. Cognee is plugin-managed Brain substrate infrastructure, not the supported user/Space memory provider."
394
+ type = bool
395
+ default = false
396
+ }
397
+
398
+ variable "cognee_image_uri" {
399
+ description = "Cognee container image URI pinned to an immutable sha256 digest. Required when enable_cognee = true."
400
+ type = string
401
+ default = ""
402
+
403
+ validation {
404
+ condition = var.cognee_image_uri == "" || can(regex("@sha256:[0-9a-f]{64}$", var.cognee_image_uri))
405
+ error_message = "cognee_image_uri must be empty or pinned to an immutable sha256 image digest."
406
+ }
407
+ }
408
+
409
+ variable "cognee_db_username" {
410
+ description = "Dedicated PostgreSQL username for Cognee metadata storage. Do not use the shared Aurora admin/master user."
411
+ type = string
412
+ default = "thinkwork_cognee"
413
+
414
+ validation {
415
+ condition = !contains(["postgres", "thinkwork_admin", "rdsadmin"], lower(var.cognee_db_username))
416
+ error_message = "cognee_db_username must be a dedicated least-privilege Cognee database user."
417
+ }
418
+ }
419
+
420
+ variable "cognee_db_name" {
421
+ description = "Dedicated PostgreSQL database name for Cognee metadata storage. Do not use the shared Thinkwork application database."
422
+ type = string
423
+ default = "thinkwork_cognee"
424
+
425
+ validation {
426
+ condition = can(regex("^[A-Za-z_][A-Za-z0-9_]{0,62}$", var.cognee_db_name))
427
+ error_message = "cognee_db_name must be a valid PostgreSQL identifier."
428
+ }
429
+ }
430
+
431
+ variable "cognee_db_password_secret_arn" {
432
+ description = "Secrets Manager ARN containing a JSON password field for the dedicated Cognee PostgreSQL user. Required when enable_cognee = true."
433
+ type = string
434
+ default = ""
435
+ }
436
+
437
+ variable "cognee_allowed_internal_cidr_blocks" {
438
+ description = "CIDR blocks allowed to reach the internal Cognee ALB"
439
+ type = list(string)
440
+ default = []
441
+
442
+ validation {
443
+ condition = alltrue([
444
+ for cidr in var.cognee_allowed_internal_cidr_blocks :
445
+ cidr != "0.0.0.0/0" && cidr != "::/0"
446
+ ])
447
+ error_message = "cognee_allowed_internal_cidr_blocks must not include all-network CIDRs such as 0.0.0.0/0 or ::/0."
448
+ }
449
+ }
450
+
451
+ variable "cognee_allowed_internal_security_group_ids" {
452
+ description = "Security group IDs allowed to reach the internal Cognee ALB"
453
+ type = list(string)
454
+ default = []
455
+ }
456
+
457
+ variable "cognee_backend_mode" {
458
+ description = "Cognee backend mode. dogfood uses local graph/vector paths on EFS; remote requires remote graph/vector URLs."
459
+ type = string
460
+ default = "dogfood"
461
+
462
+ validation {
463
+ condition = contains(["dogfood", "remote"], var.cognee_backend_mode)
464
+ error_message = "cognee_backend_mode must be dogfood or remote."
465
+ }
466
+ }
467
+
468
+ variable "cognee_desired_count" {
469
+ description = "Desired number of Cognee ECS tasks. Dogfood/local backend mode must stay single-task."
470
+ type = number
471
+ default = 1
472
+ }
473
+
474
+ variable "cognee_brain_tenant_id" {
475
+ description = "Tenant ID for a tenant-scoped Company Brain substrate instance. Empty preserves the legacy stage-wide Cognee resource names."
476
+ type = string
477
+ default = ""
478
+ }
479
+
480
+ variable "cognee_brain_instance_key" {
481
+ description = "Stable tenant-scoped Brain instance key used to derive Cognee/Brain resource names."
482
+ type = string
483
+ default = ""
484
+ }
485
+
486
+ variable "cognee_brain_storage_tier" {
487
+ description = "Company Brain storage tier: default or production."
488
+ type = string
489
+ default = "default"
490
+
491
+ validation {
492
+ condition = contains(["default", "production"], var.cognee_brain_storage_tier)
493
+ error_message = "cognee_brain_storage_tier must be default or production."
494
+ }
495
+ }
496
+
497
+ variable "cognee_brain_s3_artifact_root" {
498
+ description = "Canonical Company Brain S3 root URI for source artifacts."
499
+ type = string
500
+ default = ""
501
+ }
502
+
503
+ variable "cognee_brain_s3_manifest_root" {
504
+ description = "Canonical Company Brain S3 root URI for ingestion manifests."
505
+ type = string
506
+ default = ""
507
+ }
508
+
509
+ variable "cognee_brain_s3_vault_projection_root" {
510
+ description = "Canonical Company Brain S3 root URI for vault/materialized projections."
511
+ type = string
512
+ default = ""
513
+ }
514
+
515
+ variable "cognee_brain_artifacts_bucket_arn" {
516
+ description = "Optional canonical Company Brain artifacts bucket ARN for scoped task-role access."
517
+ type = string
518
+ default = ""
519
+ }
520
+
521
+ variable "cognee_brain_artifacts_prefixes" {
522
+ description = "Tenant/stage prefixes inside cognee_brain_artifacts_bucket_arn the Brain task may access."
523
+ type = list(string)
524
+ default = []
525
+ }
526
+
527
+ variable "cognee_private_substrate_mode" {
528
+ description = "Whether the Company Brain substrate is private/internal-only."
529
+ type = bool
530
+ default = true
531
+ }
532
+
533
+ variable "cognee_require_authentication" {
534
+ description = "Passed to Cognee REQUIRE_AUTHENTICATION."
535
+ type = bool
536
+ default = false
537
+ }
538
+
539
+ variable "cognee_enable_backend_access_control" {
540
+ description = "Passed to Cognee ENABLE_BACKEND_ACCESS_CONTROL."
541
+ type = bool
542
+ default = false
543
+ }
544
+
545
+ variable "cognee_cors_allowed_origins" {
546
+ description = "Passed to Cognee CORS_ALLOWED_ORIGINS. Keep empty for internal-only Company Brain substrate."
547
+ type = string
548
+ default = ""
549
+ }
550
+
551
+ variable "cognee_llm_provider" {
552
+ description = "Cognee LLM provider"
553
+ type = string
554
+ default = "bedrock"
555
+ }
556
+
557
+ variable "cognee_llm_model" {
558
+ description = "Cognee LLM model"
559
+ type = string
560
+ default = "bedrock/amazon.nova-lite-v1:0"
561
+ }
562
+
563
+ variable "cognee_llm_api_key_secret_arn" {
564
+ description = "Optional Secrets Manager ARN for non-Bedrock LLM provider API key"
565
+ type = string
566
+ default = ""
567
+ }
568
+
569
+ variable "cognee_embedding_provider" {
570
+ description = "Cognee embedding provider"
571
+ type = string
572
+ default = "bedrock"
573
+ }
574
+
575
+ variable "cognee_embedding_model" {
576
+ description = "Cognee embedding model"
577
+ type = string
578
+ default = "amazon.titan-embed-text-v2:0"
579
+ }
580
+
581
+ variable "cognee_embedding_dimensions" {
582
+ description = "Embedding vector dimensions. Must match the selected Cognee vector store."
583
+ type = number
584
+ default = 1024
585
+ }
586
+
587
+ variable "cognee_embedding_api_key_secret_arn" {
588
+ description = "Optional Secrets Manager ARN for non-Bedrock embedding provider API key"
589
+ type = string
590
+ default = ""
591
+ }
592
+
593
+ variable "cognee_vector_db_provider" {
594
+ description = "Cognee vector store provider"
595
+ type = string
596
+ default = "lancedb"
597
+ }
598
+
599
+ variable "cognee_vector_db_url" {
600
+ description = "Cognee vector store URL. Leave empty in dogfood mode to use the EFS-backed local default."
601
+ type = string
602
+ default = ""
603
+ }
604
+
605
+ variable "cognee_vector_db_key_secret_arn" {
606
+ description = "Optional Secrets Manager ARN for a remote vector store key"
607
+ type = string
608
+ default = ""
609
+ }
610
+
611
+ variable "cognee_graph_database_provider" {
612
+ description = "Cognee graph store provider"
613
+ type = string
614
+ default = "kuzu"
615
+ }
616
+
617
+ variable "cognee_graph_database_url" {
618
+ description = "Cognee graph store URL. Leave empty in dogfood mode to use the EFS-backed local Kuzu default."
619
+ type = string
620
+ default = ""
621
+ }
622
+
623
+ variable "cognee_graph_database_username" {
624
+ description = "Optional Cognee graph store username"
625
+ type = string
626
+ default = ""
627
+ }
628
+
629
+ variable "cognee_graph_database_password_secret_arn" {
630
+ description = "Optional Secrets Manager ARN for a remote graph store password"
631
+ type = string
632
+ default = ""
633
+ }
634
+
635
+ variable "cognee_neptune_graph_id" {
636
+ description = "Neptune Analytics graph ID used by the production Brain tier."
637
+ type = string
638
+ default = ""
639
+ }
640
+
641
+ variable "cognee_neptune_graph_arn" {
642
+ description = "Optional Neptune Analytics graph ARN for scoped task-role access."
643
+ type = string
644
+ default = ""
645
+ }
646
+
647
+ variable "cognee_neptune_endpoint" {
648
+ description = "Neptune Analytics endpoint used by the production Brain tier."
649
+ type = string
650
+ default = ""
651
+ }
652
+
653
+ variable "cognee_production_posture" {
654
+ description = "Operator evidence string for production-tier approval/readiness posture."
655
+ type = string
656
+ default = ""
657
+ }
658
+
659
+ variable "cognee_bedrock_model_resource_arns" {
660
+ description = "Explicit Bedrock model ARNs Cognee may invoke when a Bedrock LLM or embedding provider is selected."
661
+ type = list(string)
662
+ default = []
663
+
664
+ validation {
665
+ condition = alltrue([
666
+ for arn in var.cognee_bedrock_model_resource_arns :
667
+ arn != "*" && !can(regex("\\*", arn))
668
+ ])
669
+ error_message = "cognee_bedrock_model_resource_arns must list explicit model or inference-profile ARNs, not wildcards."
670
+ }
671
+ }
672
+
673
+ variable "cognee_kms_key_arns" {
674
+ description = "Optional KMS key ARNs needed to decrypt Cognee-injected secrets"
675
+ type = list(string)
676
+ default = []
677
+ }
678
+
679
+ variable "twenty_provisioned" {
680
+ description = "Provision the retained Twenty CRM managed-app substrate. Runtime can be parked independently with twenty_runtime_enabled."
681
+ type = bool
682
+ default = false
683
+ }
684
+
685
+ variable "twenty_runtime_enabled" {
686
+ description = "Run Twenty CRM server/worker tasks when the retained substrate is provisioned. Set false to park runtime while retaining data resources."
687
+ type = bool
688
+ default = false
689
+ }
690
+
691
+ variable "twenty_image_uri" {
692
+ description = "Twenty CRM container image URI pinned to an immutable sha256 digest. Required when twenty_provisioned = true."
693
+ type = string
694
+ default = ""
695
+
696
+ validation {
697
+ condition = var.twenty_image_uri == "" || can(regex("@sha256:[0-9a-f]{64}$", var.twenty_image_uri))
698
+ error_message = "twenty_image_uri must be empty or pinned to an immutable sha256 image digest."
699
+ }
700
+ }
701
+
702
+ variable "twenty_db_username" {
703
+ description = "Dedicated PostgreSQL username for Twenty CRM. Do not use the shared Aurora admin/master user."
704
+ type = string
705
+ default = "thinkwork_twenty"
706
+
707
+ validation {
708
+ condition = !contains(["postgres", "thinkwork_admin", "rdsadmin"], lower(var.twenty_db_username))
709
+ error_message = "twenty_db_username must be a dedicated least-privilege Twenty database user."
710
+ }
711
+ }
712
+
713
+ variable "twenty_db_name" {
714
+ description = "Dedicated PostgreSQL database name for Twenty CRM. Do not use the shared Thinkwork application database."
715
+ type = string
716
+ default = "thinkwork_twenty"
717
+
718
+ validation {
719
+ condition = can(regex("^[A-Za-z_][A-Za-z0-9_]{0,62}$", var.twenty_db_name))
720
+ error_message = "twenty_db_name must be a valid PostgreSQL identifier."
721
+ }
722
+ }
723
+
724
+ variable "twenty_db_url_secret_arn" {
725
+ description = "Secrets Manager ARN containing a JSON PG_DATABASE_URL field for the dedicated Twenty database. Required when twenty_provisioned = true."
726
+ type = string
727
+ default = ""
728
+ }
729
+
730
+ variable "twenty_encryption_key_secret_arn" {
731
+ description = "Secrets Manager ARN containing a JSON ENCRYPTION_KEY field for Twenty. Required when twenty_provisioned = true."
732
+ type = string
733
+ default = ""
734
+ }
735
+
736
+ variable "twenty_fallback_encryption_key_secret_arn" {
737
+ description = "Optional Secrets Manager ARN containing a JSON FALLBACK_ENCRYPTION_KEY field during Twenty key rotation."
738
+ type = string
739
+ default = ""
740
+ }
741
+
742
+ variable "twenty_app_secret_arn" {
743
+ description = "Optional Secrets Manager ARN containing a JSON APP_SECRET field for legacy Twenty compatibility."
744
+ type = string
745
+ default = ""
746
+ }
747
+
748
+ variable "twenty_email_domain" {
749
+ description = "Verified SES domain used to derive Twenty's default noreply sender. Defaults to ses_inbound_domain."
750
+ type = string
751
+ default = ""
752
+ }
753
+
754
+ variable "twenty_email_from_address" {
755
+ description = "Verified SES sender address for Twenty app emails. Defaults to noreply@<twenty_email_domain or ses_inbound_domain>."
756
+ type = string
757
+ default = ""
758
+ }
759
+
760
+ variable "twenty_email_from_name" {
761
+ description = "Display name for Twenty app email From headers."
762
+ type = string
763
+ default = "ThinkWork CRM"
764
+ }
765
+
766
+ variable "twenty_email_smtp_host" {
767
+ description = "SES SMTP host for Twenty app emails. Leave empty to use email-smtp.<region>.amazonaws.com."
768
+ type = string
769
+ default = ""
770
+ }
771
+
772
+ variable "twenty_domain" {
773
+ description = "Public hostname for Twenty CRM. Leave empty to derive crm.<www_domain> when www_domain is set."
774
+ type = string
775
+ default = ""
776
+ }
777
+
778
+ variable "twenty_public_url" {
779
+ description = "Public HTTPS URL for Twenty CRM. Leave empty to derive https://<twenty_domain>."
780
+ type = string
781
+ default = ""
782
+ }
783
+
784
+ variable "twenty_certificate_arn" {
785
+ description = "ACM certificate ARN for the Twenty public ALB. Leave empty to reuse www_certificate_arn."
786
+ type = string
787
+ default = ""
788
+ }
789
+
790
+ variable "twenty_server_desired_count" {
791
+ description = "Desired Twenty server task count when twenty_runtime_enabled is true."
792
+ type = number
793
+ default = 1
794
+ }
795
+
796
+ variable "twenty_worker_desired_count" {
797
+ description = "Desired Twenty worker task count when twenty_runtime_enabled is true."
798
+ type = number
799
+ default = 1
800
+ }
801
+
802
+ variable "twenty_cache_engine" {
803
+ description = "ElastiCache engine for Twenty. Prefer valkey; redis is available as a compatibility fallback."
804
+ type = string
805
+ default = "valkey"
806
+
807
+ validation {
808
+ condition = contains(["valkey", "redis"], var.twenty_cache_engine)
809
+ error_message = "twenty_cache_engine must be valkey or redis."
810
+ }
811
+ }
812
+
813
+ variable "twenty_cache_engine_version" {
814
+ description = "ElastiCache engine version for Twenty."
815
+ type = string
816
+ default = "8.0"
817
+ }
818
+
819
+ variable "twenty_cache_parameter_group_family" {
820
+ description = "ElastiCache parameter group family matching twenty_cache_engine/twenty_cache_engine_version."
821
+ type = string
822
+ default = "valkey8"
823
+ }
824
+
825
+ variable "twenty_cache_node_type" {
826
+ description = "ElastiCache node type for the Twenty queue/cache."
827
+ type = string
828
+ default = "cache.t4g.micro"
829
+ }
830
+
831
+ variable "twenty_cache_num_cache_clusters" {
832
+ description = "Number of cache nodes in the Twenty replication group. Use 1 for the smallest v1 deployment."
833
+ type = number
834
+ default = 1
835
+ }
836
+
837
+ variable "twenty_allowed_public_cidr_blocks" {
838
+ description = "CIDR blocks allowed to reach the public Twenty HTTPS ALB."
839
+ type = list(string)
840
+ default = ["0.0.0.0/0"]
841
+ }
842
+
843
+ variable "twenty_kms_key_arns" {
844
+ description = "Optional KMS key ARNs needed to decrypt Twenty-injected secrets."
845
+ type = list(string)
846
+ default = []
847
+ }
848
+
849
+ variable "n8n_provisioned" {
850
+ description = "Provision the retained n8n managed-app substrate. Runtime can be parked independently with n8n_runtime_enabled."
851
+ type = bool
852
+ default = false
853
+ }
854
+
855
+ variable "n8n_runtime_enabled" {
856
+ description = "Run n8n main/worker tasks when the retained substrate is provisioned. Set false to park runtime while retaining data resources."
857
+ type = bool
858
+ default = false
859
+ }
860
+
861
+ variable "n8n_image_uri" {
862
+ description = "Thin ThinkWork n8n wrapper image URI pinned to an immutable sha256 digest. Required when n8n_provisioned = true."
863
+ type = string
864
+ default = ""
865
+
866
+ validation {
867
+ condition = var.n8n_image_uri == "" || can(regex("@sha256:[0-9a-f]{64}$", var.n8n_image_uri))
868
+ error_message = "n8n_image_uri must be empty or pinned to an immutable sha256 image digest."
869
+ }
57
870
  }
58
871
 
59
- variable "platform_operator_emails" {
60
- description = "Comma-separated allowlist of emails permitted to invoke operator-gated GraphQL mutations (updateTenantPolicy, sandbox fixture setup, etc.). Forwarded to graphql-http as THINKWORK_PLATFORM_OPERATOR_EMAILS. Empty the gate rejects every call."
872
+ variable "n8n_database_admin_secret_arn" {
873
+ description = "Secrets Manager ARN for an admin database credential allowed to create/drop the dedicated n8n database and role."
61
874
  type = string
62
875
  default = ""
63
876
  }
64
877
 
65
- # ---------------------------------------------------------------------------
66
- # BYO Foundation (all optional defaults to creating everything)
67
- # ---------------------------------------------------------------------------
878
+ variable "n8n_database_url_secret_arn" {
879
+ description = "Secrets Manager ARN containing n8n's least-privilege database secret. Runtime injection expects JSON fields DATABASE_URL and DB_POSTGRESDB_PASSWORD."
880
+ type = string
881
+ default = ""
882
+ }
68
883
 
69
- variable "create_vpc" {
70
- description = "Create a new VPC (false = BYO)"
71
- type = bool
72
- default = true
884
+ variable "n8n_database_username" {
885
+ description = "Dedicated PostgreSQL username for n8n. Do not use the shared Aurora admin/master user."
886
+ type = string
887
+ default = "thinkwork_n8n"
888
+
889
+ validation {
890
+ condition = !contains(["postgres", "thinkwork_admin", "rdsadmin"], lower(var.n8n_database_username))
891
+ error_message = "n8n_database_username must be a dedicated least-privilege n8n database user."
892
+ }
73
893
  }
74
894
 
75
- variable "existing_vpc_id" {
76
- type = string
77
- default = null
895
+ variable "n8n_database_name" {
896
+ description = "Dedicated PostgreSQL database name for n8n. Do not use the shared Thinkwork application database."
897
+ type = string
898
+ default = "thinkwork_n8n"
899
+
900
+ validation {
901
+ condition = can(regex("^[A-Za-z_][A-Za-z0-9_]{0,62}$", var.n8n_database_name))
902
+ error_message = "n8n_database_name must be a valid PostgreSQL identifier."
903
+ }
78
904
  }
79
905
 
80
- variable "existing_public_subnet_ids" {
81
- type = list(string)
82
- default = []
906
+ variable "n8n_encryption_key_secret_arn" {
907
+ description = "Secrets Manager ARN containing N8N_ENCRYPTION_KEY."
908
+ type = string
909
+ default = ""
83
910
  }
84
911
 
85
- variable "existing_private_subnet_ids" {
86
- type = list(string)
87
- default = []
912
+ variable "n8n_operator_secret_arn" {
913
+ description = "Secrets Manager ARN containing the shared native n8n operator account credential."
914
+ type = string
915
+ default = ""
88
916
  }
89
917
 
90
- variable "create_cognito" {
91
- description = "Create a new Cognito user pool (false = BYO)"
918
+ variable "n8n_service_credential_secret_arn" {
919
+ description = "Secrets Manager ARN containing the tenant service credential used by the native n8n MCP integration."
920
+ type = string
921
+ default = ""
922
+ }
923
+
924
+ variable "n8n_agent_step_bridge_credential_secret_arn" {
925
+ description = "Secrets Manager ARN containing the inbound credential used by n8n workflows to call the ThinkWork agent-step bridge."
926
+ type = string
927
+ default = ""
928
+ }
929
+
930
+ variable "n8n_storage_bucket_name" {
931
+ description = "S3 bucket name used for n8n managed artifacts and optional storage mode objects. Required when n8n_provisioned = true."
932
+ type = string
933
+ default = ""
934
+ }
935
+
936
+ variable "n8n_create_storage_bucket" {
937
+ description = "Create the S3 bucket named by n8n_storage_bucket_name. Set false to use an existing retained bucket."
92
938
  type = bool
93
939
  default = true
94
940
  }
95
941
 
96
- variable "existing_user_pool_id" {
97
- type = string
98
- default = null
942
+ variable "n8n_storage_prefix" {
943
+ description = "S3 prefix reserved for n8n managed artifacts."
944
+ type = string
945
+ default = "managed-apps/n8n"
99
946
  }
100
947
 
101
- variable "existing_user_pool_arn" {
102
- type = string
103
- default = null
948
+ variable "n8n_domain" {
949
+ description = "Public hostname for n8n. Leave empty to derive n8n.<www_domain> when www_domain is set."
950
+ type = string
951
+ default = ""
104
952
  }
105
953
 
106
- variable "existing_admin_client_id" {
107
- type = string
108
- default = null
954
+ variable "n8n_public_url" {
955
+ description = "Public HTTPS URL for n8n. Leave empty to derive https://<n8n_domain>."
956
+ type = string
957
+ default = ""
109
958
  }
110
959
 
111
- variable "existing_mobile_client_id" {
112
- type = string
113
- default = null
960
+ variable "n8n_certificate_arn" {
961
+ description = "ACM certificate ARN for the n8n public ALB. Leave empty to reuse www_certificate_arn."
962
+ type = string
963
+ default = ""
114
964
  }
115
965
 
116
- variable "existing_identity_pool_id" {
117
- type = string
118
- default = null
966
+ variable "n8n_main_desired_count" {
967
+ description = "Desired n8n main task count when n8n_runtime_enabled is true."
968
+ type = number
969
+ default = 1
119
970
  }
120
971
 
121
- variable "create_database" {
122
- description = "Create a new Aurora cluster (false = BYO)"
972
+ variable "n8n_worker_desired_count" {
973
+ description = "Desired n8n worker task count when n8n_runtime_enabled is true."
974
+ type = number
975
+ default = 1
976
+ }
977
+
978
+ variable "n8n_worker_concurrency" {
979
+ description = "n8n worker execution concurrency."
980
+ type = number
981
+ default = 10
982
+ }
983
+
984
+ variable "n8n_container_port" {
985
+ description = "n8n HTTP listener/container port exposed through the public ALB."
986
+ type = number
987
+ default = 5678
988
+ }
989
+
990
+ variable "n8n_queue_mode" {
991
+ description = "n8n queue mode toggle. THNK-50 requires queue mode."
123
992
  type = bool
124
993
  default = true
125
994
  }
126
995
 
127
- variable "existing_db_cluster_arn" {
128
- type = string
129
- default = null
996
+ variable "n8n_task_runners_enabled" {
997
+ description = "Enable n8n task runners for code-node execution."
998
+ type = bool
999
+ default = true
130
1000
  }
131
1001
 
132
- variable "existing_db_secret_arn" {
133
- type = string
134
- default = null
1002
+ variable "n8n_package_config_digest" {
1003
+ description = "Digest of the reviewed custom-package configuration injected into the n8n wrapper image."
1004
+ type = string
1005
+ default = ""
135
1006
  }
136
1007
 
137
- variable "existing_db_endpoint" {
138
- type = string
139
- default = null
140
- }
1008
+ variable "n8n_custom_package_specs" {
1009
+ description = "Pinned public npm package specs approved for n8n code nodes."
1010
+ type = list(string)
1011
+ default = []
141
1012
 
142
- variable "existing_db_security_group_id" {
143
- type = string
144
- default = null
1013
+ validation {
1014
+ condition = alltrue([
1015
+ for spec in var.n8n_custom_package_specs :
1016
+ can(regex("^(@[^/]+/[^@]+|[^@]+)@[0-9][0-9A-Za-z.+-]*$", spec))
1017
+ ])
1018
+ error_message = "n8n_custom_package_specs must contain exact public npm specs such as lodash@4.17.21 or @scope/package@1.2.3."
1019
+ }
145
1020
  }
146
1021
 
147
- variable "database_engine" {
148
- description = "Database engine: 'aurora-serverless' (production) or 'rds-postgres' (dev/test, cheaper)"
1022
+ variable "n8n_execution_data_storage_mode" {
1023
+ description = "n8n execution data storage mode. OSS queue-mode defaults to database; s3 is reserved for a licensed enterprise deployment."
149
1024
  type = string
150
- default = "aurora-serverless"
1025
+ default = "database"
1026
+
1027
+ validation {
1028
+ condition = contains(["database", "s3"], var.n8n_execution_data_storage_mode)
1029
+ error_message = "n8n_execution_data_storage_mode must be database or s3."
1030
+ }
151
1031
  }
152
1032
 
153
- variable "enable_hindsight" {
154
- description = "Enable Hindsight long-term memory as an optional add-on alongside the always-on AgentCore managed memory. When true, deploys an ECS+ALB service for semantic/entity-graph/cross-encoder retrieval. Default false."
155
- type = bool
156
- default = false
1033
+ variable "n8n_binary_data_mode" {
1034
+ description = "n8n binary data mode. OSS queue-mode defaults to n8n's built-in default; s3 is reserved for a licensed enterprise deployment."
1035
+ type = string
1036
+ default = "default"
1037
+
1038
+ validation {
1039
+ condition = contains(["default", "filesystem", "s3"], var.n8n_binary_data_mode)
1040
+ error_message = "n8n_binary_data_mode must be default, filesystem, or s3."
1041
+ }
157
1042
  }
158
1043
 
159
- variable "memory_engine" {
160
- description = "Active long-term memory engine for canonical recall/inspect/export. Exactly one engine is authoritative per deployment. Accepted values: 'hindsight' (requires enable_hindsight = true), 'agentcore' (uses the always-on AgentCore managed memory). Legacy value 'managed' maps to 'agentcore'. Empty = auto-select: 'hindsight' when enable_hindsight = true, otherwise 'agentcore'."
1044
+ variable "n8n_cache_engine" {
1045
+ description = "ElastiCache engine for n8n. Prefer valkey; redis is available as a compatibility fallback."
161
1046
  type = string
162
- default = ""
1047
+ default = "valkey"
163
1048
 
164
1049
  validation {
165
- condition = var.memory_engine == "" || contains(["managed", "hindsight", "agentcore"], var.memory_engine)
166
- error_message = "memory_engine must be empty, 'hindsight', 'agentcore', or legacy 'managed'."
1050
+ condition = contains(["valkey", "redis"], var.n8n_cache_engine)
1051
+ error_message = "n8n_cache_engine must be valkey or redis."
167
1052
  }
168
1053
  }
169
1054
 
170
- variable "hindsight_image_tag" {
171
- description = "Hindsight Docker image tag (only used when enable_hindsight = true)"
1055
+ variable "n8n_cache_engine_version" {
1056
+ description = "ElastiCache engine version for n8n."
172
1057
  type = string
173
- default = "0.5.0"
1058
+ default = "8.0"
1059
+ }
1060
+
1061
+ variable "n8n_cache_parameter_group_family" {
1062
+ description = "ElastiCache parameter group family matching n8n_cache_engine/n8n_cache_engine_version."
1063
+ type = string
1064
+ default = "valkey8"
1065
+ }
1066
+
1067
+ variable "n8n_cache_node_type" {
1068
+ description = "ElastiCache node type for the n8n queue."
1069
+ type = string
1070
+ default = "cache.t4g.micro"
1071
+ }
1072
+
1073
+ variable "n8n_cache_num_cache_clusters" {
1074
+ description = "Number of n8n cache nodes in the replication group. Use 1 for the smallest v1 deployment."
1075
+ type = number
1076
+ default = 1
1077
+ }
1078
+
1079
+ variable "n8n_allowed_public_cidr_blocks" {
1080
+ description = "CIDR blocks allowed to reach the public n8n HTTPS ALB."
1081
+ type = list(string)
1082
+ default = ["0.0.0.0/0"]
1083
+ }
1084
+
1085
+ variable "n8n_kms_key_arns" {
1086
+ description = "Optional KMS key ARNs needed to decrypt n8n-injected secrets."
1087
+ type = list(string)
1088
+ default = []
174
1089
  }
175
1090
 
176
1091
  variable "agentcore_memory_id" {
@@ -219,6 +1134,30 @@ variable "bucket_name" {
219
1134
  default = ""
220
1135
  }
221
1136
 
1137
+ variable "billing_export_bucket_name" {
1138
+ description = "Optional S3 bucket containing AWS Data Exports/CUR 2.0 manifests for bill reconciliation. Empty leaves the scheduled reconciler in no-op mode."
1139
+ type = string
1140
+ default = ""
1141
+ }
1142
+
1143
+ variable "billing_export_manifest_key" {
1144
+ description = "Optional S3 key for the latest AWS billing export manifest imported by the scheduled bill reconciler."
1145
+ type = string
1146
+ default = ""
1147
+ }
1148
+
1149
+ variable "billing_reconciliation_tolerance_usd" {
1150
+ description = "Absolute USD tolerance used when comparing ThinkWork projected aggregate spend to AWS billing export spend."
1151
+ type = number
1152
+ default = 0.01
1153
+ }
1154
+
1155
+ variable "plugin_catalog_github_token_secret_arn" {
1156
+ description = "Optional Secrets Manager ARN/name containing a GitHub token for API plugin catalog release-asset fetches. Empty uses unauthenticated GitHub requests."
1157
+ type = string
1158
+ default = ""
1159
+ }
1160
+
222
1161
  variable "database_name" {
223
1162
  description = "Aurora database name"
224
1163
  type = string
@@ -241,6 +1180,24 @@ variable "lambda_artifact_prefix" {
241
1180
  default = "latest/lambdas"
242
1181
  }
243
1182
 
1183
+ variable "agentcore_pi_source_image_uri" {
1184
+ description = "Optional release image URI copied into the stage AgentCore ECR repository before creating the Pi Lambda."
1185
+ type = string
1186
+ default = ""
1187
+ }
1188
+
1189
+ variable "skill_trust_runner_enabled" {
1190
+ description = "Deploy the skill-trust-runner container Lambda. Requires the <ecr-repo>:skill-trust-runner-latest image to already exist (CI seeds it for repo-managed stages); releases do not yet publish this image, so init-scaffolded installs must leave it disabled (harness cycle-5 ledger entry)."
1191
+ type = bool
1192
+ default = true
1193
+ }
1194
+
1195
+ variable "manage_bedrock_invocation_logging" {
1196
+ description = "Own the account/region-level Bedrock model-invocation logging (log group /thinkwork/bedrock/model-invocations, IAM role, and the account logging configuration). Exactly ONE stage per account+region may manage it — a second stack collides on the log group and would clobber/destroy the account-level config (harness cycle-5 ledger entry)."
1197
+ type = bool
1198
+ default = true
1199
+ }
1200
+
244
1201
  variable "require_lambda_artifacts" {
245
1202
  description = "Fail planning unless either lambda_zips_dir or lambda_artifact_bucket/lambda_artifact_prefix is configured. Enterprise deployment repos should set this to true."
246
1203
  type = bool
@@ -271,6 +1228,8 @@ variable "admin_callback_urls" {
271
1228
  "http://localhost:5174/auth/callback",
272
1229
  "http://localhost:5175",
273
1230
  "http://localhost:5175/auth/callback",
1231
+ "http://127.0.0.1:42010/callback",
1232
+ "http://localhost:42010/callback",
274
1233
  ]
275
1234
  }
276
1235
 
@@ -282,6 +1241,15 @@ variable "admin_logout_urls" {
282
1241
  ]
283
1242
  }
284
1243
 
1244
+ variable "desktop_callback_urls" {
1245
+ type = list(string)
1246
+ default = [
1247
+ "thinkwork://oauth/callback",
1248
+ "thinkwork-dev://oauth/callback",
1249
+ "thinkwork-canary://oauth/callback",
1250
+ ]
1251
+ }
1252
+
285
1253
  variable "mobile_callback_urls" {
286
1254
  type = list(string)
287
1255
  default = ["exp://localhost:8081", "thinkwork://", "thinkwork://auth/callback"]
@@ -302,6 +1270,12 @@ variable "pre_signup_lambda_zip" {
302
1270
  default = ""
303
1271
  }
304
1272
 
1273
+ variable "cognito_custom_auth_lambda_zip" {
1274
+ description = "Path to the Cognito custom-auth challenge Lambda zip"
1275
+ type = string
1276
+ default = ""
1277
+ }
1278
+
305
1279
  # ---------------------------------------------------------------------------
306
1280
  # Docs site (custom domain — optional)
307
1281
  # ---------------------------------------------------------------------------
@@ -334,22 +1308,6 @@ variable "www_certificate_arn" {
334
1308
  default = ""
335
1309
  }
336
1310
 
337
- # ---------------------------------------------------------------------------
338
- # Admin site (custom domain — optional)
339
- # ---------------------------------------------------------------------------
340
-
341
- variable "admin_domain" {
342
- description = "Custom domain for the admin SPA (e.g. admin.thinkwork.ai). Leave empty for CloudFront default."
343
- type = string
344
- default = ""
345
- }
346
-
347
- variable "admin_certificate_arn" {
348
- description = "ACM certificate ARN for the admin domain (us-east-1, required for CloudFront custom domains)."
349
- type = string
350
- default = ""
351
- }
352
-
353
1311
  variable "app_domain" {
354
1312
  description = "Canonical custom domain for the end-user app (e.g. app.thinkwork.ai). Leave empty to fall back to computer_domain for compatibility."
355
1313
  type = string
@@ -374,6 +1332,43 @@ variable "computer_certificate_arn" {
374
1332
  default = ""
375
1333
  }
376
1334
 
1335
+ # ---------------------------------------------------------------------------
1336
+ # Customer domain (<name>.thinkwork.ai — optional, customer deployments)
1337
+ #
1338
+ # Two-phase by design (the shared claim tool owns the Cloudflare apex zone;
1339
+ # this module owns the customer-account half): setting customer_domain
1340
+ # creates the Route53 zone + CAA record only — inert until the NS hop lands.
1341
+ # Flipping customer_domain_delegated after delegation resolves mints +
1342
+ # validates the ACM cert, aliases the customer domain onto the app
1343
+ # distribution, and adds the customer-domain Cognito callback/logout entries
1344
+ # alongside the legacy ones (the dual window). Flipping
1345
+ # customer_domain_legacy_retired afterwards removes the legacy app
1346
+ # callback/logout entries — retirement is a reviewable Terraform change,
1347
+ # not a console edit.
1348
+ #
1349
+ # Setting customer_domain (with or without the gates) requires the caller to
1350
+ # pass an aliased us-east-1 AWS provider:
1351
+ # providers = { aws.us_east_1 = aws.us_east_1 }
1352
+ # ---------------------------------------------------------------------------
1353
+
1354
+ variable "customer_domain" {
1355
+ description = "Customer domain for this deployment (e.g. tei.thinkwork.ai), claimed via the shared namespace claim tool. Leave empty to skip all customer-domain resources."
1356
+ type = string
1357
+ default = ""
1358
+ }
1359
+
1360
+ variable "customer_domain_delegated" {
1361
+ description = "Set true once the apex zone's NS records point at the customer zone (claim tool phase two). Gates the ACM certificate, the web alias records, and the customer-domain Cognito callback entries. Requires customer_domain."
1362
+ type = bool
1363
+ default = false
1364
+ }
1365
+
1366
+ variable "customer_domain_legacy_retired" {
1367
+ description = "Set true to remove the legacy (non-customer-domain) end-user app URLs from the Cognito callback/logout lists after the dual-domain cutover window closes. Requires customer_domain_delegated."
1368
+ type = bool
1369
+ default = false
1370
+ }
1371
+
377
1372
  variable "computer_sandbox_domain" {
378
1373
  description = "Custom domain for the LLM-fragment iframe substrate (e.g. sandbox.thinkwork.ai). Cross-origin from the computer SPA — load-bearing for the iframe-isolation security boundary documented in docs/specs/computer-ai-elements-contract-v1.md. Leave empty to skip provisioning the sandbox distribution."
379
1374
  type = string
@@ -387,7 +1382,7 @@ variable "computer_sandbox_certificate_arn" {
387
1382
  }
388
1383
 
389
1384
  variable "computer_sandbox_allowed_parent_origins" {
390
- description = "Comma-separated list of trusted parent origins that may frame the sandbox iframe (e.g. 'https://thinkwork.ai,https://dev.thinkwork.ai'). Wired into the sandbox CSP frame-ancestors directive AND mirrored at iframe-shell build time as __ALLOWED_PARENT_ORIGINS__. The two trust sets MUST stay in sync. Leave empty to allow no parents (effectively disabling the sandbox)."
1385
+ description = "Comma-separated list of trusted web parent origins that may frame the sandbox iframe (e.g. 'https://thinkwork.ai,https://dev.thinkwork.ai'). Desktop custom-protocol origins are appended automatically. Wired into the sandbox CSP frame-ancestors directive AND mirrored at iframe-shell build time as __ALLOWED_PARENT_ORIGINS__. The two trust sets MUST stay in sync. Leave empty to allow only desktop custom-protocol parents."
391
1386
  type = string
392
1387
  default = ""
393
1388
  }
@@ -412,22 +1407,98 @@ variable "stripe_price_ids_json" {
412
1407
  default = "{}"
413
1408
  }
414
1409
 
1410
+ variable "enable_stripe_billing" {
1411
+ description = "Provision Stripe billing Lambdas, API routes, and credentials placeholder secret."
1412
+ type = bool
1413
+ default = true
1414
+ }
1415
+
1416
+ variable "enable_slack_workspace_app" {
1417
+ description = "Provision Slack workspace app Lambdas, API routes, and credentials placeholder secret."
1418
+ type = bool
1419
+ default = true
1420
+ }
1421
+
415
1422
  # ---------------------------------------------------------------------------
416
- # SES inbound email (delegated subzone — Option A)
1423
+ # SES inbound email (delegated tenant subzones — Option A)
417
1424
  # ---------------------------------------------------------------------------
418
1425
 
1426
+ variable "ses_parent_domain" {
1427
+ description = "Parent domain used for tenant email subdomains (e.g. thinkwork.ai). Leave empty to skip SES inbound resources."
1428
+ type = string
1429
+ default = ""
1430
+ }
1431
+
419
1432
  variable "ses_inbound_domain" {
420
- description = "Subdomain used for agent email (e.g. agents.thinkwork.ai). Terraform creates a delegated Route53 hosted zone for this name, manages the SES domain identity + DKIM CNAMEs + MX in that zone, and wires an SES receipt rule that stores inbound mail in S3 and invokes the email-inbound Lambda. Leave empty to skip all SES inbound resources. After first apply, paste the `ses_inbound_name_servers` output as NS records at whatever hosts the parent domain."
1433
+ description = "Legacy delegated subdomain used for agent email (e.g. agents.thinkwork.ai). Kept until legacy-address retirement notices are no longer needed."
421
1434
  type = string
422
1435
  default = ""
423
1436
  }
424
1437
 
1438
+ variable "ses_tenant_slugs" {
1439
+ description = "Tenant slugs to provision as SES receiving subdomains under ses_parent_domain. Each slug creates <slug>.<ses_parent_domain>."
1440
+ type = set(string)
1441
+ default = []
1442
+ }
1443
+
425
1444
  variable "ses_manage_active_rule_set" {
426
1445
  description = "Activate the SES receipt rule set. Only ONE rule set can be active per region per AWS account; set false on secondary stages that share an account so they don't fight over activation."
427
1446
  type = bool
428
1447
  default = true
429
1448
  }
430
1449
 
1450
+ variable "cognito_email_source_arn" {
1451
+ description = "Verified SES identity ARN Cognito should use for user-pool emails. Empty keeps Cognito's default sender."
1452
+ type = string
1453
+ default = ""
1454
+ }
1455
+
1456
+ variable "cognito_from_email_address" {
1457
+ description = "Optional Cognito From header, for example 'ThinkWork <noreply@example.com>'. Requires cognito_email_source_arn when set."
1458
+ type = string
1459
+ default = ""
1460
+ }
1461
+
1462
+ variable "cognito_reply_to_email_address" {
1463
+ description = "Optional Cognito Reply-To address for user-pool invitation and recovery emails."
1464
+ type = string
1465
+ default = ""
1466
+ }
1467
+
1468
+ variable "cognito_invite_email_subject" {
1469
+ description = "Subject line for Cognito AdminCreateUser invitation emails."
1470
+ type = string
1471
+ default = "You're invited to ThinkWork"
1472
+ }
1473
+
1474
+ variable "cognito_invite_email_message" {
1475
+ description = "HTML invitation body for Cognito AdminCreateUser emails. Empty derives a stage-aware ThinkWork sign-in message. Custom values must include {username} and {####}."
1476
+ type = string
1477
+ default = ""
1478
+
1479
+ validation {
1480
+ condition = (
1481
+ var.cognito_invite_email_message == "" ||
1482
+ (
1483
+ strcontains(var.cognito_invite_email_message, "{username}") &&
1484
+ strcontains(var.cognito_invite_email_message, "{####}")
1485
+ )
1486
+ )
1487
+ error_message = "cognito_invite_email_message must be empty or include Cognito placeholders {username} and {####}."
1488
+ }
1489
+ }
1490
+
1491
+ variable "cognito_invite_sms_message" {
1492
+ description = "SMS invitation body for Cognito AdminCreateUser messages. Must include {username} and {####} so Cognito can send the temporary password."
1493
+ type = string
1494
+ default = "Your ThinkWork username is {username} and temporary password is {####}."
1495
+
1496
+ validation {
1497
+ condition = strcontains(var.cognito_invite_sms_message, "{username}") && strcontains(var.cognito_invite_sms_message, "{####}")
1498
+ error_message = "cognito_invite_sms_message must include Cognito placeholders {username} and {####}."
1499
+ }
1500
+ }
1501
+
431
1502
  variable "wiki_compile_model_id" {
432
1503
  description = "Bedrock model id used by the wiki-compile Lambda (leaf planner + aggregation planner + section writer). Any Converse-compatible model works; change without a code deploy."
433
1504
  type = string
@@ -440,6 +1511,18 @@ variable "company_brain_source_agent_model_id" {
440
1511
  default = "us.anthropic.claude-haiku-4-5-20251001-v1:0"
441
1512
  }
442
1513
 
1514
+ variable "company_brain_backdoor_install_key_secret_arn" {
1515
+ description = "Optional Secrets Manager ARN containing the temporary Company Brain backdoor install key. Empty disables the backdoor; the raw key is never stored in tfvars or runtime-config."
1516
+ type = string
1517
+ default = ""
1518
+ }
1519
+
1520
+ variable "company_brain_backdoor_install_key_stages" {
1521
+ description = "Comma-separated stage allowlist for the temporary Company Brain backdoor install key. Empty disables deployed backdoor redemption."
1522
+ type = string
1523
+ default = ""
1524
+ }
1525
+
443
1526
  variable "wiki_aggregation_pass_enabled" {
444
1527
  description = "Feature flag for the wiki aggregation pass (parent section rollups + section promotion). 'true' to enable, anything else disables. Pinned in terraform so unrelated deploys don't reset it."
445
1528
  type = string
@@ -460,14 +1543,7 @@ variable "google_places_api_key" {
460
1543
  }
461
1544
 
462
1545
  variable "mapbox_public_token" {
463
- description = "Mapbox public pk.* token consumed by apps/computer's MapView primitive (in @thinkwork/computer-stdlib) for inline map tile rendering inside generated applets. Flows from this variable → terraform output → scripts/build-computer.sh → apps/computer/.env.production as VITE_MAPBOX_PUBLIC_TOKEN. URL-restrict on the Mapbox dashboard to the deployed `computer.<apex>` host (and any dev hosts) — the token ships in the public Vite bundle, so URL allowlist is the security boundary. Empty string is acceptable: MapView falls back to OpenStreetMap tiles when the env var is unset, so dev environments without an operator-provisioned token still render maps."
464
- type = string
465
- default = ""
466
- sensitive = true
467
- }
468
-
469
- variable "nova_act_api_key" {
470
- description = "Nova Act API key used by the Strands Browser Automation tool. Stored as SSM SecureString at /thinkwork/<stage>/agentcore/nova-act-api-key. Empty string = parameter created with a placeholder; operator populates via `aws ssm put-parameter --overwrite`."
1546
+ description = "Mapbox public pk.* token consumed by the apps/web MapView primitive (in @thinkwork/computer-stdlib) for inline map tile rendering inside generated applets. Flows from this variable → terraform output → scripts/build-web.sh → apps/web/.env.production as VITE_MAPBOX_PUBLIC_TOKEN. URL-restrict on the Mapbox dashboard to the deployed `computer.<apex>` host (and any dev hosts) — the token ships in the public Vite bundle, so URL allowlist is the security boundary. Empty string is acceptable: MapView falls back to OpenStreetMap tiles when the env var is unset, so dev environments without an operator-provisioned token still render maps."
471
1547
  type = string
472
1548
  default = ""
473
1549
  sensitive = true