thinkwork-cli 0.12.16 → 0.12.17
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
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
output "cognee_endpoint" {
|
|
2
|
-
description = "Internal Cognee API endpoint"
|
|
3
|
-
value = "http://${aws_lb.cognee.dns_name}"
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
output "cognee_log_group_name" {
|
|
7
|
-
description = "CloudWatch log group for Cognee"
|
|
8
|
-
value = aws_cloudwatch_log_group.cognee.name
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
output "cognee_task_role_arn" {
|
|
12
|
-
description = "IAM role assumed by the Cognee ECS task"
|
|
13
|
-
value = aws_iam_role.ecs_task.arn
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
output "cognee_execution_role_arn" {
|
|
17
|
-
description = "IAM role used by ECS to pull the Cognee image and inject secrets"
|
|
18
|
-
value = aws_iam_role.ecs_execution.arn
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
output "cognee_backend_mode" {
|
|
22
|
-
description = "Selected Cognee backend mode"
|
|
23
|
-
value = var.backend_mode
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
output "cognee_brain_instance_key" {
|
|
27
|
-
description = "Tenant-scoped Company Brain instance key used for resource naming; null for legacy stage-wide instances."
|
|
28
|
-
value = local.tenant_scoped_brain_instance ? local.normalized_brain_instance_key : null
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
output "cognee_brain_tenant_id" {
|
|
32
|
-
description = "Tenant ID owning this Company Brain substrate instance; null for legacy stage-wide instances."
|
|
33
|
-
value = var.brain_tenant_id != "" ? var.brain_tenant_id : null
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
output "cognee_brain_storage_tier" {
|
|
37
|
-
description = "Company Brain storage tier selected for this substrate instance."
|
|
38
|
-
value = var.brain_storage_tier
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
output "cognee_graph_database_provider" {
|
|
42
|
-
description = "Cognee graph database provider selected for the Brain substrate."
|
|
43
|
-
value = var.graph_database_provider
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
output "cognee_vector_db_provider" {
|
|
47
|
-
description = "Cognee vector database provider selected for the Brain substrate."
|
|
48
|
-
value = var.vector_db_provider
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
output "cognee_embedding_model" {
|
|
52
|
-
description = "Embedding model configured for Brain retrieval and migration evidence."
|
|
53
|
-
value = var.embedding_model
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
output "cognee_embedding_dimensions" {
|
|
57
|
-
description = "Embedding vector dimension configured for Brain retrieval and migration evidence."
|
|
58
|
-
value = var.embedding_dimensions
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
output "cognee_s3_artifact_root" {
|
|
62
|
-
description = "Canonical Company Brain S3 source artifact root."
|
|
63
|
-
value = var.brain_s3_artifact_root
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
output "cognee_s3_manifest_root" {
|
|
67
|
-
description = "Canonical Company Brain S3 ingestion manifest root."
|
|
68
|
-
value = var.brain_s3_manifest_root
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
output "cognee_s3_vault_projection_root" {
|
|
72
|
-
description = "Canonical Company Brain S3 vault projection root."
|
|
73
|
-
value = var.brain_s3_vault_projection_root
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
output "cognee_neptune_graph_id" {
|
|
77
|
-
description = "Neptune Analytics graph ID for production Brain tier."
|
|
78
|
-
value = var.neptune_graph_id
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
output "cognee_neptune_endpoint" {
|
|
82
|
-
description = "Neptune Analytics endpoint for production Brain tier."
|
|
83
|
-
value = var.neptune_endpoint
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
output "cognee_private_substrate_mode" {
|
|
87
|
-
description = "Whether the Brain substrate is configured as private/internal-only."
|
|
88
|
-
value = var.private_substrate_mode
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
output "cognee_production_posture" {
|
|
92
|
-
description = "Operator evidence string for production-tier approval/readiness posture."
|
|
93
|
-
value = var.production_posture
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
output "cognee_cluster_arn" {
|
|
97
|
-
description = "Company Brain ECS cluster ARN hosting the Cognee service"
|
|
98
|
-
value = aws_ecs_cluster.main.arn
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
output "cognee_service_name" {
|
|
102
|
-
description = "ECS service name for Cognee"
|
|
103
|
-
value = aws_ecs_service.cognee.name
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
output "cognee_alb_arn" {
|
|
107
|
-
description = "Internal ALB ARN for Cognee"
|
|
108
|
-
value = aws_lb.cognee.arn
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
output "cognee_security_group_id" {
|
|
112
|
-
description = "Security group ID for the Cognee ECS task"
|
|
113
|
-
value = aws_security_group.cognee.id
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
output "cognee_storage_file_system_id" {
|
|
117
|
-
description = "EFS file system ID backing Cognee writable data/system directories"
|
|
118
|
-
value = aws_efs_file_system.cognee.id
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
output "cognee_db_password_secret_arn" {
|
|
122
|
-
description = "Secrets Manager ARN used for the Cognee DB password"
|
|
123
|
-
value = local.effective_db_password_secret_arn
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
output "cognee_llm_api_key_secret_arn" {
|
|
127
|
-
description = "Secrets Manager ARN used for the optional Cognee LLM API key"
|
|
128
|
-
value = local.effective_llm_api_key_secret_arn
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
output "cognee_embedding_api_key_secret_arn" {
|
|
132
|
-
description = "Secrets Manager ARN used for the optional Cognee embedding API key"
|
|
133
|
-
value = local.effective_embedding_api_key_secret_arn
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
output "cognee_vector_db_key_secret_arn" {
|
|
137
|
-
description = "Secrets Manager ARN used for the optional Cognee vector store key"
|
|
138
|
-
value = local.effective_vector_db_key_secret_arn
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
output "cognee_graph_database_password_secret_arn" {
|
|
142
|
-
description = "Secrets Manager ARN used for the optional Cognee graph store password"
|
|
143
|
-
value = local.effective_graph_database_password_secret_arn
|
|
144
|
-
}
|
|
@@ -1,402 +0,0 @@
|
|
|
1
|
-
variable "stage" {
|
|
2
|
-
description = "Deployment stage (e.g. dev, prod)"
|
|
3
|
-
type = string
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
variable "vpc_id" {
|
|
7
|
-
description = "VPC ID for Cognee networking"
|
|
8
|
-
type = string
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
variable "subnet_ids" {
|
|
12
|
-
description = "Public subnet IDs for the Cognee ECS task and internal ALB. Public subnets provide outbound egress in phase 1; the ALB remains internal."
|
|
13
|
-
type = list(string)
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
variable "db_security_group_id" {
|
|
17
|
-
description = "Security group ID for the shared PostgreSQL database"
|
|
18
|
-
type = string
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
variable "db_host" {
|
|
22
|
-
description = "PostgreSQL host for Cognee metadata storage"
|
|
23
|
-
type = string
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
variable "db_port" {
|
|
27
|
-
description = "PostgreSQL port for Cognee metadata storage"
|
|
28
|
-
type = number
|
|
29
|
-
default = 5432
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
variable "db_name" {
|
|
33
|
-
description = "PostgreSQL database name for Cognee metadata storage"
|
|
34
|
-
type = string
|
|
35
|
-
default = "thinkwork"
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
variable "db_username" {
|
|
39
|
-
description = "Dedicated PostgreSQL username for Cognee metadata storage. Do not use the shared Aurora admin/master user."
|
|
40
|
-
type = string
|
|
41
|
-
|
|
42
|
-
validation {
|
|
43
|
-
condition = !contains(["postgres", "thinkwork_admin", "rdsadmin"], lower(var.db_username))
|
|
44
|
-
error_message = "db_username must be a dedicated least-privilege Cognee database user, not the shared admin/master user."
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
variable "db_password_secret_arn" {
|
|
49
|
-
description = "Secrets Manager ARN containing a JSON password field for the Cognee PostgreSQL user. Leave empty only when create_secret_placeholders = true."
|
|
50
|
-
type = string
|
|
51
|
-
default = ""
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
variable "create_secret_placeholders" {
|
|
55
|
-
description = "Create operator-owned Secrets Manager placeholder containers for missing Cognee secrets. Secret values are seeded with placeholders and ignored after creation so rotation survives Terraform applies."
|
|
56
|
-
type = bool
|
|
57
|
-
default = false
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
variable "allowed_internal_cidr_blocks" {
|
|
61
|
-
description = "CIDR blocks allowed to reach the internal Cognee ALB. Leave empty to create the endpoint without caller ingress."
|
|
62
|
-
type = list(string)
|
|
63
|
-
default = []
|
|
64
|
-
|
|
65
|
-
validation {
|
|
66
|
-
condition = alltrue([
|
|
67
|
-
for cidr in var.allowed_internal_cidr_blocks :
|
|
68
|
-
cidr != "0.0.0.0/0" && cidr != "::/0"
|
|
69
|
-
])
|
|
70
|
-
error_message = "allowed_internal_cidr_blocks must not include all-network CIDRs such as 0.0.0.0/0 or ::/0."
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
variable "allowed_internal_security_group_ids" {
|
|
75
|
-
description = "Security group IDs allowed to reach the internal Cognee ALB"
|
|
76
|
-
type = list(string)
|
|
77
|
-
default = []
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
variable "image_uri" {
|
|
81
|
-
description = "Cognee container image URI pinned to a reviewed immutable digest."
|
|
82
|
-
type = string
|
|
83
|
-
|
|
84
|
-
validation {
|
|
85
|
-
condition = can(regex("@sha256:[0-9a-f]{64}$", var.image_uri))
|
|
86
|
-
error_message = "image_uri must be pinned to an immutable sha256 image digest."
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
variable "cpu" {
|
|
91
|
-
description = "Fargate task CPU units"
|
|
92
|
-
type = number
|
|
93
|
-
default = 2048
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
variable "memory" {
|
|
97
|
-
description = "Fargate task memory in MB. 2048 OOM-crashed the dogfood task during cognify (Kuzu graph + LanceDB vectors + embedding/LLM client + extraction pipeline in one task); 8192 gives the single-task pipeline real headroom. Valid Fargate combo with cpu=2048 (4096-16384 MB)."
|
|
98
|
-
type = number
|
|
99
|
-
default = 8192
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
variable "desired_count" {
|
|
103
|
-
description = "Desired number of Cognee ECS tasks. Dogfood/local backend mode must stay single-task."
|
|
104
|
-
type = number
|
|
105
|
-
default = 1
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
variable "brain_tenant_id" {
|
|
109
|
-
description = "Tenant ID for a tenant-scoped Company Brain substrate instance. Empty preserves the legacy stage-wide Cognee resource names."
|
|
110
|
-
type = string
|
|
111
|
-
default = ""
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
variable "brain_instance_key" {
|
|
115
|
-
description = "Stable tenant-scoped Brain instance key used to derive resource names. Empty falls back to brain_tenant_id, and both empty preserve legacy stage-wide names."
|
|
116
|
-
type = string
|
|
117
|
-
default = ""
|
|
118
|
-
|
|
119
|
-
validation {
|
|
120
|
-
condition = var.brain_instance_key == "" || can(regex("^[A-Za-z0-9][A-Za-z0-9_-]{0,47}$", var.brain_instance_key))
|
|
121
|
-
error_message = "brain_instance_key must be empty or a stable 1-48 character alphanumeric, underscore, or dash key."
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
variable "brain_storage_tier" {
|
|
126
|
-
description = "Company Brain storage tier: default uses local LanceDB/Kuzu-style stores; production uses Neptune Analytics graph/vector providers."
|
|
127
|
-
type = string
|
|
128
|
-
default = "default"
|
|
129
|
-
|
|
130
|
-
validation {
|
|
131
|
-
condition = contains(["default", "production"], var.brain_storage_tier)
|
|
132
|
-
error_message = "brain_storage_tier must be default or production."
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
variable "brain_s3_artifact_root" {
|
|
137
|
-
description = "Canonical Company Brain S3 root URI for source artifacts. Used as runner/status evidence; S3 is the replay source of truth."
|
|
138
|
-
type = string
|
|
139
|
-
default = ""
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
variable "brain_s3_manifest_root" {
|
|
143
|
-
description = "Canonical Company Brain S3 root URI for ingestion manifests."
|
|
144
|
-
type = string
|
|
145
|
-
default = ""
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
variable "brain_s3_vault_projection_root" {
|
|
149
|
-
description = "Canonical Company Brain S3 root URI for vault/materialized projections."
|
|
150
|
-
type = string
|
|
151
|
-
default = ""
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
variable "brain_artifacts_bucket_arn" {
|
|
155
|
-
description = "Optional S3 bucket ARN for canonical Brain artifacts. When set with brain_artifacts_prefixes, the task role receives scoped object access."
|
|
156
|
-
type = string
|
|
157
|
-
default = ""
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
variable "brain_artifacts_prefixes" {
|
|
161
|
-
description = "Tenant/stage prefixes inside brain_artifacts_bucket_arn the Brain task may access."
|
|
162
|
-
type = list(string)
|
|
163
|
-
default = []
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
variable "private_substrate_mode" {
|
|
167
|
-
description = "Whether the Brain substrate is private/internal-only. Public substrate mode is intentionally unsupported for Company Brain."
|
|
168
|
-
type = bool
|
|
169
|
-
default = true
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
variable "require_authentication" {
|
|
173
|
-
description = "Passed to Cognee REQUIRE_AUTHENTICATION. Defaults false for current internal ALB compatibility; Company Brain can set true when the runtime supports it."
|
|
174
|
-
type = bool
|
|
175
|
-
default = false
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
variable "enable_backend_access_control" {
|
|
179
|
-
description = "Passed to Cognee ENABLE_BACKEND_ACCESS_CONTROL for private-substrate hardening."
|
|
180
|
-
type = bool
|
|
181
|
-
default = false
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
variable "cors_allowed_origins" {
|
|
185
|
-
description = "Passed to Cognee CORS_ALLOWED_ORIGINS. Keep empty for internal-only Company Brain substrate."
|
|
186
|
-
type = string
|
|
187
|
-
default = ""
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
variable "cpu_architecture" {
|
|
191
|
-
description = "Fargate CPU architecture for the Cognee task"
|
|
192
|
-
type = string
|
|
193
|
-
default = "X86_64"
|
|
194
|
-
|
|
195
|
-
validation {
|
|
196
|
-
condition = contains(["X86_64", "ARM64"], var.cpu_architecture)
|
|
197
|
-
error_message = "cpu_architecture must be X86_64 or ARM64."
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
variable "container_port" {
|
|
202
|
-
description = "Cognee API container port"
|
|
203
|
-
type = number
|
|
204
|
-
default = 8000
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
variable "health_check_path" {
|
|
208
|
-
description = "HTTP path used by ALB health checks"
|
|
209
|
-
type = string
|
|
210
|
-
default = "/health"
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
variable "health_check_grace_period_seconds" {
|
|
214
|
-
description = "Seconds ECS ignores failing load balancer health checks while Cognee starts"
|
|
215
|
-
type = number
|
|
216
|
-
default = 300
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
variable "wait_for_steady_state" {
|
|
220
|
-
description = "Whether Terraform waits for the Cognee ECS service to reach steady state"
|
|
221
|
-
type = bool
|
|
222
|
-
default = true
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
variable "enable_execute_command" {
|
|
226
|
-
description = "Enable `aws ecs execute-command` into the Cognee container (and grant the SSM-messages channel on the task role). The dogfood Cognee ALB is VPC-internal, so exec is the only way to introspect its store/API directly. Defaults on for the current dogfood/dev deployment; set false for hardened multi-tenant production."
|
|
227
|
-
type = bool
|
|
228
|
-
default = true
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
variable "log_retention_days" {
|
|
232
|
-
description = "CloudWatch log retention for the Cognee service"
|
|
233
|
-
type = number
|
|
234
|
-
default = 14
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
variable "backend_mode" {
|
|
238
|
-
description = "Cognee backend mode. dogfood uses local graph/vector paths on EFS; remote requires remote graph/vector URLs."
|
|
239
|
-
type = string
|
|
240
|
-
default = "dogfood"
|
|
241
|
-
|
|
242
|
-
validation {
|
|
243
|
-
condition = contains(["dogfood", "remote"], var.backend_mode)
|
|
244
|
-
error_message = "backend_mode must be dogfood or remote."
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
variable "llm_provider" {
|
|
249
|
-
description = "Cognee LLM provider"
|
|
250
|
-
type = string
|
|
251
|
-
default = "bedrock"
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
variable "llm_model" {
|
|
255
|
-
description = "Cognee LLM model"
|
|
256
|
-
type = string
|
|
257
|
-
default = "bedrock/amazon.nova-lite-v1:0"
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
variable "llm_api_key_secret_arn" {
|
|
261
|
-
description = "Optional Secrets Manager ARN for non-Bedrock LLM provider API key"
|
|
262
|
-
type = string
|
|
263
|
-
default = ""
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
variable "embedding_provider" {
|
|
267
|
-
description = "Cognee embedding provider"
|
|
268
|
-
type = string
|
|
269
|
-
default = "bedrock"
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
variable "embedding_model" {
|
|
273
|
-
description = "Cognee embedding model"
|
|
274
|
-
type = string
|
|
275
|
-
default = "amazon.titan-embed-text-v2:0"
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
variable "embedding_dimensions" {
|
|
279
|
-
description = "Embedding vector dimensions. Must match the selected vector store."
|
|
280
|
-
type = number
|
|
281
|
-
default = 1024
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
variable "embedding_api_key_secret_arn" {
|
|
285
|
-
description = "Optional Secrets Manager ARN for non-Bedrock embedding provider API key"
|
|
286
|
-
type = string
|
|
287
|
-
default = ""
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
variable "embedding_max_completion_tokens" {
|
|
291
|
-
description = "Optional embedding max token setting for Cognee"
|
|
292
|
-
type = string
|
|
293
|
-
default = ""
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
variable "vector_db_provider" {
|
|
297
|
-
description = "Cognee vector store provider"
|
|
298
|
-
type = string
|
|
299
|
-
default = "lancedb"
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
variable "vector_db_url" {
|
|
303
|
-
description = "Cognee vector store URL. Leave empty in dogfood mode to use the EFS-backed local default."
|
|
304
|
-
type = string
|
|
305
|
-
default = ""
|
|
306
|
-
|
|
307
|
-
validation {
|
|
308
|
-
condition = (
|
|
309
|
-
var.vector_db_url == "" ||
|
|
310
|
-
(
|
|
311
|
-
!can(regex("://[^/?#]*@", var.vector_db_url)) &&
|
|
312
|
-
!can(regex("[?&][^=]*(token|key|secret|password|pass)[^=]*=", lower(var.vector_db_url)))
|
|
313
|
-
)
|
|
314
|
-
)
|
|
315
|
-
error_message = "vector_db_url must not embed credentials; use vector_db_key_secret_arn for secrets."
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
variable "vector_db_key_secret_arn" {
|
|
320
|
-
description = "Optional Secrets Manager ARN for a remote vector store key"
|
|
321
|
-
type = string
|
|
322
|
-
default = ""
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
variable "graph_database_provider" {
|
|
326
|
-
description = "Cognee graph store provider"
|
|
327
|
-
type = string
|
|
328
|
-
default = "kuzu"
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
variable "graph_database_url" {
|
|
332
|
-
description = "Cognee graph store URL. Leave empty in dogfood mode to use the EFS-backed local Kuzu default."
|
|
333
|
-
type = string
|
|
334
|
-
default = ""
|
|
335
|
-
|
|
336
|
-
validation {
|
|
337
|
-
condition = (
|
|
338
|
-
var.graph_database_url == "" ||
|
|
339
|
-
(
|
|
340
|
-
!can(regex("://[^/?#]*@", var.graph_database_url)) &&
|
|
341
|
-
!can(regex("[?&][^=]*(token|key|secret|password|pass)[^=]*=", lower(var.graph_database_url)))
|
|
342
|
-
)
|
|
343
|
-
)
|
|
344
|
-
error_message = "graph_database_url must not embed credentials; use graph_database_password_secret_arn for secrets."
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
variable "graph_database_username" {
|
|
349
|
-
description = "Optional Cognee graph store username"
|
|
350
|
-
type = string
|
|
351
|
-
default = ""
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
variable "graph_database_password_secret_arn" {
|
|
355
|
-
description = "Optional Secrets Manager ARN for a remote graph store password"
|
|
356
|
-
type = string
|
|
357
|
-
default = ""
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
variable "neptune_graph_id" {
|
|
361
|
-
description = "Neptune Analytics graph ID used by the production Brain tier."
|
|
362
|
-
type = string
|
|
363
|
-
default = ""
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
variable "neptune_graph_arn" {
|
|
367
|
-
description = "Optional Neptune Analytics graph ARN. When set, the task role receives scoped Neptune graph query access."
|
|
368
|
-
type = string
|
|
369
|
-
default = ""
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
variable "neptune_endpoint" {
|
|
373
|
-
description = "Neptune Analytics endpoint used by the production Brain tier."
|
|
374
|
-
type = string
|
|
375
|
-
default = ""
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
variable "production_posture" {
|
|
379
|
-
description = "Operator evidence string for production-tier approval/readiness posture."
|
|
380
|
-
type = string
|
|
381
|
-
default = ""
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
variable "bedrock_model_resource_arns" {
|
|
385
|
-
description = "Explicit Bedrock model ARNs Cognee may invoke when a Bedrock LLM or embedding provider is selected."
|
|
386
|
-
type = list(string)
|
|
387
|
-
default = []
|
|
388
|
-
|
|
389
|
-
validation {
|
|
390
|
-
condition = alltrue([
|
|
391
|
-
for arn in var.bedrock_model_resource_arns :
|
|
392
|
-
arn != "*" && !can(regex("\\*", arn))
|
|
393
|
-
])
|
|
394
|
-
error_message = "bedrock_model_resource_arns must list explicit model or inference-profile ARNs, not wildcards."
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
variable "kms_key_arns" {
|
|
399
|
-
description = "Optional KMS key ARNs needed to decrypt injected secrets"
|
|
400
|
-
type = list(string)
|
|
401
|
-
default = []
|
|
402
|
-
}
|