thinkwork-cli 0.12.16 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +517 -10403
- package/dist/commands/enterprise/templates/deploy-repo/docs/runbook.md +3 -8
- package/dist/commands/enterprise/templates/deploy-repo/terraform/main.tf +1 -184
- package/dist/drizzle/0050_brain_v0_entity_subtype.sql +2 -2
- package/dist/drizzle/0051_brain_v0_tenant_entity_pages.sql +6 -6
- package/dist/drizzle/0052_brain_v0_external_refs.sql +2 -2
- package/dist/drizzle/0053_brain_v0_unresolved_mentions_subtype.sql +2 -2
- package/dist/drizzle/0145_knowledge_graph_thread_ingest.sql +14 -14
- package/dist/drizzle/0146_knowledge_graph_source_scope.sql +1 -1
- package/dist/drizzle/0157_knowledge_graph_observations_source.sql +2 -2
- package/dist/drizzle/0158_wiki_tenant_scope.sql +1 -1
- package/dist/drizzle/0165_plugin_premium_entitlements.sql +2 -2
- package/dist/drizzle/{0166_company_brain_substrate_contract.sql → 0166_brain_substrate_contract.sql} +9 -9
- package/dist/drizzle/{0167_company_brain_artifact_manifest_runtime.sql → 0167_brain_artifact_manifest_runtime.sql} +5 -5
- package/dist/drizzle/0168_eval_skill_gate.sql +1 -1
- package/dist/drizzle/0183_okf_artifact_manifests.sql +1 -1
- package/dist/drizzle/0200_eval_results_execution_tier.sql +40 -0
- package/dist/drizzle/0201_brain_dream_runs.sql +72 -0
- package/dist/drizzle/0202_backfill_thread_participants_from_senders.sql +110 -0
- package/dist/drizzle/0203_threads_mode_override.sql +61 -0
- package/dist/drizzle/0204_thread_turns_triggering_message_id.sql +48 -0
- package/dist/drizzle/0205_routines_git_python.sql +185 -0
- package/dist/drizzle/0206_agent_loop_versions_routine_actions.sql +40 -0
- package/dist/drizzle/0207_tenant_credentials_github_repo_kind.sql +52 -0
- package/dist/drizzle/0208_knowledge_graph_neutral_identifiers.sql +253 -0
- package/dist/drizzle/0209_living_artifacts_schema.sql +109 -0
- package/dist/drizzle/0210_think137_automations_additive_schema.sql +113 -0
- package/dist/drizzle/0211_backfill_agent_loop_versions_target_spec.sql +120 -0
- package/dist/drizzle/0212_fold_webhooks_into_automations.sql +312 -0
- package/dist/drizzle/0213_agent_loop_versions_judge_evidence_nullable.sql +63 -0
- package/dist/drizzle/0214_think137_drop_judge_evidence_roi.sql +99 -0
- package/dist/drizzle/0215_agent_loop_versions_goal_worker_policy_nullable.sql +70 -0
- package/dist/drizzle/0216_drop_agent_loop_versions_goal_worker_policy.sql +81 -0
- package/dist/drizzle/0217_agents_capability_folder_dispatch.sql +12 -0
- package/dist/drizzle/0218_document_plates.sql +30 -0
- package/dist/drizzle/0219_document_section_waivers.sql +29 -0
- package/dist/drizzle/0220_artifacts_created_by_user.sql +21 -0
- package/dist/drizzle/0221_artifact_shares.sql +29 -0
- package/dist/drizzle/0221_workflow_interpreter_thin_slice.sql +71 -0
- package/dist/drizzle/0222_compliance_drainer_select_audit_events.sql +21 -0
- package/dist/drizzle/0223_document_conformance_reports.sql +38 -0
- package/dist/drizzle/0224_artifact_refresh_state.sql +11 -0
- package/dist/drizzle/0225_think216_agent_loop_convergence.sql +21 -0
- package/dist/drizzle/0226_drop_n8n_agent_step_runs.sql +6 -0
- package/dist/drizzle/0227_analyst_reader_role.sql +1055 -0
- package/dist/drizzle/0228_tenant_credentials_rds_iam_kind.sql +62 -0
- package/dist/drizzle/0229_analyst_reader_rds_iam_grant.sql +79 -0
- package/dist/drizzle/0230_analyst_rls.sql +1613 -0
- package/dist/drizzle/0231_cost_events_cache_write_enforcement_exempt.sql +11 -0
- package/dist/plugins/catalog/package.json +0 -1
- package/dist/plugins/catalog/src/__tests__/build-catalog.test.ts +0 -1
- package/dist/plugins/catalog/src/__tests__/catalog.test.ts +16 -8
- package/dist/plugins/catalog/src/__tests__/contracts.test.ts +56 -0
- package/dist/plugins/catalog/src/__tests__/plugin-package.test.ts +0 -2
- package/dist/plugins/catalog/src/__tests__/plugin-registry.test.ts +0 -5
- package/dist/plugins/catalog/src/contracts.ts +112 -0
- package/dist/plugins/catalog/src/registry/generated-first-party.ts +0 -6
- package/dist/plugins/n8n/README.md +4 -36
- package/dist/plugins/n8n/src/deployment/managed-app.ts +0 -17
- package/dist/plugins/n8n/src/manifest.ts +0 -5
- package/dist/plugins/n8n/terraform/n8n/main.tf +0 -26
- package/dist/plugins/n8n/terraform/n8n/outputs.tf +0 -5
- package/dist/plugins/n8n/terraform/n8n/variables.tf +0 -6
- package/dist/plugins/n8n/test/manifest.test.ts +0 -1
- package/dist/plugins/twenty/package.json +5 -0
- package/dist/plugins/twenty/scripts/lib/__tests__/load-records.test.ts +232 -0
- package/dist/plugins/twenty/scripts/lib/__tests__/mappers.test.ts +489 -0
- package/dist/plugins/twenty/scripts/lib/__tests__/members-ensure.test.ts +199 -0
- package/dist/plugins/twenty/scripts/lib/__tests__/provision-members-db.test.ts +43 -0
- package/dist/plugins/twenty/scripts/lib/__tests__/schema-ensure.test.ts +230 -0
- package/dist/plugins/twenty/scripts/lib/__tests__/twenty-client.test.ts +207 -0
- package/dist/plugins/twenty/scripts/lib/lastmile-reader.ts +282 -0
- package/dist/plugins/twenty/scripts/lib/load-attachments.ts +220 -0
- package/dist/plugins/twenty/scripts/lib/load-records.ts +680 -0
- package/dist/plugins/twenty/scripts/lib/mappers.ts +559 -0
- package/dist/plugins/twenty/scripts/lib/members-ensure.ts +381 -0
- package/dist/plugins/twenty/scripts/lib/provision-members-db.ts +191 -0
- package/dist/plugins/twenty/scripts/lib/schema-ensure.ts +425 -0
- package/dist/plugins/twenty/scripts/lib/twenty-client.ts +246 -0
- package/dist/plugins/twenty/scripts/migrate-lastmile.ts +610 -0
- package/dist/plugins/twenty/scripts/provision-twenty-members.ts +214 -0
- package/dist/plugins/twenty/src/manifest.ts +99 -0
- package/dist/plugins/twenty/terraform/twenty/README.md +1 -1
- package/dist/plugins/twenty/test/manifest.test.ts +12 -2
- package/dist/terraform/examples/greenfield/main.tf +90 -380
- package/dist/terraform/examples/greenfield/terraform.tfvars.example +0 -1
- package/dist/terraform/modules/app/agentcore-pi/README.md +1 -3
- package/dist/terraform/modules/app/agentcore-pi/main.tf +29 -38
- package/dist/terraform/modules/app/agentcore-pi/variables.tf +23 -15
- package/dist/terraform/modules/app/agentcore-runtime/main.tf +3 -3
- package/dist/terraform/modules/app/customer-domain/main.tf +16 -2
- package/dist/terraform/modules/app/deployment-control-plane/main.tf +5 -0
- package/dist/terraform/modules/app/deployment-control-plane/runner.py +85 -207
- package/dist/terraform/modules/app/deployment-control-plane/test_runner_bundle.py +56 -2
- package/dist/terraform/modules/app/hindsight-memory/main.tf +52 -4
- package/dist/terraform/modules/app/lambda-api/eval-fanout.tf +7 -0
- package/dist/terraform/modules/app/lambda-api/handlers.tf +493 -89
- package/dist/terraform/modules/app/lambda-api/iam-grouped.tf +215 -96
- package/dist/terraform/modules/app/lambda-api/main.tf +24 -5
- package/dist/terraform/modules/app/lambda-api/outputs.tf +19 -11
- package/dist/terraform/modules/app/lambda-api/variables.tf +94 -67
- package/dist/terraform/modules/app/ses-email/main.tf +14 -2
- package/dist/terraform/modules/app/workflow-interpreter-stepfunctions/main.tf +493 -0
- package/dist/terraform/modules/app/workflow-interpreter-stepfunctions/outputs.tf +34 -0
- package/dist/terraform/modules/app/workflow-interpreter-stepfunctions/variables.tf +32 -0
- package/dist/terraform/modules/data/aurora-postgres/main.tf +55 -0
- package/dist/terraform/modules/data/aurora-postgres/outputs.tf +15 -0
- package/dist/terraform/modules/data/s3-buckets/main.tf +26 -0
- package/dist/terraform/modules/thinkwork/README.md +0 -1
- package/dist/terraform/modules/thinkwork/main.tf +167 -446
- package/dist/terraform/modules/thinkwork/outputs.tf +2 -142
- package/dist/terraform/modules/thinkwork/variables.tf +55 -309
- package/dist/terraform/schema.graphql +4 -0
- package/dist/workspace-defaults/files/AGENTS.md +45 -31
- package/dist/workspace-defaults/files/CONTEXT.md +48 -4
- package/dist/workspace-defaults/files/GUARDRAILS.md +18 -0
- package/dist/workspace-defaults/files/MEMORY_GUIDE.md +32 -4
- package/dist/workspace-defaults/files/SPACE.md +34 -19
- package/dist/workspace-defaults/files/TOOLS.md +30 -0
- package/dist/workspace-defaults/files/skills/document-composer/SKILL.md +154 -0
- package/dist/workspace-defaults/files/skills/document-composer/references/authoring-rules.md +101 -0
- package/package.json +1 -1
- package/dist/plugins/company-brain/README.md +0 -37
- package/dist/plugins/company-brain/package.json +0 -33
- package/dist/plugins/company-brain/runtime/cognee/Dockerfile +0 -11
- package/dist/plugins/company-brain/smoke/cognee-managed-app-smoke.mjs +0 -458
- package/dist/plugins/company-brain/smoke/cognee-memory-cutover-smoke.mjs +0 -539
- package/dist/plugins/company-brain/smoke/company-brain-context-engine-smoke.mjs +0 -312
- package/dist/plugins/company-brain/smoke/company-brain-operations-smoke.mjs +0 -449
- package/dist/plugins/company-brain/smoke/company-brain-plugin-smoke.mjs +0 -655
- package/dist/plugins/company-brain/smoke/hindsight-memory-isolation-smoke.mjs +0 -474
- package/dist/plugins/company-brain/src/api/cognee-client.ts +0 -896
- package/dist/plugins/company-brain/src/api/cognee-cluster-identity.ts +0 -49
- package/dist/plugins/company-brain/src/api/cognee-memory-scope.ts +0 -84
- package/dist/plugins/company-brain/src/api/context-engine-provider.ts +0 -888
- package/dist/plugins/company-brain/src/api/migration.ts +0 -665
- package/dist/plugins/company-brain/src/deployment/cognee-managed-app.ts +0 -396
- package/dist/plugins/company-brain/src/index.ts +0 -62
- package/dist/plugins/company-brain/src/manifest.ts +0 -112
- package/dist/plugins/company-brain/terraform/cognee/README.md +0 -263
- package/dist/plugins/company-brain/terraform/cognee/main.tf +0 -766
- package/dist/plugins/company-brain/terraform/cognee/outputs.tf +0 -144
- package/dist/plugins/company-brain/terraform/cognee/variables.tf +0 -402
- package/dist/plugins/company-brain/test/api/cognee-client.test.ts +0 -562
- package/dist/plugins/company-brain/test/api/cognee-memory-scope.test.ts +0 -74
- package/dist/plugins/company-brain/test/api/context-engine-provider.test.ts +0 -447
- package/dist/plugins/company-brain/test/api/migration.test.ts +0 -465
- package/dist/plugins/company-brain/test/manifest.test.ts +0 -95
- package/dist/plugins/company-brain/tsconfig.json +0 -8
|
@@ -67,6 +67,13 @@ variable "billing_export_bucket_name" {
|
|
|
67
67
|
default = ""
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
+
variable "cost_alert_emails" {
|
|
71
|
+
description = "Email endpoints subscribed to the cost-alerts SNS topic (drift + reconciler-health alarms, THINK-245). Empty list creates the topic with no subscriptions."
|
|
72
|
+
type = list(string)
|
|
73
|
+
default = []
|
|
74
|
+
sensitive = true
|
|
75
|
+
}
|
|
76
|
+
|
|
70
77
|
variable "billing_export_manifest_key" {
|
|
71
78
|
description = "Optional S3 key for the latest AWS billing export manifest to import on the scheduled bill reconciler run."
|
|
72
79
|
type = string
|
|
@@ -86,7 +93,7 @@ variable "plugin_catalog_github_token_secret_arn" {
|
|
|
86
93
|
}
|
|
87
94
|
|
|
88
95
|
variable "brain_artifacts_kms_key_arn" {
|
|
89
|
-
description = "Optional KMS key ARN used to encrypt canonical
|
|
96
|
+
description = "Optional KMS key ARN used to encrypt canonical ThinkWork Brain artifacts. AES256 encryption is used when unset."
|
|
90
97
|
type = string
|
|
91
98
|
default = ""
|
|
92
99
|
}
|
|
@@ -219,6 +226,18 @@ variable "requester_memory_dreaming_model_id" {
|
|
|
219
226
|
default = "openai.gpt-oss-120b-1:0"
|
|
220
227
|
}
|
|
221
228
|
|
|
229
|
+
variable "brain_dream_state_enabled" {
|
|
230
|
+
description = "Enable the recurring Brain dream-state consolidation schedule (THINK-133 U4). Manual invokes work regardless via event.manual."
|
|
231
|
+
type = bool
|
|
232
|
+
default = false
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
variable "brain_dream_state_schedule_expression" {
|
|
236
|
+
description = "EventBridge Scheduler expression for Brain dream-state runs."
|
|
237
|
+
type = string
|
|
238
|
+
default = "cron(0 5 * * ? *)"
|
|
239
|
+
}
|
|
240
|
+
|
|
222
241
|
variable "extension_proxy_signing_secret" {
|
|
223
242
|
description = "Shared HMAC secret used by the generic Admin extension proxy to sign actor context for extension backends."
|
|
224
243
|
type = string
|
|
@@ -232,6 +251,12 @@ variable "hindsight_endpoint" {
|
|
|
232
251
|
default = ""
|
|
233
252
|
}
|
|
234
253
|
|
|
254
|
+
variable "hindsight_database_name" {
|
|
255
|
+
description = "Dedicated Hindsight database name (THINK-220 cutover flag). Empty = Hindsight tables live in the `hindsight` schema of the primary database; set = the api reads them from this database's `public` schema. Rides the SSM runtime-config document (getConfig), not Lambda env."
|
|
256
|
+
type = string
|
|
257
|
+
default = ""
|
|
258
|
+
}
|
|
259
|
+
|
|
235
260
|
variable "agentcore_memory_id" {
|
|
236
261
|
description = "Bedrock AgentCore Memory resource ID — used by the GraphQL memory resolvers to list records across tenant agents."
|
|
237
262
|
type = string
|
|
@@ -239,63 +264,15 @@ variable "agentcore_memory_id" {
|
|
|
239
264
|
}
|
|
240
265
|
|
|
241
266
|
variable "memory_engine" {
|
|
242
|
-
description = "Active long-term memory engine for this deployment. Exactly one engine is canonical for recall/inspect/export.
|
|
267
|
+
description = "Active long-term memory engine for this deployment. Exactly one engine is canonical for recall/inspect/export."
|
|
243
268
|
type = string
|
|
244
269
|
default = "hindsight"
|
|
245
270
|
validation {
|
|
246
|
-
condition = contains(["hindsight", "agentcore"
|
|
247
|
-
error_message = "memory_engine must be 'hindsight'
|
|
271
|
+
condition = contains(["hindsight", "agentcore"], var.memory_engine)
|
|
272
|
+
error_message = "memory_engine must be 'hindsight' or 'agentcore'."
|
|
248
273
|
}
|
|
249
274
|
}
|
|
250
275
|
|
|
251
|
-
variable "cognee_enabled" {
|
|
252
|
-
description = "Whether the Cognee knowledge graph add-on is enabled for this deployment."
|
|
253
|
-
type = bool
|
|
254
|
-
default = false
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
variable "cognee_endpoint" {
|
|
258
|
-
description = "Internal Cognee API endpoint (empty when disabled)."
|
|
259
|
-
type = string
|
|
260
|
-
default = ""
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
variable "cognee_log_group_name" {
|
|
264
|
-
description = "CloudWatch log group for Cognee (empty when disabled)."
|
|
265
|
-
type = string
|
|
266
|
-
default = ""
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
variable "cognee_backend_mode" {
|
|
270
|
-
description = "Selected Cognee backend mode (empty when disabled)."
|
|
271
|
-
type = string
|
|
272
|
-
default = ""
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
variable "cognee_cluster_arn" {
|
|
276
|
-
description = "ECS cluster ARN for Cognee (empty when disabled)."
|
|
277
|
-
type = string
|
|
278
|
-
default = ""
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
variable "cognee_service_name" {
|
|
282
|
-
description = "ECS service name for Cognee (empty when disabled)."
|
|
283
|
-
type = string
|
|
284
|
-
default = ""
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
variable "cognee_worker_subnet_ids" {
|
|
288
|
-
description = "Subnet IDs for the Knowledge Graph ingest worker Lambda VPC attachment. Leave empty to deploy the worker without VPC access."
|
|
289
|
-
type = list(string)
|
|
290
|
-
default = []
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
variable "cognee_worker_security_group_ids" {
|
|
294
|
-
description = "Security group IDs for the Knowledge Graph ingest worker Lambda VPC attachment. Leave empty to deploy the worker without VPC access."
|
|
295
|
-
type = list(string)
|
|
296
|
-
default = []
|
|
297
|
-
}
|
|
298
|
-
|
|
299
276
|
variable "okf_efs_subnet_ids" {
|
|
300
277
|
description = "Subnet IDs for the OKF EFS hydrator Lambda VPC attachment. Leave empty to deploy the hydrator without an EFS mount."
|
|
301
278
|
type = list(string)
|
|
@@ -500,26 +477,14 @@ variable "wiki_compile_model_id" {
|
|
|
500
477
|
default = "openai.gpt-oss-120b-1:0"
|
|
501
478
|
}
|
|
502
479
|
|
|
503
|
-
variable "
|
|
504
|
-
description = "Bedrock model id the GraphQL context-engine
|
|
480
|
+
variable "brain_source_agent_model_id" {
|
|
481
|
+
description = "Bedrock model id the GraphQL context-engine Brain source-agent runtime uses for JSON tool/action turns. Kept separate from the high-throughput wiki compiler model so source agents can use a model tuned for reliable action JSON."
|
|
505
482
|
type = string
|
|
506
483
|
default = "us.anthropic.claude-haiku-4-5-20251001-v1:0"
|
|
507
484
|
}
|
|
508
485
|
|
|
509
|
-
variable "company_brain_backdoor_install_key_secret_arn" {
|
|
510
|
-
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 the runtime-config document."
|
|
511
|
-
type = string
|
|
512
|
-
default = ""
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
variable "company_brain_backdoor_install_key_stages" {
|
|
516
|
-
description = "Comma-separated stage allowlist for the temporary Company Brain backdoor install key. Both this value and company_brain_backdoor_install_key_secret_arn must be set for deployed backdoor redemption."
|
|
517
|
-
type = string
|
|
518
|
-
default = ""
|
|
519
|
-
}
|
|
520
|
-
|
|
521
486
|
variable "kg_obs_max_candidates_per_run" {
|
|
522
|
-
description = "Per-run candidate cap for the observations → Knowledge Graph ingest worker (KG_OBS_MAX_CANDIDATES_PER_RUN). Bounds the layered-gate classifier cost
|
|
487
|
+
description = "Per-run candidate cap for the observations → Knowledge Graph ingest worker (KG_OBS_MAX_CANDIDATES_PER_RUN). Bounds the layered-gate classifier cost and lets truncated runs self-invoke to drain the remaining backlog. Stored as a string because the Lambda reads it verbatim from env."
|
|
523
488
|
type = string
|
|
524
489
|
default = "10"
|
|
525
490
|
}
|
|
@@ -536,6 +501,18 @@ variable "wiki_deterministic_linking_enabled" {
|
|
|
536
501
|
default = "true"
|
|
537
502
|
}
|
|
538
503
|
|
|
504
|
+
variable "kg_extraction_model_id" {
|
|
505
|
+
description = "Bedrock model id for knowledge-graph entity/relationship extraction from observations (plan 2026-07-03-005). Defaults to a gpt-oss high-quota model; overridable per stage."
|
|
506
|
+
type = string
|
|
507
|
+
default = "openai.gpt-oss-120b-1:0"
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
variable "knowledge_graph_observations_ingest_enabled" {
|
|
511
|
+
description = "Enable the recurring Brain distillation schedule (Hindsight observations -> knowledge graph). Ships disabled; dev flips on after a golden-set-validated manual run (plan 2026-07-03-005 U4)."
|
|
512
|
+
type = bool
|
|
513
|
+
default = false
|
|
514
|
+
}
|
|
515
|
+
|
|
539
516
|
variable "wiki_source" {
|
|
540
517
|
description = "Wiki pipeline source dispatch (plan 2026-06-09-004 U10). 'planner' (default) runs the original LLM compile path; 'graph' runs the deterministic graph→wiki materializer over the knowledge-graph mirror and makes successful observation-ingest runs the compile trigger. Variable-ized (not hardcoded) per the wiki-compile env precedent so unrelated deploys don't reset the flag; the Lambda reads it verbatim from env and treats any value other than 'graph' as 'planner'."
|
|
541
518
|
type = string
|
|
@@ -774,3 +751,53 @@ variable "parameters_secrets_extension_layer_arn" {
|
|
|
774
751
|
type = string
|
|
775
752
|
default = ""
|
|
776
753
|
}
|
|
754
|
+
|
|
755
|
+
variable "capability_signing_public_key" {
|
|
756
|
+
description = "Ed25519 public key (SPKI PEM) verifying capability sidecars/manifests (THINK-173). Empty disables verification (render fails closed: signed entries withhold as unsigned)."
|
|
757
|
+
type = string
|
|
758
|
+
default = ""
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
variable "capability_signing_private_key_secret" {
|
|
762
|
+
description = "Secrets Manager name holding the Ed25519 private signing key. Empty disables signing (grants fail loudly with signing_unavailable)."
|
|
763
|
+
type = string
|
|
764
|
+
default = ""
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
# ---------------------------------------------------------------------------
|
|
768
|
+
# THINK-228 U3 — analyst query broker runtime config
|
|
769
|
+
# ---------------------------------------------------------------------------
|
|
770
|
+
|
|
771
|
+
variable "analyst_reader_secret_arn" {
|
|
772
|
+
description = "ARN of the Secrets Manager secret holding the `analyst_reader` Aurora role credentials (THINK-228 U2). Wired from `module.database.analyst_reader_secret_arn`. The analyst-query-broker Lambda executes model-authored SQL exclusively under this role."
|
|
773
|
+
type = string
|
|
774
|
+
default = ""
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
variable "analyst_broker_secret_arn" {
|
|
778
|
+
description = "ARN of the Secrets Manager secret holding the analyst query-broker caller credential (JSON {token, tenantId}; THINK-228 U3). Wired from `module.database.analyst_broker_secret_arn`. The broker validates incoming Bearer tokens against it; the seeded connector row references it as auth_config.secretRef."
|
|
779
|
+
type = string
|
|
780
|
+
default = ""
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
variable "analyst_policy_source" {
|
|
784
|
+
description = "THINK-229 KTD5 enforcement flip: 'row' (default — sidecar policy is shadow-only) or 'sidecar' (the signed sidecar policy block is authoritative: budgets + retain_sql flow into dispatch and the broker). Flip only after clean analyst-policy-shadow parity on live traffic AND a provision refresh so every connection sidecar carries a policy block."
|
|
785
|
+
type = string
|
|
786
|
+
default = "row"
|
|
787
|
+
validation {
|
|
788
|
+
condition = contains(["row", "sidecar"], var.analyst_policy_source)
|
|
789
|
+
error_message = "analyst_policy_source must be 'row' or 'sidecar'."
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
variable "analyst_db_cluster_resource_id" {
|
|
794
|
+
description = "Immutable RDS cluster resource ID (cluster-XXXX / db-XXXX) for the stage database (THINK-229 U1). Wired from `module.database.cluster_resource_id`. Keys the broker's `rds-db:connect` IAM grant — the rds-db ARN format requires the resource ID, not the cluster ARN — and gates the IAM connect env on the broker Lambda: when empty, the broker stays on the password path."
|
|
795
|
+
type = string
|
|
796
|
+
default = ""
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
variable "artifact_delivery_from_email" {
|
|
800
|
+
description = "Default SES from-address for artifact email delivery. Empty keeps the code fallback (noreply@agents.thinkwork.ai — only verified in the ThinkWork dev account, so customer stages MUST set this)."
|
|
801
|
+
type = string
|
|
802
|
+
default = ""
|
|
803
|
+
}
|
|
@@ -64,6 +64,18 @@ variable "email_inbound_fn_arn" {
|
|
|
64
64
|
default = ""
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
variable "email_inbound_fn_name_attr" {
|
|
68
|
+
description = "Attribute-based twin of email_inbound_fn_name (dependency ordering; attributes only, never count)."
|
|
69
|
+
type = string
|
|
70
|
+
default = ""
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
variable "email_inbound_fn_arn_attr" {
|
|
74
|
+
description = "Attribute-based twin of email_inbound_fn_arn (dependency ordering; attributes only, never count)."
|
|
75
|
+
type = string
|
|
76
|
+
default = ""
|
|
77
|
+
}
|
|
78
|
+
|
|
67
79
|
variable "email_inbound_fn_name" {
|
|
68
80
|
description = "Function name of the email-inbound Lambda (for the Lambda permission)."
|
|
69
81
|
type = string
|
|
@@ -230,7 +242,7 @@ resource "aws_lambda_permission" "ses_invoke_email_inbound" {
|
|
|
230
242
|
count = local.enabled && local.has_lambda ? 1 : 0
|
|
231
243
|
statement_id = "AllowSESInvokeEmailInbound"
|
|
232
244
|
action = "lambda:InvokeFunction"
|
|
233
|
-
function_name = var.email_inbound_fn_name
|
|
245
|
+
function_name = var.email_inbound_fn_name_attr != "" ? var.email_inbound_fn_name_attr : var.email_inbound_fn_name
|
|
234
246
|
principal = "ses.amazonaws.com"
|
|
235
247
|
source_account = var.account_id
|
|
236
248
|
}
|
|
@@ -255,7 +267,7 @@ resource "aws_ses_receipt_rule" "inbound" {
|
|
|
255
267
|
dynamic "lambda_action" {
|
|
256
268
|
for_each = local.has_lambda ? [1] : []
|
|
257
269
|
content {
|
|
258
|
-
function_arn = var.email_inbound_fn_arn
|
|
270
|
+
function_arn = var.email_inbound_fn_arn_attr != "" ? var.email_inbound_fn_arn_attr : var.email_inbound_fn_arn
|
|
259
271
|
invocation_type = "Event"
|
|
260
272
|
position = local.has_bucket ? 2 : 1
|
|
261
273
|
}
|