thinkwork-cli 0.13.0 → 0.13.2
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/{api-client-JUBCQQDF.js → api-client-JYZXYQJR.js} +3 -1
- package/dist/bowser-6Z6JFAIR.js +2822 -0
- package/dist/chunk-DV3MRBR5.js +43 -0
- package/dist/chunk-DVPBI5HM.js +1728 -0
- package/dist/chunk-EI5ZX7CN.js +522 -0
- package/dist/chunk-EUJ7X6YD.js +126 -0
- package/dist/chunk-GG5WKBOX.js +436 -0
- package/dist/chunk-I64EZSU5.js +358 -0
- package/dist/chunk-ILZKG5WV.js +6151 -0
- package/dist/chunk-KMIJ5KGT.js +128 -0
- package/dist/chunk-OCPHU34C.js +996 -0
- package/dist/chunk-QOERT44A.js +3286 -0
- package/dist/chunk-XYM7PE2A.js +2264 -0
- package/dist/{chunk-STY44FQO.js → chunk-Z2F6RJFR.js} +12 -18
- package/dist/cli.js +72564 -18884
- package/dist/dist-es-CRV46D5B.js +315 -0
- package/dist/dist-es-DCY4IC3Y.js +2000 -0
- package/dist/dist-es-ENBUC3JP.js +14726 -0
- package/dist/dist-es-G54LBMRN.js +48 -0
- package/dist/dist-es-G7PTG75M.js +176 -0
- package/dist/dist-es-GKDBE7E6.js +88 -0
- package/dist/dist-es-HY3535OI.js +70 -0
- package/dist/dist-es-KL7Y5NB2.js +377 -0
- package/dist/dist-es-LDE437AM.js +170 -0
- package/dist/dist-es-P26FWFLT.js +485 -0
- package/dist/dist-es-Q57SZXZ7.js +70 -0
- package/dist/dist-es-R7FGL2IB.js +88 -0
- package/dist/dist-es-USORBXZ5.js +318 -0
- package/dist/dist-es-ZKC2QKD2.js +377 -0
- package/dist/drizzle/0076_scheduled_jobs_marco_backfill.sql +2 -1
- package/dist/drizzle/0079_seed_tenant_customize_catalog.sql +1 -0
- package/dist/drizzle/0090_brain_schema_extraction.sql +10 -0
- package/dist/drizzle/0132_drop_computer_tables.sql +3 -0
- package/dist/drizzle/0160_compliance_event_types_plugins.sql +2 -0
- package/dist/drizzle/0214_think137_drop_judge_evidence_roi.sql +1 -0
- package/dist/drizzle/0216_drop_agent_loop_versions_goal_worker_policy.sql +1 -0
- package/dist/drizzle/0227_analyst_reader_role.sql +106 -38
- package/dist/drizzle/0230_analyst_rls.sql +192 -66
- package/dist/drizzle/0232_memory_source_thin_ledger.sql +176 -0
- package/dist/drizzle/0232_message_source_event_id.sql +9 -0
- package/dist/drizzle/0233_msteams_install_and_links.sql +151 -0
- package/dist/drizzle/0233_workflow_memory_stage_tokens.sql +20 -0
- package/dist/drizzle/0234_memory_claim_lifecycle.sql +160 -0
- package/dist/drizzle/0235_workflow_token_execution_claim.sql +34 -0
- package/dist/drizzle/0236_memory_retraction_fencing.sql +50 -0
- package/dist/drizzle/0237_memory_claims_active_value_uidx.sql +172 -0
- package/dist/drizzle/0238_memory_erase_generation_fence.sql +97 -0
- package/dist/drizzle/0239_canonical_entity_identity.sql +257 -0
- package/dist/drizzle/0240_memory_personal_scope.sql +45 -0
- package/dist/drizzle/0241_knowledge_base_document_manifest.sql +67 -0
- package/dist/drizzle/0242_search_queries.sql +28 -0
- package/dist/drizzle/0243_section_sources_thread_refs.sql +12 -0
- package/dist/drizzle/0244_system_automations_and_memory_stage_overrides.sql +45 -0
- package/dist/drizzle/0245_wiki_page_render.sql +21 -0
- package/dist/drizzle/0246_automation_workflow_ownership.sql +30 -0
- package/dist/drizzle/0247_capability_runtime.sql +402 -0
- package/dist/drizzle/0248_capability_private_interpreter.sql +13 -0
- package/dist/drizzle/0249_capability_headless_execution_evidence.sql +40 -0
- package/dist/drizzle/0250_kg_schema_extraction.sql +576 -0
- package/dist/drizzle/0251_agents_json_render_ui.sql +25 -0
- package/dist/drizzle/0251_brain_stragglers.sql +263 -0
- package/dist/drizzle/0252_drop_kg_and_straggler_compat_views.sql +100 -0
- package/dist/drizzle/0253_drop_brain_substrate.sql +93 -0
- package/dist/drizzle/0254_capability_autonomous_admission.sql +29 -0
- package/dist/drizzle/0255_capability_autonomous_approval_mode.sql +16 -0
- package/dist/drizzle/0256_agent_profile_manifest_authority.sql +18 -0
- package/dist/drizzle/0257_agents_runtime_allow_harness.sql +24 -0
- package/dist/drizzle/0257_capability_approvals.sql +53 -0
- package/dist/drizzle/0258_pending_tool_approvals.sql +84 -0
- package/dist/drizzle/0259_tenant_capability_registry_trust.sql +19 -0
- package/dist/drizzle/0260_scheduled_jobs_run_as_user.sql +20 -0
- package/dist/drizzle/0261_managed_harness_multiplayer.sql +313 -0
- package/dist/drizzle/0261_native_auth_control_plane.sql +328 -0
- package/dist/drizzle/0262_auth_subscription_tickets.sql +59 -0
- package/dist/drizzle/0262_parallel_harness_threads.sql +9 -0
- package/dist/drizzle/0263_agentcore_runtime_identifier.sql +69 -0
- package/dist/drizzle/0263_drop_workos_auth_runtime.sql +236 -0
- package/dist/drizzle/0264_auth_enrollment_attempt_limits.sql +15 -0
- package/dist/drizzle/0264_harness_tool_execution_ledger.sql +113 -0
- package/dist/drizzle/0265_eval_runs_requester_identity.sql +28 -0
- package/dist/drizzle/0265_require_fully_valid_auth_publication.sql +27 -0
- package/dist/drizzle/0266_auth_identity_recovery_grants.sql +9 -0
- package/dist/drizzle/0266_eval_profiles_runtime_type.sql +12 -0
- package/dist/drizzle/0267_ontology_candidate_rejections.sql +53 -0
- package/dist/drizzle/0268_identity_crosswalk_routing.sql +182 -0
- package/dist/drizzle/0269_ontology_system_map.sql +31 -0
- package/dist/event-streams-7JNLJEEL.js +894 -0
- package/dist/event-streams-KDF5RWR6.js +1515 -0
- package/dist/loadSso-DJVB7BXE.js +576 -0
- package/dist/loadSso-JAMNA3WY.js +583 -0
- package/dist/plugins/catalog/package.json +1 -2
- package/dist/plugins/catalog/src/__tests__/build-catalog.test.ts +0 -1
- package/dist/plugins/catalog/src/__tests__/contracts.test.ts +0 -69
- 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 +2 -179
- package/dist/plugins/catalog/src/registry/generated-first-party.ts +0 -6
- package/dist/signin-UGDWTGS4.js +821 -0
- package/dist/sso-oidc-Q4VXANXY.js +837 -0
- package/dist/sts-CWLSE3GH.js +1241 -0
- package/dist/sts-DNZLNVOV.js +1245 -0
- package/dist/terraform/examples/greenfield/main.tf +247 -50
- package/dist/terraform/examples/greenfield/terraform.tfvars.example +15 -1
- package/dist/terraform/modules/app/agentcore-admin/main.tf +341 -0
- package/dist/terraform/modules/app/agentcore-admin/outputs.tf +20 -0
- package/dist/terraform/modules/app/agentcore-code-interpreter/main.tf +61 -0
- package/dist/terraform/modules/app/agentcore-gateway/main.tf +305 -0
- package/dist/terraform/modules/app/agentcore-gateway/outputs.tf +44 -0
- package/dist/terraform/modules/app/agentcore-gateway/scripts/delete_gateway.sh +93 -0
- package/dist/terraform/modules/app/agentcore-gateway/scripts/read_gateway.sh +33 -0
- package/dist/terraform/modules/app/agentcore-gateway/scripts/reconcile_gateway.sh +543 -0
- package/dist/terraform/modules/app/agentcore-gateway/variables.tf +70 -0
- package/dist/terraform/modules/app/agentcore-harness/main.tf +330 -0
- package/dist/terraform/modules/app/agentcore-harness/outputs.tf +72 -0
- package/dist/terraform/modules/app/agentcore-harness/scripts/delete_harness.sh +5 -0
- package/dist/terraform/modules/app/agentcore-harness/scripts/harness-lifecycle.mjs +430 -0
- package/dist/terraform/modules/app/agentcore-harness/scripts/harness-readback.mjs +180 -0
- package/dist/terraform/modules/app/agentcore-harness/scripts/harness-tool-contract.mjs +193 -0
- package/dist/terraform/modules/app/agentcore-harness/scripts/prune_harness.sh +5 -0
- package/dist/terraform/modules/app/agentcore-harness/scripts/read_harness.sh +5 -0
- package/dist/terraform/modules/app/agentcore-harness/scripts/reconcile_harness.sh +5 -0
- package/dist/terraform/modules/app/agentcore-harness/variables.tf +96 -0
- package/dist/terraform/modules/app/agentcore-identity/main.tf +173 -0
- package/dist/terraform/modules/app/agentcore-identity/outputs.tf +51 -0
- package/dist/terraform/modules/app/agentcore-identity/scripts/bootstrap_twenty_oauth_client.sh +122 -0
- package/dist/terraform/modules/app/agentcore-identity/scripts/delete_identity.sh +25 -0
- package/dist/terraform/modules/app/agentcore-identity/scripts/delete_twenty_identity.sh +16 -0
- package/dist/terraform/modules/app/agentcore-identity/scripts/read_identity.sh +40 -0
- package/dist/terraform/modules/app/agentcore-identity/scripts/reconcile_identity.sh +73 -0
- package/dist/terraform/modules/app/agentcore-identity/scripts/reconcile_twenty_identity.sh +74 -0
- package/dist/terraform/modules/app/agentcore-identity/scripts/reconcile_twenty_provider.mjs +61 -0
- package/dist/terraform/modules/app/agentcore-identity/variables.tf +54 -0
- package/dist/terraform/modules/app/agentcore-pi/main.tf +7 -0
- package/dist/terraform/modules/app/appsync-subscriptions/main.tf +127 -21
- package/dist/terraform/modules/app/appsync-subscriptions/outputs.tf +0 -6
- package/dist/terraform/modules/app/appsync-subscriptions/variables.tf +5 -0
- package/dist/terraform/modules/app/capability-broker/main.tf +393 -0
- package/dist/terraform/modules/app/capability-broker/outputs.tf +54 -0
- package/dist/terraform/modules/app/capability-broker/variables.tf +98 -0
- package/dist/terraform/modules/app/deployment-control-plane/runner.py +1011 -31
- package/dist/terraform/modules/app/deployment-control-plane/test_runner_bundle.py +655 -2
- package/dist/terraform/modules/app/lambda-api/agentcore-harness-alarms.tf +88 -0
- package/dist/terraform/modules/app/lambda-api/agentcore-identity-alarms.tf +91 -0
- package/dist/terraform/modules/app/lambda-api/capability-search-alarms.tf +60 -0
- package/dist/terraform/modules/app/lambda-api/handlers.tf +606 -37
- package/dist/terraform/modules/app/lambda-api/iam-grouped.tf +192 -21
- package/dist/terraform/modules/app/lambda-api/main.tf +35 -0
- package/dist/terraform/modules/app/lambda-api/mcp-oauth.tf +181 -4
- package/dist/terraform/modules/app/lambda-api/memory-alarms.tf +92 -0
- package/dist/terraform/modules/app/lambda-api/msteams-app-secrets.tf +46 -0
- package/dist/terraform/modules/app/lambda-api/outputs.tf +35 -0
- package/dist/terraform/modules/app/lambda-api/runtime-config.tf +3 -21
- package/dist/terraform/modules/app/lambda-api/variables.tf +188 -3
- package/dist/terraform/modules/app/workflow-interpreter-stepfunctions/alarms.tf +47 -0
- package/dist/terraform/modules/app/workflow-interpreter-stepfunctions/main.tf +43 -2
- package/dist/terraform/modules/foundation/cognito/main.tf +319 -73
- package/dist/terraform/modules/foundation/cognito/outputs.tf +42 -0
- package/dist/terraform/modules/foundation/cognito/variables.tf +124 -2
- package/dist/terraform/modules/foundation/vpc/outputs.tf +5 -0
- package/dist/terraform/modules/thinkwork/main.tf +396 -26
- package/dist/terraform/modules/thinkwork/outputs.tf +188 -5
- package/dist/terraform/modules/thinkwork/variables.tf +154 -5
- package/dist/terraform/schema.graphql +69 -36
- package/dist/workspace-defaults/files/TOOLS.md +39 -0
- package/dist/workspace-defaults/files/USER.md +1 -0
- package/dist/workspace-defaults/files/agents/analyst/INSTRUCTIONS.md +18 -0
- package/dist/workspace-defaults/files/agents/coding/INSTRUCTIONS.md +11 -0
- package/dist/workspace-defaults/files/agents/research/INSTRUCTIONS.md +12 -0
- package/dist/workspace-defaults/files/agents/reviewer/INSTRUCTIONS.md +15 -0
- package/dist/workspace-defaults/files/skills/document-composer/SKILL.md +6 -2
- package/package.json +6 -3
- package/dist/plugins/workos-auth/package.json +0 -22
- package/dist/plugins/workos-auth/src/index.ts +0 -30
- package/dist/plugins/workos-auth/src/manifest.ts +0 -40
- package/dist/plugins/workos-auth/src/provider-contract.ts +0 -39
- package/dist/plugins/workos-auth/test/manifest.test.ts +0 -94
- package/dist/plugins/workos-auth/tsconfig.json +0 -8
- /package/dist/workspace-defaults/files/{AGENTS.md → INSTRUCTIONS.md} +0 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
################################################################################
|
|
2
|
+
# Microsoft Teams app credentials
|
|
3
|
+
#
|
|
4
|
+
# Stored in Secrets Manager as a JSON blob with two fields:
|
|
5
|
+
#
|
|
6
|
+
# {
|
|
7
|
+
# "app_id": "Teams (Entra) app registration / bot app id",
|
|
8
|
+
# "client_secret": "Entra app client secret"
|
|
9
|
+
# }
|
|
10
|
+
#
|
|
11
|
+
# The Teams install + account-link handlers receive only this secret ARN in
|
|
12
|
+
# Lambda configuration. The client_secret doubles as the HMAC signing key for
|
|
13
|
+
# install state and account-link tokens — transport-only material that must
|
|
14
|
+
# never appear in logs or responses. The shared Lambda role already has
|
|
15
|
+
# access to the `thinkwork/*` prefix, so no additional IAM attachment is
|
|
16
|
+
# needed (same as the Slack app credentials secret).
|
|
17
|
+
#
|
|
18
|
+
# Operators populate the real value out-of-band. Terraform creates an initial
|
|
19
|
+
# empty version so Lambdas fail with a clear missing-field error before setup,
|
|
20
|
+
# and lifecycle.ignore_changes prevents later applies from overwriting rotated
|
|
21
|
+
# credentials.
|
|
22
|
+
################################################################################
|
|
23
|
+
|
|
24
|
+
resource "aws_secretsmanager_secret" "msteams_app_credentials" {
|
|
25
|
+
count = var.enable_msteams_app ? 1 : 0
|
|
26
|
+
name = "thinkwork/${var.stage}/msteams/app"
|
|
27
|
+
description = "Microsoft Teams app credentials (app_id, client_secret). Populate via Secrets Manager; never via tfvars."
|
|
28
|
+
tags = {
|
|
29
|
+
Name = "thinkwork-${var.stage}-msteams-app"
|
|
30
|
+
Stage = var.stage
|
|
31
|
+
Provider = "msteams"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
resource "aws_secretsmanager_secret_version" "msteams_app_credentials_initial" {
|
|
36
|
+
count = var.enable_msteams_app ? 1 : 0
|
|
37
|
+
secret_id = aws_secretsmanager_secret.msteams_app_credentials[0].id
|
|
38
|
+
secret_string = jsonencode({
|
|
39
|
+
app_id = ""
|
|
40
|
+
client_secret = ""
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
lifecycle {
|
|
44
|
+
ignore_changes = [secret_string]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -8,6 +8,41 @@ output "api_endpoint" {
|
|
|
8
8
|
value = local.api_base_url
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
output "agentcore_turn_assertion_issuer" {
|
|
12
|
+
description = "Proof-only CUSTOM_JWT issuer on the regional HTTP API."
|
|
13
|
+
value = var.enable_agentcore_multiplayer_proof ? local.agentcore_turn_assertion_issuer : ""
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
output "agentcore_harness_audience" {
|
|
17
|
+
description = "Purpose-bound audience for proof Harness invocations."
|
|
18
|
+
value = var.enable_agentcore_multiplayer_proof ? local.agentcore_harness_audience : ""
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
output "agentcore_gateway_audience" {
|
|
22
|
+
description = "Purpose-bound audience for proof Gateway operations."
|
|
23
|
+
value = var.enable_agentcore_multiplayer_proof ? local.agentcore_gateway_audience : ""
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
output "agentcore_turn_assertion_active_key_arn" {
|
|
27
|
+
description = "Operator-only active proof signing key ARN used by deployed verification probes."
|
|
28
|
+
value = var.enable_agentcore_multiplayer_proof ? local.agentcore_turn_assertion_active_key.key_id : ""
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
output "agentcore_turn_assertion_active_kid" {
|
|
32
|
+
description = "Public JWKS key identifier for the active proof signing key."
|
|
33
|
+
value = var.enable_agentcore_multiplayer_proof ? local.agentcore_turn_assertion_active_key.kid : ""
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
output "agentcore_proof_oauth_issuer" {
|
|
37
|
+
description = "Synthetic proof OAuth issuer on the regional HTTP API."
|
|
38
|
+
value = var.enable_agentcore_multiplayer_proof ? "${local.mcp_oauth_api_base_url}/agentcore-proof/oauth" : ""
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
output "agentcore_proof_target_base_url" {
|
|
42
|
+
description = "Regional HTTP API base URL hosting the controlled identity target."
|
|
43
|
+
value = var.enable_agentcore_multiplayer_proof ? local.mcp_oauth_api_base_url : ""
|
|
44
|
+
}
|
|
45
|
+
|
|
11
46
|
output "api_execution_arn" {
|
|
12
47
|
description = "API Gateway V2 execution ARN (for Lambda permissions)"
|
|
13
48
|
value = aws_apigatewayv2_api.main.execution_arn
|
|
@@ -51,9 +51,9 @@ locals {
|
|
|
51
51
|
# ----------------------------------------------------------------------------
|
|
52
52
|
# Platform secrets (plan 2026-06-11-006 U5/R4)
|
|
53
53
|
#
|
|
54
|
-
# API_AUTH_SECRET
|
|
55
|
-
#
|
|
56
|
-
#
|
|
54
|
+
# API_AUTH_SECRET leaves plaintext Lambda env: the runtime-config loader
|
|
55
|
+
# prefetches it at cold start (getApiAuthSecret, env-wins during the transition
|
|
56
|
+
# window). Names
|
|
57
57
|
# use the `thinkwork/${stage}/...` prefix so the shared role's existing
|
|
58
58
|
# `secretsmanager:GetSecretValue` grant on `thinkwork/*` covers them.
|
|
59
59
|
# The env copies in common_env are dropped one release AFTER this ships
|
|
@@ -83,24 +83,6 @@ resource "aws_secretsmanager_secret_version" "api_auth" {
|
|
|
83
83
|
# console.
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
resource "aws_secretsmanager_secret" "appsync_api_key" {
|
|
87
|
-
name = "thinkwork/${var.stage}/appsync-api-key"
|
|
88
|
-
description = "AppSync API key for subscription notify fan-out. Prefetched at Lambda cold start by @thinkwork/runtime-config."
|
|
89
|
-
tags = {
|
|
90
|
-
Name = "thinkwork-${var.stage}-appsync-api-key"
|
|
91
|
-
Stage = var.stage
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
resource "aws_secretsmanager_secret_version" "appsync_api_key" {
|
|
96
|
-
secret_id = aws_secretsmanager_secret.appsync_api_key.id
|
|
97
|
-
secret_string = var.appsync_api_key
|
|
98
|
-
|
|
99
|
-
# AppSync keys are terraform-rotated (the appsync module recreates them),
|
|
100
|
-
# so track the var here — unlike api_auth there is no operator rotation
|
|
101
|
-
# path outside terraform.
|
|
102
|
-
}
|
|
103
|
-
|
|
104
86
|
# The standalone compliance Lambdas (anchor, export-runner) bundle the
|
|
105
87
|
# runtime-config loader but run under dedicated roles that lack the shared
|
|
106
88
|
# role's ssm grant. Without these, every cold start auto-prime fails
|
|
@@ -13,6 +13,30 @@ variable "region" {
|
|
|
13
13
|
type = string
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
variable "auth_retirement_phase" {
|
|
17
|
+
description = "Native-auth migration phase. Fresh deployments default to retired; WorkOS callback/bridge routes exist only for explicitly configured upgrade rollback windows."
|
|
18
|
+
type = string
|
|
19
|
+
default = "retired"
|
|
20
|
+
|
|
21
|
+
validation {
|
|
22
|
+
condition = contains(["coexistence", "cutover", "retired"], var.auth_retirement_phase)
|
|
23
|
+
error_message = "auth_retirement_phase must be coexistence, cutover, or retired."
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
variable "auth_migration_recovery_deadline" {
|
|
28
|
+
description = "RFC3339 deadline for completing legacy-session identity migration. Required while auth_retirement_phase is coexistence."
|
|
29
|
+
type = string
|
|
30
|
+
default = ""
|
|
31
|
+
|
|
32
|
+
validation {
|
|
33
|
+
condition = trimspace(var.auth_migration_recovery_deadline) == "" || (
|
|
34
|
+
can(timecmp(var.auth_migration_recovery_deadline, var.auth_migration_recovery_deadline))
|
|
35
|
+
)
|
|
36
|
+
error_message = "auth_migration_recovery_deadline must be empty or an RFC3339 timestamp."
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
16
40
|
variable "lambda_artifact_bucket" {
|
|
17
41
|
description = "S3 bucket containing Lambda deployment artifacts"
|
|
18
42
|
type = string
|
|
@@ -135,10 +159,9 @@ variable "appsync_api_url" {
|
|
|
135
159
|
type = string
|
|
136
160
|
}
|
|
137
161
|
|
|
138
|
-
variable "
|
|
139
|
-
description = "AppSync API
|
|
162
|
+
variable "appsync_api_id" {
|
|
163
|
+
description = "AppSync subscriptions API ID used as the subscription-ticket audience"
|
|
140
164
|
type = string
|
|
141
|
-
sensitive = true
|
|
142
165
|
}
|
|
143
166
|
|
|
144
167
|
variable "kb_service_role_arn" {
|
|
@@ -146,6 +169,70 @@ variable "kb_service_role_arn" {
|
|
|
146
169
|
type = string
|
|
147
170
|
}
|
|
148
171
|
|
|
172
|
+
variable "agentcore_harness_execution_role_arn" {
|
|
173
|
+
description = "Legacy Harness execution-role input retained for module compatibility. Request-path PassRole/control-plane grants were removed by THINK-316 U2."
|
|
174
|
+
type = string
|
|
175
|
+
default = ""
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
variable "enable_agentcore_harness_invocation" {
|
|
179
|
+
description = "Grant only the Harness data-plane invocation actions to the request path. Harness control-plane permissions remain outside Lambda."
|
|
180
|
+
type = bool
|
|
181
|
+
default = false
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
variable "enable_agentcore_multiplayer_proof" {
|
|
185
|
+
description = "Enable the non-production THINK-316 AgentCore Identity/Gateway/Harness proof surfaces. Defaults off and never changes ordinary Pi routing."
|
|
186
|
+
type = bool
|
|
187
|
+
default = false
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
variable "agentcore_turn_assertion_key_versions" {
|
|
191
|
+
description = "One or two published AgentCore assertion KMS key versions. Use two only during the bounded rotation overlap."
|
|
192
|
+
type = list(string)
|
|
193
|
+
default = ["v1"]
|
|
194
|
+
|
|
195
|
+
validation {
|
|
196
|
+
condition = (
|
|
197
|
+
length(var.agentcore_turn_assertion_key_versions) >= 1 &&
|
|
198
|
+
length(var.agentcore_turn_assertion_key_versions) <= 2 &&
|
|
199
|
+
length(distinct(var.agentcore_turn_assertion_key_versions)) == length(var.agentcore_turn_assertion_key_versions) &&
|
|
200
|
+
alltrue([for version in var.agentcore_turn_assertion_key_versions : can(regex("^[a-z0-9][a-z0-9-]{0,15}$", version))])
|
|
201
|
+
)
|
|
202
|
+
error_message = "agentcore_turn_assertion_key_versions must contain one or two unique lowercase version labels."
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
variable "agentcore_turn_assertion_active_key_version" {
|
|
207
|
+
description = "Published AgentCore assertion key version used for new signatures."
|
|
208
|
+
type = string
|
|
209
|
+
default = "v1"
|
|
210
|
+
|
|
211
|
+
validation {
|
|
212
|
+
condition = contains(var.agentcore_turn_assertion_key_versions, var.agentcore_turn_assertion_active_key_version)
|
|
213
|
+
error_message = "agentcore_turn_assertion_active_key_version must be present in agentcore_turn_assertion_key_versions."
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
variable "agentcore_proof_oauth_client_id" {
|
|
218
|
+
description = "Synthetic OAuth client id used only by the THINK-316 proof provider."
|
|
219
|
+
type = string
|
|
220
|
+
default = ""
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
variable "agentcore_proof_oauth_client_secret" {
|
|
224
|
+
description = "Synthetic OAuth client secret used only by the THINK-316 proof provider and boundary target."
|
|
225
|
+
type = string
|
|
226
|
+
sensitive = true
|
|
227
|
+
default = ""
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
variable "agentcore_proof_owner_allowlist" {
|
|
231
|
+
description = "Comma-separated synthetic subjects used by the THINK-316 manual authorization-code and mixed-disclosure fixtures. Signed OBO turn participants do not require registration here."
|
|
232
|
+
type = string
|
|
233
|
+
default = ""
|
|
234
|
+
}
|
|
235
|
+
|
|
149
236
|
variable "certificate_arn" {
|
|
150
237
|
description = "ACM certificate ARN for custom API domain"
|
|
151
238
|
type = string
|
|
@@ -273,6 +360,18 @@ variable "memory_engine" {
|
|
|
273
360
|
}
|
|
274
361
|
}
|
|
275
362
|
|
|
363
|
+
variable "analyst_egress_subnet_ids" {
|
|
364
|
+
description = "Private (NAT-routed) subnet IDs for VPC-attaching the analyst data-path handlers (graphql-http, analyst-query-broker, analyst-connection-reconciler) so external Postgres sources can allowlist the stack's stable NAT egress IP. Leave empty to keep the handlers outside any VPC."
|
|
365
|
+
type = list(string)
|
|
366
|
+
default = []
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
variable "analyst_egress_security_group_ids" {
|
|
370
|
+
description = "Security group IDs for the VPC-attached analyst data-path handlers. Leave empty to keep the handlers outside any VPC."
|
|
371
|
+
type = list(string)
|
|
372
|
+
default = []
|
|
373
|
+
}
|
|
374
|
+
|
|
276
375
|
variable "okf_efs_subnet_ids" {
|
|
277
376
|
description = "Subnet IDs for the OKF EFS hydrator Lambda VPC attachment. Leave empty to deploy the hydrator without an EFS mount."
|
|
278
377
|
type = list(string)
|
|
@@ -435,6 +534,12 @@ variable "enable_slack_workspace_app" {
|
|
|
435
534
|
default = true
|
|
436
535
|
}
|
|
437
536
|
|
|
537
|
+
variable "enable_msteams_app" {
|
|
538
|
+
description = "Provision Microsoft Teams app Lambdas, API routes, and credentials placeholder secret."
|
|
539
|
+
type = bool
|
|
540
|
+
default = false
|
|
541
|
+
}
|
|
542
|
+
|
|
438
543
|
variable "appsync_realtime_url" {
|
|
439
544
|
description = "AppSync realtime/WebSocket endpoint URL"
|
|
440
545
|
type = string
|
|
@@ -513,6 +618,12 @@ variable "knowledge_graph_observations_ingest_enabled" {
|
|
|
513
618
|
default = false
|
|
514
619
|
}
|
|
515
620
|
|
|
621
|
+
variable "ontology_scan_sweep_enabled" {
|
|
622
|
+
description = "Enable the recurring per-tenant ontology suggestion scan sweep (THINK-320 U4/KTD-3). Ships disabled; enabled per stage once the Living Map review surfaces land."
|
|
623
|
+
type = bool
|
|
624
|
+
default = false
|
|
625
|
+
}
|
|
626
|
+
|
|
516
627
|
variable "wiki_source" {
|
|
517
628
|
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'."
|
|
518
629
|
type = string
|
|
@@ -764,6 +875,24 @@ variable "capability_signing_private_key_secret" {
|
|
|
764
875
|
default = ""
|
|
765
876
|
}
|
|
766
877
|
|
|
878
|
+
variable "subscription_ticket_signing_key_id" {
|
|
879
|
+
description = "Active Ed25519 subscription-ticket signing key ID."
|
|
880
|
+
type = string
|
|
881
|
+
default = ""
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
variable "subscription_ticket_public_keys" {
|
|
885
|
+
description = "JSON verifier keyring for AppSync subscription tickets; contains public material only."
|
|
886
|
+
type = string
|
|
887
|
+
default = "[]"
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
variable "subscription_ticket_private_key_secret" {
|
|
891
|
+
description = "Secrets Manager name holding the isolated subscription-ticket Ed25519 private key."
|
|
892
|
+
type = string
|
|
893
|
+
default = ""
|
|
894
|
+
}
|
|
895
|
+
|
|
767
896
|
# ---------------------------------------------------------------------------
|
|
768
897
|
# THINK-228 U3 — analyst query broker runtime config
|
|
769
898
|
# ---------------------------------------------------------------------------
|
|
@@ -790,6 +919,12 @@ variable "analyst_policy_source" {
|
|
|
790
919
|
}
|
|
791
920
|
}
|
|
792
921
|
|
|
922
|
+
variable "capability_self_extension_tenants" {
|
|
923
|
+
description = "Governed autonomy opt-in: comma/space-separated tenant ids allowed to autonomously self-extend capabilities (self_admit_connection / self_approve_routine). Empty (default) = NO tenant enabled; self-extension ships inert and fail-closed. Read via getConfig() in capability-control-service."
|
|
924
|
+
type = string
|
|
925
|
+
default = ""
|
|
926
|
+
}
|
|
927
|
+
|
|
793
928
|
variable "analyst_db_cluster_resource_id" {
|
|
794
929
|
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
930
|
type = string
|
|
@@ -801,3 +936,53 @@ variable "artifact_delivery_from_email" {
|
|
|
801
936
|
type = string
|
|
802
937
|
default = ""
|
|
803
938
|
}
|
|
939
|
+
|
|
940
|
+
variable "enable_capability_broker" {
|
|
941
|
+
description = "THINK-280 U8 rollout gate (default off). When true, the governed capability runtime's external MCP search facade (/mcp/capabilities) and the Inspector governed-runtime operation layer are enabled for the stage. The external-search leg is the LAST rollout stage (shadow → internal search → private broker dogfood → promotion/tracer → external search): keep this false until the earlier stages are proven for the stage. When false every U8 surface is inert and returns no data — the handler and route still deploy, but read nothing."
|
|
942
|
+
type = bool
|
|
943
|
+
default = false
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
# THINK-280 — sandbox provisioning + capability broker wiring. -----------------
|
|
947
|
+
variable "agentcore_admin_lambda_arn" {
|
|
948
|
+
description = "ARN of the agentcore-admin Lambda (AGENTCORE_ADMIN_LAMBDA_ARN on graphql-http). createTenant RequestResponse-invokes it. Empty when the Lambda is not deployed."
|
|
949
|
+
type = string
|
|
950
|
+
default = ""
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
variable "agentcore_admin_token" {
|
|
954
|
+
description = "Bearer token graphql-http presents when invoking agentcore-admin (AGENTCORE_ADMIN_TOKEN). Must match the token the admin Lambda validates. Empty when not deployed."
|
|
955
|
+
type = string
|
|
956
|
+
sensitive = true
|
|
957
|
+
default = ""
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
variable "capability_broker_session_table" {
|
|
961
|
+
description = "DynamoDB broker session table name (CAPABILITY_BROKER_SESSION_TABLE). Empty when the broker is disabled."
|
|
962
|
+
type = string
|
|
963
|
+
default = ""
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
variable "capability_broker_session_table_arn" {
|
|
967
|
+
description = "ARN of the broker session table — grants routine-exec-git DynamoDB access to mint/advance PoP sessions. Empty when the broker is disabled (no grant)."
|
|
968
|
+
type = string
|
|
969
|
+
default = ""
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
variable "capability_broker_audience" {
|
|
973
|
+
description = "Capability broker PoP audience (CAPABILITY_BROKER_AUDIENCE). Empty when the broker is disabled."
|
|
974
|
+
type = string
|
|
975
|
+
default = ""
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
variable "capability_broker_api_id" {
|
|
979
|
+
description = "Capability broker private REST API id (CAPABILITY_BROKER_API_ID). Empty when the broker is disabled."
|
|
980
|
+
type = string
|
|
981
|
+
default = ""
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
variable "capability_broker_vpce_dns" {
|
|
985
|
+
description = "Capability broker execute-api VPCE DNS name (CAPABILITY_BROKER_VPCE_DNS). Empty when the broker is disabled."
|
|
986
|
+
type = string
|
|
987
|
+
default = ""
|
|
988
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# THINK-193 U8 — workflow-interpreter execution failure alarms.
|
|
2
|
+
#
|
|
3
|
+
# Terminal FAILED/TIMED_OUT/ABORTED executions are projected onto the run
|
|
4
|
+
# row by workflow-execution-callback (DB, not a parseable log line), so the
|
|
5
|
+
# reliable infrastructure signal is the Step Functions service metrics on
|
|
6
|
+
# the interpreter state machine itself. Memory workflows (personal +
|
|
7
|
+
# shared) execute through this machine — an execution failure here is the
|
|
8
|
+
# "workflow-interpreter execution failures" rollout gate signal.
|
|
9
|
+
#
|
|
10
|
+
# alarm_actions are empty: no paging SNS topic exists in this module.
|
|
11
|
+
# Operators subscribe one when the rollout needs paging.
|
|
12
|
+
|
|
13
|
+
resource "aws_cloudwatch_metric_alarm" "interpreter_executions_failed" {
|
|
14
|
+
alarm_name = "thinkwork-${var.stage}-workflow-interpreter-executions-failed"
|
|
15
|
+
alarm_description = "Workflow-interpreter Step Functions executions FAILED — check the run's timeline (workflow_step_failed events) and the execution history."
|
|
16
|
+
namespace = "AWS/States"
|
|
17
|
+
metric_name = "ExecutionsFailed"
|
|
18
|
+
statistic = "Sum"
|
|
19
|
+
period = 300
|
|
20
|
+
evaluation_periods = 1
|
|
21
|
+
threshold = 1
|
|
22
|
+
comparison_operator = "GreaterThanOrEqualToThreshold"
|
|
23
|
+
treat_missing_data = "notBreaching"
|
|
24
|
+
alarm_actions = []
|
|
25
|
+
|
|
26
|
+
dimensions = {
|
|
27
|
+
StateMachineArn = aws_sfn_state_machine.interpreter.arn
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
resource "aws_cloudwatch_metric_alarm" "interpreter_executions_timed_out" {
|
|
32
|
+
alarm_name = "thinkwork-${var.stage}-workflow-interpreter-executions-timed-out"
|
|
33
|
+
alarm_description = "Workflow-interpreter Step Functions executions TIMED_OUT — a parked task token (approval / memory stage) was never resolved within the execution timeout."
|
|
34
|
+
namespace = "AWS/States"
|
|
35
|
+
metric_name = "ExecutionsTimedOut"
|
|
36
|
+
statistic = "Sum"
|
|
37
|
+
period = 300
|
|
38
|
+
evaluation_periods = 1
|
|
39
|
+
threshold = 1
|
|
40
|
+
comparison_operator = "GreaterThanOrEqualToThreshold"
|
|
41
|
+
treat_missing_data = "notBreaching"
|
|
42
|
+
alarm_actions = []
|
|
43
|
+
|
|
44
|
+
dimensions = {
|
|
45
|
+
StateMachineArn = aws_sfn_state_machine.interpreter.arn
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -211,8 +211,8 @@ resource "aws_iam_role_policy" "execution_states" {
|
|
|
211
211
|
#
|
|
212
212
|
# See KTD1 for the loop shape. Directives are the FROZEN protocol the
|
|
213
213
|
# step-dispatch Lambda emits: dispatch_agent, wait_until, execute_step,
|
|
214
|
-
# await_approval, continue, rollover, terminal_success,
|
|
215
|
-
# terminal_canceled.
|
|
214
|
+
# await_approval, await_memory_stage, continue, rollover, terminal_success,
|
|
215
|
+
# terminal_failure, terminal_canceled.
|
|
216
216
|
################################################################################
|
|
217
217
|
|
|
218
218
|
resource "aws_sfn_state_machine" "interpreter" {
|
|
@@ -254,6 +254,7 @@ resource "aws_sfn_state_machine" "interpreter" {
|
|
|
254
254
|
{ Variable = "$.directive", StringEquals = "wait_until", Next = "WaitState" },
|
|
255
255
|
{ Variable = "$.directive", StringEquals = "execute_step", Next = "ExecuteStep" },
|
|
256
256
|
{ Variable = "$.directive", StringEquals = "await_approval", Next = "ApprovalStep" },
|
|
257
|
+
{ Variable = "$.directive", StringEquals = "await_memory_stage", Next = "MemoryStageStep" },
|
|
257
258
|
{ Variable = "$.directive", StringEquals = "continue", Next = "LoadNextStep" },
|
|
258
259
|
{ Variable = "$.directive", StringEquals = "rollover", Next = "RolloverStart" },
|
|
259
260
|
{ Variable = "$.directive", StringEquals = "terminal_success", Next = "SucceedState" },
|
|
@@ -369,6 +370,46 @@ resource "aws_sfn_state_machine" "interpreter" {
|
|
|
369
370
|
Next = "DirectiveChoice"
|
|
370
371
|
}
|
|
371
372
|
|
|
373
|
+
# ---- Memory-stage step: park on a task token while the async memory-
|
|
374
|
+
# stage worker runs one pipeline stage; the await phase Event-invokes the
|
|
375
|
+
# worker, which resumes the token via SendTaskSuccess with a result JSON.
|
|
376
|
+
MemoryStageStep = {
|
|
377
|
+
Type = "Task"
|
|
378
|
+
Resource = "arn:aws:states:::lambda:invoke.waitForTaskToken"
|
|
379
|
+
Parameters = {
|
|
380
|
+
FunctionName = local.step_dispatch_lambda_arn
|
|
381
|
+
Payload = {
|
|
382
|
+
phase = "await_memory_stage"
|
|
383
|
+
"cursor.$" = "$.cursor"
|
|
384
|
+
"taskToken.$" = "$$.Task.Token"
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
ResultPath = "$.result"
|
|
388
|
+
TimeoutSeconds = 7200
|
|
389
|
+
HeartbeatSeconds = 3600
|
|
390
|
+
Catch = [{
|
|
391
|
+
ErrorEquals = ["States.Timeout"]
|
|
392
|
+
Next = "FailState"
|
|
393
|
+
}]
|
|
394
|
+
Next = "RecordMemoryStage"
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
RecordMemoryStage = {
|
|
398
|
+
Type = "Task"
|
|
399
|
+
Resource = "arn:aws:states:::lambda:invoke"
|
|
400
|
+
Parameters = {
|
|
401
|
+
FunctionName = local.step_dispatch_lambda_arn
|
|
402
|
+
Payload = {
|
|
403
|
+
phase = "record_memory_stage"
|
|
404
|
+
"cursor.$" = "$.cursor"
|
|
405
|
+
"result.$" = "$.result"
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
OutputPath = "$.Payload"
|
|
409
|
+
Retry = local.lambda_invoke_retry
|
|
410
|
+
Next = "DirectiveChoice"
|
|
411
|
+
}
|
|
412
|
+
|
|
372
413
|
# ---- Record the step outcome, evaluate policy, emit the next directive -
|
|
373
414
|
RecordAdvance = {
|
|
374
415
|
Type = "Task"
|