thinkwork-cli 0.13.1 → 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.
Files changed (130) hide show
  1. package/dist/{api-client-4DZ266J5.js → api-client-JYZXYQJR.js} +3 -1
  2. package/dist/bowser-6Z6JFAIR.js +2822 -0
  3. package/dist/chunk-DV3MRBR5.js +43 -0
  4. package/dist/chunk-DVPBI5HM.js +1728 -0
  5. package/dist/chunk-EI5ZX7CN.js +522 -0
  6. package/dist/chunk-EUJ7X6YD.js +126 -0
  7. package/dist/chunk-GG5WKBOX.js +436 -0
  8. package/dist/chunk-I64EZSU5.js +358 -0
  9. package/dist/chunk-ILZKG5WV.js +6151 -0
  10. package/dist/chunk-KMIJ5KGT.js +128 -0
  11. package/dist/chunk-OCPHU34C.js +996 -0
  12. package/dist/chunk-QOERT44A.js +3286 -0
  13. package/dist/chunk-XYM7PE2A.js +2264 -0
  14. package/dist/{chunk-Y2WHJECR.js → chunk-Z2F6RJFR.js} +1 -39
  15. package/dist/cli.js +43080 -13150
  16. package/dist/dist-es-CRV46D5B.js +315 -0
  17. package/dist/dist-es-DCY4IC3Y.js +2000 -0
  18. package/dist/dist-es-ENBUC3JP.js +14726 -0
  19. package/dist/dist-es-G54LBMRN.js +48 -0
  20. package/dist/dist-es-G7PTG75M.js +176 -0
  21. package/dist/dist-es-GKDBE7E6.js +88 -0
  22. package/dist/dist-es-HY3535OI.js +70 -0
  23. package/dist/dist-es-KL7Y5NB2.js +377 -0
  24. package/dist/dist-es-LDE437AM.js +170 -0
  25. package/dist/dist-es-P26FWFLT.js +485 -0
  26. package/dist/dist-es-Q57SZXZ7.js +70 -0
  27. package/dist/dist-es-R7FGL2IB.js +88 -0
  28. package/dist/dist-es-USORBXZ5.js +318 -0
  29. package/dist/dist-es-ZKC2QKD2.js +377 -0
  30. package/dist/drizzle/0076_scheduled_jobs_marco_backfill.sql +2 -1
  31. package/dist/drizzle/0079_seed_tenant_customize_catalog.sql +1 -0
  32. package/dist/drizzle/0090_brain_schema_extraction.sql +10 -0
  33. package/dist/drizzle/0132_drop_computer_tables.sql +3 -0
  34. package/dist/drizzle/0160_compliance_event_types_plugins.sql +2 -0
  35. package/dist/drizzle/0214_think137_drop_judge_evidence_roi.sql +1 -0
  36. package/dist/drizzle/0216_drop_agent_loop_versions_goal_worker_policy.sql +1 -0
  37. package/dist/drizzle/0227_analyst_reader_role.sql +6 -0
  38. package/dist/drizzle/0230_analyst_rls.sql +9 -0
  39. package/dist/drizzle/0250_kg_schema_extraction.sql +27 -0
  40. package/dist/drizzle/0251_brain_stragglers.sql +21 -0
  41. package/dist/drizzle/0253_drop_brain_substrate.sql +2 -0
  42. package/dist/drizzle/0257_agents_runtime_allow_harness.sql +24 -0
  43. package/dist/drizzle/0261_managed_harness_multiplayer.sql +313 -0
  44. package/dist/drizzle/0261_native_auth_control_plane.sql +328 -0
  45. package/dist/drizzle/0262_auth_subscription_tickets.sql +59 -0
  46. package/dist/drizzle/0262_parallel_harness_threads.sql +9 -0
  47. package/dist/drizzle/0263_agentcore_runtime_identifier.sql +69 -0
  48. package/dist/drizzle/0263_drop_workos_auth_runtime.sql +236 -0
  49. package/dist/drizzle/0264_auth_enrollment_attempt_limits.sql +15 -0
  50. package/dist/drizzle/0264_harness_tool_execution_ledger.sql +113 -0
  51. package/dist/drizzle/0265_eval_runs_requester_identity.sql +28 -0
  52. package/dist/drizzle/0265_require_fully_valid_auth_publication.sql +27 -0
  53. package/dist/drizzle/0266_auth_identity_recovery_grants.sql +9 -0
  54. package/dist/drizzle/0266_eval_profiles_runtime_type.sql +12 -0
  55. package/dist/drizzle/0267_ontology_candidate_rejections.sql +53 -0
  56. package/dist/drizzle/0268_identity_crosswalk_routing.sql +182 -0
  57. package/dist/drizzle/0269_ontology_system_map.sql +31 -0
  58. package/dist/event-streams-7JNLJEEL.js +894 -0
  59. package/dist/event-streams-KDF5RWR6.js +1515 -0
  60. package/dist/loadSso-DJVB7BXE.js +576 -0
  61. package/dist/loadSso-JAMNA3WY.js +583 -0
  62. package/dist/plugins/catalog/package.json +1 -2
  63. package/dist/plugins/catalog/src/__tests__/build-catalog.test.ts +0 -1
  64. package/dist/plugins/catalog/src/__tests__/contracts.test.ts +0 -69
  65. package/dist/plugins/catalog/src/__tests__/plugin-package.test.ts +0 -2
  66. package/dist/plugins/catalog/src/__tests__/plugin-registry.test.ts +0 -5
  67. package/dist/plugins/catalog/src/contracts.ts +2 -179
  68. package/dist/plugins/catalog/src/registry/generated-first-party.ts +0 -6
  69. package/dist/signin-UGDWTGS4.js +821 -0
  70. package/dist/sso-oidc-Q4VXANXY.js +837 -0
  71. package/dist/sts-CWLSE3GH.js +1241 -0
  72. package/dist/sts-DNZLNVOV.js +1245 -0
  73. package/dist/terraform/examples/greenfield/main.tf +223 -66
  74. package/dist/terraform/examples/greenfield/terraform.tfvars.example +15 -1
  75. package/dist/terraform/modules/app/agentcore-gateway/main.tf +305 -0
  76. package/dist/terraform/modules/app/agentcore-gateway/outputs.tf +44 -0
  77. package/dist/terraform/modules/app/agentcore-gateway/scripts/delete_gateway.sh +93 -0
  78. package/dist/terraform/modules/app/agentcore-gateway/scripts/read_gateway.sh +33 -0
  79. package/dist/terraform/modules/app/agentcore-gateway/scripts/reconcile_gateway.sh +543 -0
  80. package/dist/terraform/modules/app/agentcore-gateway/variables.tf +70 -0
  81. package/dist/terraform/modules/app/agentcore-harness/main.tf +237 -8
  82. package/dist/terraform/modules/app/agentcore-harness/outputs.tf +63 -0
  83. package/dist/terraform/modules/app/agentcore-harness/scripts/delete_harness.sh +5 -0
  84. package/dist/terraform/modules/app/agentcore-harness/scripts/harness-lifecycle.mjs +430 -0
  85. package/dist/terraform/modules/app/agentcore-harness/scripts/harness-readback.mjs +180 -0
  86. package/dist/terraform/modules/app/agentcore-harness/scripts/harness-tool-contract.mjs +193 -0
  87. package/dist/terraform/modules/app/agentcore-harness/scripts/prune_harness.sh +5 -0
  88. package/dist/terraform/modules/app/agentcore-harness/scripts/read_harness.sh +5 -0
  89. package/dist/terraform/modules/app/agentcore-harness/scripts/reconcile_harness.sh +5 -0
  90. package/dist/terraform/modules/app/agentcore-harness/variables.tf +72 -1
  91. package/dist/terraform/modules/app/agentcore-identity/main.tf +173 -0
  92. package/dist/terraform/modules/app/agentcore-identity/outputs.tf +51 -0
  93. package/dist/terraform/modules/app/agentcore-identity/scripts/bootstrap_twenty_oauth_client.sh +122 -0
  94. package/dist/terraform/modules/app/agentcore-identity/scripts/delete_identity.sh +25 -0
  95. package/dist/terraform/modules/app/agentcore-identity/scripts/delete_twenty_identity.sh +16 -0
  96. package/dist/terraform/modules/app/agentcore-identity/scripts/read_identity.sh +40 -0
  97. package/dist/terraform/modules/app/agentcore-identity/scripts/reconcile_identity.sh +73 -0
  98. package/dist/terraform/modules/app/agentcore-identity/scripts/reconcile_twenty_identity.sh +74 -0
  99. package/dist/terraform/modules/app/agentcore-identity/scripts/reconcile_twenty_provider.mjs +61 -0
  100. package/dist/terraform/modules/app/agentcore-identity/variables.tf +54 -0
  101. package/dist/terraform/modules/app/appsync-subscriptions/main.tf +127 -21
  102. package/dist/terraform/modules/app/appsync-subscriptions/outputs.tf +0 -6
  103. package/dist/terraform/modules/app/appsync-subscriptions/variables.tf +5 -0
  104. package/dist/terraform/modules/app/deployment-control-plane/runner.py +966 -27
  105. package/dist/terraform/modules/app/deployment-control-plane/test_runner_bundle.py +581 -22
  106. package/dist/terraform/modules/app/lambda-api/agentcore-harness-alarms.tf +88 -0
  107. package/dist/terraform/modules/app/lambda-api/agentcore-identity-alarms.tf +91 -0
  108. package/dist/terraform/modules/app/lambda-api/handlers.tf +298 -74
  109. package/dist/terraform/modules/app/lambda-api/iam-grouped.tf +99 -54
  110. package/dist/terraform/modules/app/lambda-api/main.tf +24 -0
  111. package/dist/terraform/modules/app/lambda-api/mcp-oauth.tf +181 -4
  112. package/dist/terraform/modules/app/lambda-api/outputs.tf +35 -0
  113. package/dist/terraform/modules/app/lambda-api/runtime-config.tf +3 -21
  114. package/dist/terraform/modules/app/lambda-api/variables.tf +109 -16
  115. package/dist/terraform/modules/foundation/cognito/main.tf +294 -72
  116. package/dist/terraform/modules/foundation/cognito/outputs.tf +42 -0
  117. package/dist/terraform/modules/foundation/cognito/variables.tf +114 -4
  118. package/dist/terraform/modules/thinkwork/main.tf +269 -46
  119. package/dist/terraform/modules/thinkwork/outputs.tf +136 -8
  120. package/dist/terraform/modules/thinkwork/variables.tf +124 -17
  121. package/dist/terraform/schema.graphql +69 -36
  122. package/dist/workspace-defaults/files/USER.md +1 -0
  123. package/package.json +3 -2
  124. package/dist/drizzle/0261_thread_turns_origin_turn_index.sql +0 -11
  125. package/dist/plugins/workos-auth/package.json +0 -22
  126. package/dist/plugins/workos-auth/src/index.ts +0 -30
  127. package/dist/plugins/workos-auth/src/manifest.ts +0 -40
  128. package/dist/plugins/workos-auth/src/provider-contract.ts +0 -39
  129. package/dist/plugins/workos-auth/test/manifest.test.ts +0 -94
  130. package/dist/plugins/workos-auth/tsconfig.json +0 -8
@@ -28,6 +28,30 @@ output "identity_provider_names" {
28
28
  value = module.cognito.identity_provider_names
29
29
  }
30
30
 
31
+ output "auth_route_clients" {
32
+ description = "Safe Cognito app-client manifest for local, Google, Microsoft, and tenant Entra routes."
33
+ value = module.cognito.auth_route_clients
34
+ }
35
+
36
+ output "auth_retirement_phase" {
37
+ description = "Applied authentication retirement phase used for safe controller upgrades."
38
+ value = module.cognito.auth_retirement_phase
39
+ }
40
+
41
+ output "web_local_client_id" {
42
+ description = "Local-password-only Cognito app client for web login."
43
+ value = module.cognito.web_local_client_id
44
+ }
45
+
46
+ output "mobile_local_client_id" {
47
+ description = "Local-password-only Cognito app client for mobile login."
48
+ value = module.cognito.mobile_local_client_id
49
+ }
50
+
51
+ output "microsoft_identity_provider_name" {
52
+ value = module.cognito.microsoft_identity_provider_name
53
+ }
54
+
31
55
  output "kms_key_arn" {
32
56
  value = module.kms.key_arn
33
57
  }
@@ -107,11 +131,6 @@ output "appsync_realtime_url" {
107
131
  value = module.appsync.graphql_realtime_url
108
132
  }
109
133
 
110
- output "appsync_api_key" {
111
- value = module.appsync.graphql_api_key
112
- sensitive = true
113
- }
114
-
115
134
  output "auth_domain" {
116
135
  description = "Cognito hosted UI domain"
117
136
  value = module.cognito.auth_domain
@@ -652,10 +671,119 @@ output "analyst_egress_ip" {
652
671
  value = var.analyst_lambda_vpc_egress ? module.vpc.nat_gateway_public_ip : null
653
672
  }
654
673
 
655
- # THINK-311 U4 AgentCore Harness trial. U5's harness-runner wires this into
656
- # its handler environment; graphql-http deliberately gets NO new env var (the
657
- # grouped-env 4KB ceiling, see project_graphql_http_env_4kb_ceiling).
674
+ # AgentCore Harness managed runtime outputs. Rollout-era `*_proof_*` aliases
675
+ # remain below so existing automation can migrate without replacing resources.
658
676
  output "agentcore_harness_execution_role_arn" {
659
677
  description = "Execution role ARN Harness microVMs assume (CreateHarness executionRoleArn). Empty when enable_agentcore_harness is false."
660
678
  value = module.agentcore_harness.execution_role_arn
661
679
  }
680
+
681
+ output "agentcore_harness_arn" {
682
+ description = "Managed tenant/profile AgentCore Harness ARN. Empty when the managed runtime is disabled."
683
+ value = module.agentcore_harness.managed_harness_arn
684
+ }
685
+
686
+ output "agentcore_harness_endpoint_arn" {
687
+ description = "Named version-pinned managed AgentCore Harness endpoint ARN."
688
+ value = module.agentcore_harness.managed_endpoint_arn
689
+ }
690
+
691
+ output "agentcore_harness_endpoint_name" {
692
+ description = "Named managed AgentCore Harness endpoint qualifier."
693
+ value = module.agentcore_harness.managed_endpoint_name
694
+ }
695
+
696
+ output "agentcore_harness_version" {
697
+ description = "Attested immutable AgentCore Harness version served by the managed endpoint."
698
+ value = module.agentcore_harness.managed_target_version
699
+ }
700
+
701
+ output "agentcore_harness_status" {
702
+ description = "Safe server readiness state for the managed AgentCore Harness runtime."
703
+ value = module.agentcore_harness.managed_status
704
+ }
705
+
706
+ output "agentcore_harness_configuration_fingerprint" {
707
+ description = "Non-secret fingerprint of the managed AgentCore Harness configuration ceiling."
708
+ value = module.agentcore_harness.managed_configuration_fingerprint
709
+ }
710
+
711
+ output "agentcore_harness_proof_arn" {
712
+ description = "Deprecated: use agentcore_harness_arn."
713
+ value = module.agentcore_harness.managed_harness_arn
714
+ }
715
+
716
+ output "agentcore_harness_proof_endpoint_arn" {
717
+ description = "Deprecated: use agentcore_harness_endpoint_arn."
718
+ value = module.agentcore_harness.managed_endpoint_arn
719
+ }
720
+
721
+ output "agentcore_harness_proof_endpoint_name" {
722
+ description = "Deprecated: use agentcore_harness_endpoint_name."
723
+ value = module.agentcore_harness.managed_endpoint_name
724
+ }
725
+
726
+ output "agentcore_harness_proof_version" {
727
+ description = "Deprecated: use agentcore_harness_version."
728
+ value = module.agentcore_harness.managed_target_version
729
+ }
730
+
731
+ output "agentcore_harness_proof_status" {
732
+ description = "Deprecated: use agentcore_harness_status."
733
+ value = module.agentcore_harness.managed_status
734
+ }
735
+
736
+ output "agentcore_harness_proof_configuration_fingerprint" {
737
+ description = "Deprecated: use agentcore_harness_configuration_fingerprint."
738
+ value = module.agentcore_harness.managed_configuration_fingerprint
739
+ }
740
+
741
+ output "agentcore_turn_assertion_issuer" {
742
+ description = "Proof CUSTOM_JWT issuer used by deployed operator probes."
743
+ value = module.api.agentcore_turn_assertion_issuer
744
+ }
745
+
746
+ output "agentcore_harness_audience" {
747
+ description = "Purpose-bound proof Harness audience."
748
+ value = module.api.agentcore_harness_audience
749
+ }
750
+
751
+ output "agentcore_turn_assertion_active_key_arn" {
752
+ description = "Operator-only active proof signing key ARN."
753
+ value = module.api.agentcore_turn_assertion_active_key_arn
754
+ }
755
+
756
+ output "agentcore_turn_assertion_active_kid" {
757
+ description = "Public JWKS key identifier for the active proof signing key."
758
+ value = module.api.agentcore_turn_assertion_active_kid
759
+ }
760
+
761
+ output "agentcore_harness_proof_profile_parameter_name" {
762
+ description = "Deprecated rollout-compatible SSM Harness profile address."
763
+ value = var.enable_agentcore_multiplayer_proof ? aws_ssm_parameter.agentcore_harness_proof_profile[0].name : ""
764
+ }
765
+
766
+ output "agentcore_harness_profile_parameter_name" {
767
+ description = "Server-only per-tenant SSM profile consumed by the managed Harness runtime."
768
+ value = var.enable_agentcore_multiplayer_proof ? aws_ssm_parameter.agentcore_harness_profile[0].name : ""
769
+ }
770
+
771
+ output "agentcore_multiplayer_proof_gateway_arn" {
772
+ description = "Proof-only AgentCore Gateway ARN. Empty unless enable_agentcore_multiplayer_proof is true."
773
+ value = module.agentcore_proof_gateway.gateway_arn
774
+ }
775
+
776
+ output "agentcore_multiplayer_proof_gateway_url" {
777
+ description = "Proof-only AgentCore Gateway MCP endpoint."
778
+ value = module.agentcore_proof_gateway.gateway_url
779
+ }
780
+
781
+ output "agentcore_multiplayer_proof_workload_identity_arn" {
782
+ description = "Manual proof workload identity ARN used only for U1 Identity verification."
783
+ value = module.agentcore_proof_identity.workload_identity_arn
784
+ }
785
+
786
+ output "agentcore_multiplayer_proof_credential_provider_arn" {
787
+ description = "Synthetic proof OAuth credential provider ARN."
788
+ value = module.agentcore_proof_identity.credential_provider_arn
789
+ }
@@ -51,22 +51,38 @@ variable "google_oauth_client_secret" {
51
51
  }
52
52
 
53
53
  variable "microsoft_oauth_client_id" {
54
- description = "Microsoft OAuth client ID reserved for future Cognito/OAuth wiring. Accepted here so deployment-control-plane generated wrappers stay forward-compatible."
54
+ description = "Microsoft Entra application client ID for the deployment's default tenant-specific Cognito OIDC route."
55
55
  type = string
56
56
  default = ""
57
57
  }
58
58
 
59
59
  variable "microsoft_oauth_client_secret" {
60
- description = "Microsoft OAuth client secret reserved for future Cognito/OAuth wiring."
60
+ description = "Microsoft Entra application client secret for the deployment's default tenant-specific Cognito OIDC route."
61
61
  type = string
62
62
  sensitive = true
63
63
  default = ""
64
64
  }
65
65
 
66
66
  variable "microsoft_oauth_tenant" {
67
- description = "Microsoft OAuth tenant reserved for future Cognito/OAuth wiring."
67
+ description = "Microsoft Entra directory GUID for the deployment's default Microsoft login route. Cognito requires the exact tenant issuer; organizations/common authorities are not valid token issuers."
68
68
  type = string
69
- default = "organizations"
69
+ default = ""
70
+
71
+ validation {
72
+ condition = var.microsoft_oauth_tenant == "" || can(regex("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", var.microsoft_oauth_tenant))
73
+ error_message = "microsoft_oauth_tenant must be an Entra directory GUID."
74
+ }
75
+ }
76
+
77
+ variable "tenant_entra_connections" {
78
+ description = "Safe tenant-specific Entra provider metadata. Secrets are reconciled outside Terraform and are never accepted here."
79
+ type = list(object({
80
+ connection_key = string
81
+ tenant_id = string
82
+ provider_name = string
83
+ display_name = string
84
+ }))
85
+ default = []
70
86
  }
71
87
 
72
88
  variable "oidc_identity_providers" {
@@ -321,6 +337,21 @@ variable "existing_identity_pool_id" {
321
337
  default = null
322
338
  }
323
339
 
340
+ variable "existing_auth_route_clients" {
341
+ description = "Safe route-client manifest for BYO Cognito pools."
342
+ type = map(object({
343
+ client_id = string
344
+ route_key = string
345
+ client_family = string
346
+ provider_names = list(string)
347
+ explicit_auth_flows = list(string)
348
+ callback_urls = list(string)
349
+ logout_urls = list(string)
350
+ lifecycle_state = string
351
+ }))
352
+ default = {}
353
+ }
354
+
324
355
  variable "create_database" {
325
356
  description = "Create a new Aurora cluster (false = BYO)"
326
357
  type = bool
@@ -365,6 +396,36 @@ variable "enable_agentcore_harness" {
365
396
  default = true
366
397
  }
367
398
 
399
+ variable "enable_agentcore_multiplayer_proof" {
400
+ description = "Provision the non-production THINK-316 Identity/Gateway proof substrate. Defaults off; requires the Harness IAM surface and never changes the tenant runtime selector by itself."
401
+ type = bool
402
+ default = false
403
+ }
404
+
405
+ variable "agentcore_multiplayer_proof_tenant_slug" {
406
+ description = "Explicit non-production pilot tenant slug for the one-Harness multiplayer proof. Required when the proof is enabled."
407
+ type = string
408
+ default = ""
409
+ }
410
+
411
+ variable "agentcore_multiplayer_proof_owner_allowlist" {
412
+ description = "Comma-separated non-production subjects for the manual authorization-code and mixed-disclosure fixtures. Signed OBO turn participants are admitted from canonical tenant membership, not this list."
413
+ type = string
414
+ default = ""
415
+ }
416
+
417
+ variable "agentcore_turn_assertion_key_versions" {
418
+ description = "One or two published assertion key versions for the managed Harness proof."
419
+ type = list(string)
420
+ default = ["v1"]
421
+ }
422
+
423
+ variable "agentcore_turn_assertion_active_key_version" {
424
+ description = "Assertion key version used for new Harness and Gateway tokens."
425
+ type = string
426
+ default = "v1"
427
+ }
428
+
368
429
  variable "enable_capability_broker" {
369
430
  description = "Enable the THINK-280 governed capability broker (private REST API + dedicated execute-api VPCE with private DNS disabled, DynamoDB session store, broker Lambda). Ship-inert: defaults OFF; U4 flips it on after the live negative-egress proof. The broker Lambda code also fails closed independent of this flag."
370
431
  type = bool
@@ -865,18 +926,6 @@ variable "brain_dream_state_schedule_expression" {
865
926
  default = "cron(0 5 * * ? *)"
866
927
  }
867
928
 
868
- variable "retry_dispatcher_enabled" {
869
- description = "Enable the recurring retry-dispatcher schedule (THINK-307). Never enable on a stage before THINK-305, THINK-308, and THINK-309 are live there (parent plan deploy ordering); manual invokes work regardless."
870
- type = bool
871
- default = false
872
- }
873
-
874
- variable "stall_threshold_minutes" {
875
- description = "Minutes of turn inactivity before the stall monitor marks a running turn timed_out; the retry dispatcher reads the same knob as its origin-freshness guard (THINK-306/THINK-307 — one knob, two consumers)."
876
- type = number
877
- default = 5
878
- }
879
-
880
929
  # ---------------------------------------------------------------------------
881
930
  # Naming / Buckets
882
931
  # ---------------------------------------------------------------------------
@@ -986,8 +1035,12 @@ variable "admin_callback_urls" {
986
1035
  default = [
987
1036
  "http://localhost:5174",
988
1037
  "http://localhost:5174/auth/callback",
1038
+ "http://127.0.0.1:5174",
1039
+ "http://127.0.0.1:5174/auth/callback",
989
1040
  "http://localhost:5175",
990
1041
  "http://localhost:5175/auth/callback",
1042
+ "http://127.0.0.1:5175",
1043
+ "http://127.0.0.1:5175/auth/callback",
991
1044
  "http://127.0.0.1:42010/callback",
992
1045
  "http://localhost:42010/callback",
993
1046
  ]
@@ -997,7 +1050,9 @@ variable "admin_logout_urls" {
997
1050
  type = list(string)
998
1051
  default = [
999
1052
  "http://localhost:5174",
1053
+ "http://127.0.0.1:5174",
1000
1054
  "http://localhost:5175",
1055
+ "http://127.0.0.1:5175",
1001
1056
  ]
1002
1057
  }
1003
1058
 
@@ -1010,6 +1065,22 @@ variable "desktop_callback_urls" {
1010
1065
  ]
1011
1066
  }
1012
1067
 
1068
+ variable "cli_callback_urls" {
1069
+ type = list(string)
1070
+ default = [
1071
+ "http://127.0.0.1:42010/callback",
1072
+ "http://localhost:42010/callback",
1073
+ ]
1074
+ }
1075
+
1076
+ variable "cli_logout_urls" {
1077
+ type = list(string)
1078
+ default = [
1079
+ "http://127.0.0.1:42010/callback",
1080
+ "http://localhost:42010/callback",
1081
+ ]
1082
+ }
1083
+
1013
1084
  variable "mobile_callback_urls" {
1014
1085
  type = list(string)
1015
1086
  default = ["exp://localhost:8081", "thinkwork://", "thinkwork://auth/callback"]
@@ -1030,12 +1101,42 @@ variable "pre_signup_lambda_zip" {
1030
1101
  default = ""
1031
1102
  }
1032
1103
 
1104
+ variable "auth_retirement_phase" {
1105
+ description = "Native-auth migration phase. Fresh deployments default to retired (no WorkOS runtime); existing deployments must explicitly select coexistence/cutover until their evidence-gated retirement is complete."
1106
+ type = string
1107
+ default = "retired"
1108
+
1109
+ validation {
1110
+ condition = contains(["coexistence", "cutover", "retired"], var.auth_retirement_phase)
1111
+ error_message = "auth_retirement_phase must be coexistence, cutover, or retired."
1112
+ }
1113
+ }
1114
+
1115
+ variable "auth_migration_recovery_deadline" {
1116
+ description = "RFC3339 deadline for legacy-session identity migration. Must be supplied explicitly for coexistence deployments."
1117
+ type = string
1118
+ default = ""
1119
+
1120
+ validation {
1121
+ condition = trimspace(var.auth_migration_recovery_deadline) == "" || (
1122
+ can(timecmp(var.auth_migration_recovery_deadline, var.auth_migration_recovery_deadline))
1123
+ )
1124
+ error_message = "auth_migration_recovery_deadline must be empty or an RFC3339 timestamp."
1125
+ }
1126
+ }
1127
+
1033
1128
  variable "cognito_custom_auth_lambda_zip" {
1034
- description = "Path to the Cognito custom-auth challenge Lambda zip"
1129
+ description = "Local WorkOS bridge custom-auth artifact retained only as a rollback runtime before auth retirement."
1035
1130
  type = string
1036
1131
  default = ""
1037
1132
  }
1038
1133
 
1134
+ variable "cognito_denied_app_client_ids" {
1135
+ description = "Cognito app clients denied new and refresh token issuance during native-auth cutover"
1136
+ type = list(string)
1137
+ default = []
1138
+ }
1139
+
1039
1140
  # ---------------------------------------------------------------------------
1040
1141
  # Docs site (custom domain — optional)
1041
1142
  # ---------------------------------------------------------------------------
@@ -1283,6 +1384,12 @@ variable "knowledge_graph_observations_ingest_enabled" {
1283
1384
  default = false
1284
1385
  }
1285
1386
 
1387
+ variable "ontology_scan_sweep_enabled" {
1388
+ description = "Enable the recurring per-tenant ontology suggestion scan sweep (THINK-320 U4/KTD-3). Ships disabled."
1389
+ type = bool
1390
+ default = false
1391
+ }
1392
+
1286
1393
  variable "wiki_source" {
1287
1394
  description = "Wiki compile pipeline source: 'planner' or 'graph' (THINK-133 U8/KTD-4)."
1288
1395
  type = string
@@ -25,7 +25,7 @@ type Query {
25
25
  # Event payload types
26
26
  # ────────────────────────────────────────────────────────────────────
27
27
 
28
- type AgentStatusEvent {
28
+ type AgentStatusEvent @aws_iam @aws_lambda {
29
29
  agentId: ID!
30
30
  tenantId: ID!
31
31
  status: String!
@@ -33,7 +33,7 @@ type AgentStatusEvent {
33
33
  updatedAt: AWSDateTime!
34
34
  }
35
35
 
36
- type NewMessageEvent {
36
+ type NewMessageEvent @aws_iam @aws_lambda {
37
37
  messageId: ID!
38
38
  threadId: ID!
39
39
  tenantId: ID!
@@ -46,7 +46,7 @@ type NewMessageEvent {
46
46
  createdAt: AWSDateTime!
47
47
  }
48
48
 
49
- type HeartbeatActivityEvent {
49
+ type HeartbeatActivityEvent @aws_iam @aws_lambda {
50
50
  heartbeatId: ID!
51
51
  tenantId: ID!
52
52
  status: String!
@@ -54,7 +54,7 @@ type HeartbeatActivityEvent {
54
54
  createdAt: AWSDateTime!
55
55
  }
56
56
 
57
- type ThreadUpdateEvent {
57
+ type ThreadUpdateEvent @aws_iam @aws_lambda {
58
58
  threadId: ID!
59
59
  tenantId: ID!
60
60
  status: String!
@@ -62,7 +62,7 @@ type ThreadUpdateEvent {
62
62
  updatedAt: AWSDateTime!
63
63
  }
64
64
 
65
- type ThreadActivityEvent {
65
+ type ThreadActivityEvent @aws_iam @aws_lambda {
66
66
  userId: ID!
67
67
  tenantId: ID!
68
68
  threadId: ID!
@@ -76,7 +76,7 @@ type ThreadActivityEvent {
76
76
  shouldNotify: Boolean
77
77
  }
78
78
 
79
- type InboxItemStatusEvent {
79
+ type InboxItemStatusEvent @aws_iam @aws_lambda {
80
80
  inboxItemId: ID!
81
81
  tenantId: ID!
82
82
  status: String!
@@ -84,7 +84,7 @@ type InboxItemStatusEvent {
84
84
  updatedAt: AWSDateTime!
85
85
  }
86
86
 
87
- type ThreadTurnUpdateEvent {
87
+ type ThreadTurnUpdateEvent @aws_iam @aws_lambda {
88
88
  runId: ID!
89
89
  triggerId: ID
90
90
  tenantId: ID!
@@ -99,7 +99,7 @@ type ThreadTurnUpdateEvent {
99
99
  # render live (tool/skill/phase steps in Phase 1, coalesced text deltas in
100
100
  # Phase 2) without a refetch. seq gives total order; payload carries the
101
101
  # step detail (AWSJSON). Subscribe by threadId.
102
- type ThreadTurnStepEvent {
102
+ type ThreadTurnStepEvent @aws_iam @aws_lambda {
103
103
  runId: ID!
104
104
  threadId: ID!
105
105
  tenantId: ID!
@@ -113,7 +113,7 @@ type ThreadTurnStepEvent {
113
113
  createdAt: AWSDateTime!
114
114
  }
115
115
 
116
- type OrgUpdateEvent {
116
+ type OrgUpdateEvent @aws_iam @aws_lambda {
117
117
  tenantId: ID!
118
118
  changeType: String!
119
119
  entityType: String
@@ -121,7 +121,7 @@ type OrgUpdateEvent {
121
121
  updatedAt: AWSDateTime!
122
122
  }
123
123
 
124
- type CostRecordedEvent {
124
+ type CostRecordedEvent @aws_iam @aws_lambda {
125
125
  tenantId: ID!
126
126
  agentId: ID
127
127
  agentName: String
@@ -134,7 +134,7 @@ type CostRecordedEvent {
134
134
  updatedAt: AWSDateTime!
135
135
  }
136
136
 
137
- type EvalRunUpdateEvent {
137
+ type EvalRunUpdateEvent @aws_iam @aws_lambda {
138
138
  runId: ID!
139
139
  tenantId: ID!
140
140
  agentId: ID
@@ -147,13 +147,37 @@ type EvalRunUpdateEvent {
147
147
  updatedAt: AWSDateTime!
148
148
  }
149
149
 
150
- type WorkspaceAccessRevokedEvent {
150
+ type WorkspaceAccessRevokedEvent @aws_iam @aws_lambda {
151
151
  tenantId: ID!
152
152
  spaceId: ID!
153
153
  userId: ID!
154
154
  revokedAt: AWSDateTime!
155
155
  }
156
156
 
157
+ type SubscriptionInvalidationEvent @aws_iam @aws_lambda {
158
+ subscriptionField: String!
159
+ scope: String!
160
+ tenantId: ID!
161
+ userId: ID
162
+ resourceKind: String
163
+ resourceId: ID
164
+ }
165
+
166
+ enum SubscriptionInvalidationField {
167
+ ON_AGENT_STATUS_CHANGED
168
+ ON_NEW_MESSAGE
169
+ ON_HEARTBEAT_ACTIVITY
170
+ ON_THREAD_UPDATED
171
+ ON_THREAD_ACTIVITY
172
+ ON_INBOX_ITEM_STATUS_CHANGED
173
+ ON_THREAD_TURN_UPDATED
174
+ ON_THREAD_TURN_STEP
175
+ ON_ORG_UPDATED
176
+ ON_COST_RECORDED
177
+ ON_EVAL_RUN_UPDATED
178
+ ON_WORKSPACE_ACCESS_REVOKED
179
+ }
180
+
157
181
  # ────────────────────────────────────────────────────────────────────
158
182
  # Notification mutations
159
183
  #
@@ -164,12 +188,21 @@ type WorkspaceAccessRevokedEvent {
164
188
 
165
189
  type Mutation {
166
190
  _empty: String
191
+ invalidateSubscription(
192
+ subscriptionField: SubscriptionInvalidationField!
193
+ scope: String!
194
+ tenantId: ID!
195
+ userId: ID
196
+ resourceKind: String
197
+ resourceId: ID
198
+ ): SubscriptionInvalidationEvent @aws_iam
199
+
167
200
  notifyAgentStatus(
168
201
  agentId: ID!
169
202
  tenantId: ID!
170
203
  status: String!
171
204
  name: String!
172
- ): AgentStatusEvent @aws_api_key @aws_cognito_user_pools @aws_iam
205
+ ): AgentStatusEvent @aws_iam
173
206
 
174
207
  notifyNewMessage(
175
208
  messageId: ID!
@@ -181,21 +214,21 @@ type Mutation {
181
214
  senderId: ID
182
215
  ownerType: String
183
216
  ownerId: ID
184
- ): NewMessageEvent @aws_api_key @aws_cognito_user_pools @aws_iam
217
+ ): NewMessageEvent @aws_iam
185
218
 
186
219
  notifyHeartbeatActivity(
187
220
  heartbeatId: ID!
188
221
  tenantId: ID!
189
222
  status: String!
190
223
  message: String
191
- ): HeartbeatActivityEvent @aws_api_key @aws_cognito_user_pools @aws_iam
224
+ ): HeartbeatActivityEvent @aws_iam
192
225
 
193
226
  notifyThreadUpdate(
194
227
  threadId: ID!
195
228
  tenantId: ID!
196
229
  status: String!
197
230
  title: String!
198
- ): ThreadUpdateEvent @aws_api_key @aws_cognito_user_pools @aws_iam
231
+ ): ThreadUpdateEvent @aws_iam
199
232
 
200
233
  notifyThreadActivity(
201
234
  userId: ID!
@@ -209,14 +242,14 @@ type Mutation {
209
242
  createdAt: AWSDateTime
210
243
  mentioned: Boolean
211
244
  shouldNotify: Boolean
212
- ): ThreadActivityEvent @aws_api_key @aws_cognito_user_pools @aws_iam
245
+ ): ThreadActivityEvent @aws_iam
213
246
 
214
247
  notifyInboxItemUpdate(
215
248
  inboxItemId: ID!
216
249
  tenantId: ID!
217
250
  status: String!
218
251
  title: String
219
- ): InboxItemStatusEvent @aws_api_key @aws_cognito_user_pools @aws_iam
252
+ ): InboxItemStatusEvent @aws_iam
220
253
 
221
254
  notifyThreadTurnUpdate(
222
255
  runId: ID!
@@ -226,7 +259,7 @@ type Mutation {
226
259
  agentId: ID
227
260
  status: String!
228
261
  triggerName: String
229
- ): ThreadTurnUpdateEvent @aws_api_key @aws_cognito_user_pools @aws_iam
262
+ ): ThreadTurnUpdateEvent @aws_iam
230
263
 
231
264
  notifyThreadTurnStep(
232
265
  runId: ID!
@@ -240,14 +273,14 @@ type Mutation {
240
273
  message: String
241
274
  payload: AWSJSON
242
275
  createdAt: AWSDateTime!
243
- ): ThreadTurnStepEvent @aws_api_key @aws_cognito_user_pools @aws_iam
276
+ ): ThreadTurnStepEvent @aws_iam
244
277
 
245
278
  notifyOrgUpdate(
246
279
  tenantId: ID!
247
280
  changeType: String!
248
281
  entityType: String
249
282
  entityId: ID
250
- ): OrgUpdateEvent @aws_api_key @aws_cognito_user_pools @aws_iam
283
+ ): OrgUpdateEvent @aws_iam
251
284
 
252
285
  notifyCostRecorded(
253
286
  tenantId: ID!
@@ -259,7 +292,7 @@ type Mutation {
259
292
  eventType: String!
260
293
  amountUsd: Float!
261
294
  model: String
262
- ): CostRecordedEvent @aws_api_key @aws_cognito_user_pools @aws_iam
295
+ ): CostRecordedEvent @aws_iam
263
296
 
264
297
  notifyEvalRunUpdate(
265
298
  runId: ID!
@@ -271,51 +304,51 @@ type Mutation {
271
304
  failed: Int
272
305
  passRate: Float
273
306
  errorMessage: String
274
- ): EvalRunUpdateEvent @aws_api_key @aws_cognito_user_pools @aws_iam
307
+ ): EvalRunUpdateEvent @aws_iam
275
308
 
276
309
  notifyWorkspaceAccessRevoked(
277
310
  tenantId: ID!
278
311
  spaceId: ID!
279
312
  userId: ID!
280
313
  revokedAt: AWSDateTime!
281
- ): WorkspaceAccessRevokedEvent @aws_api_key @aws_cognito_user_pools @aws_iam
314
+ ): WorkspaceAccessRevokedEvent @aws_iam
282
315
  }
283
316
 
284
317
  type Subscription {
285
318
  _empty: String
286
- onAgentStatusChanged(tenantId: ID!): AgentStatusEvent @aws_api_key @aws_cognito_user_pools @aws_iam
319
+ onAgentStatusChanged(tenantId: ID!): AgentStatusEvent
287
320
  @aws_subscribe(mutations: ["notifyAgentStatus"])
288
321
 
289
- onNewMessage(threadId: ID!): NewMessageEvent @aws_api_key @aws_cognito_user_pools @aws_iam
322
+ onNewMessage(threadId: ID!): NewMessageEvent
290
323
  @aws_subscribe(mutations: ["notifyNewMessage"])
291
324
 
292
- onHeartbeatActivity(tenantId: ID!): HeartbeatActivityEvent @aws_api_key @aws_cognito_user_pools @aws_iam
325
+ onHeartbeatActivity(tenantId: ID!): HeartbeatActivityEvent
293
326
  @aws_subscribe(mutations: ["notifyHeartbeatActivity"])
294
327
 
295
- onThreadUpdated(tenantId: ID!): ThreadUpdateEvent @aws_api_key @aws_cognito_user_pools @aws_iam
328
+ onThreadUpdated(tenantId: ID!): ThreadUpdateEvent
296
329
  @aws_subscribe(mutations: ["notifyThreadUpdate"])
297
330
 
298
- onThreadActivity(userId: ID!): ThreadActivityEvent @aws_api_key @aws_cognito_user_pools @aws_iam
331
+ onThreadActivity(userId: ID!): ThreadActivityEvent
299
332
  @aws_subscribe(mutations: ["notifyThreadActivity"])
300
333
 
301
- onInboxItemStatusChanged(tenantId: ID!): InboxItemStatusEvent @aws_api_key @aws_cognito_user_pools @aws_iam
334
+ onInboxItemStatusChanged(tenantId: ID!): InboxItemStatusEvent
302
335
  @aws_subscribe(mutations: ["notifyInboxItemUpdate"])
303
336
 
304
- onThreadTurnUpdated(tenantId: ID!): ThreadTurnUpdateEvent @aws_api_key @aws_cognito_user_pools @aws_iam
337
+ onThreadTurnUpdated(tenantId: ID!): ThreadTurnUpdateEvent
305
338
  @aws_subscribe(mutations: ["notifyThreadTurnUpdate"])
306
339
 
307
- onThreadTurnStep(threadId: ID!): ThreadTurnStepEvent @aws_api_key @aws_cognito_user_pools @aws_iam
340
+ onThreadTurnStep(threadId: ID!): ThreadTurnStepEvent
308
341
  @aws_subscribe(mutations: ["notifyThreadTurnStep"])
309
342
 
310
- onOrgUpdated(tenantId: ID!): OrgUpdateEvent @aws_api_key @aws_cognito_user_pools @aws_iam
343
+ onOrgUpdated(tenantId: ID!): OrgUpdateEvent
311
344
  @aws_subscribe(mutations: ["notifyOrgUpdate"])
312
345
 
313
- onCostRecorded(tenantId: ID!): CostRecordedEvent @aws_api_key @aws_cognito_user_pools @aws_iam
346
+ onCostRecorded(tenantId: ID!): CostRecordedEvent
314
347
  @aws_subscribe(mutations: ["notifyCostRecorded"])
315
348
 
316
- onEvalRunUpdated(tenantId: ID!): EvalRunUpdateEvent @aws_api_key @aws_cognito_user_pools @aws_iam
349
+ onEvalRunUpdated(tenantId: ID!): EvalRunUpdateEvent
317
350
  @aws_subscribe(mutations: ["notifyEvalRunUpdate"])
318
351
 
319
- onWorkspaceAccessRevoked(userId: ID!): WorkspaceAccessRevokedEvent @aws_cognito_user_pools @aws_iam
352
+ onWorkspaceAccessRevoked(userId: ID!): WorkspaceAccessRevokedEvent
320
353
  @aws_subscribe(mutations: ["notifyWorkspaceAccessRevoked"])
321
354
  }
@@ -1,6 +1,7 @@
1
1
  # USER.md - About Your Human
2
2
 
3
3
  - **Name:** {{HUMAN_NAME}}
4
+ - **Email:** {{HUMAN_EMAIL}}
4
5
  - **What to call them:** {{HUMAN_CALL_BY}}
5
6
  - **Pronouns:** {{HUMAN_PRONOUNS}}
6
7
  - **Timezone:** {{HUMAN_TIMEZONE}}