thinkwork-cli 0.8.2 → 0.9.1

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 (57) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +18 -2
  3. package/dist/cli.js +3004 -215
  4. package/dist/terraform/examples/greenfield/main.tf +325 -19
  5. package/dist/terraform/examples/greenfield/terraform.tfvars.example +14 -0
  6. package/dist/terraform/modules/app/agentcore-code-interpreter/Dockerfile.sandbox-base +61 -0
  7. package/dist/terraform/modules/app/agentcore-code-interpreter/README.md +54 -0
  8. package/dist/terraform/modules/app/agentcore-code-interpreter/main.tf +197 -0
  9. package/dist/terraform/modules/app/agentcore-code-interpreter/scripts/build_and_push_sandbox_base.sh +70 -0
  10. package/dist/terraform/modules/app/agentcore-flue/README.md +58 -0
  11. package/dist/terraform/modules/app/agentcore-flue/main.tf +322 -0
  12. package/dist/terraform/modules/app/agentcore-flue/outputs.tf +23 -0
  13. package/dist/terraform/modules/app/agentcore-flue/variables.tf +91 -0
  14. package/dist/terraform/modules/app/agentcore-memory/scripts/create_or_find_memory.sh +0 -0
  15. package/dist/terraform/modules/app/agentcore-runtime/main.tf +204 -4
  16. package/dist/terraform/modules/app/appsync-subscriptions/main.tf +4 -0
  17. package/dist/terraform/modules/app/appsync-subscriptions/outputs.tf +5 -0
  18. package/dist/terraform/modules/app/computer-runtime/README.md +15 -0
  19. package/dist/terraform/modules/app/computer-runtime/main.tf +406 -0
  20. package/dist/terraform/modules/app/computer-runtime/outputs.tf +75 -0
  21. package/dist/terraform/modules/app/computer-runtime/variables.tf +66 -0
  22. package/dist/terraform/modules/app/hindsight-memory/main.tf +6 -0
  23. package/dist/terraform/modules/app/lambda-api/eval-fanout.tf +128 -0
  24. package/dist/terraform/modules/app/lambda-api/handlers.tf +1557 -42
  25. package/dist/terraform/modules/app/lambda-api/main.tf +299 -15
  26. package/dist/terraform/modules/app/lambda-api/mcp-oauth.tf +118 -0
  27. package/dist/terraform/modules/app/lambda-api/oauth-secrets.tf +49 -0
  28. package/dist/terraform/modules/app/lambda-api/outputs.tf +38 -0
  29. package/dist/terraform/modules/app/lambda-api/slack-app-secrets.tf +43 -0
  30. package/dist/terraform/modules/app/lambda-api/stripe-secrets.tf +53 -0
  31. package/dist/terraform/modules/app/lambda-api/variables.tf +349 -2
  32. package/dist/terraform/modules/app/lambda-api/workspace-events.tf +125 -0
  33. package/dist/terraform/modules/app/routines-stepfunctions/main.tf +453 -0
  34. package/dist/terraform/modules/app/sandbox-log-scrubber/README.md +66 -0
  35. package/dist/terraform/modules/app/sandbox-log-scrubber/main.tf +200 -0
  36. package/dist/terraform/modules/app/static-site/main.tf +146 -5
  37. package/dist/terraform/modules/app/www-dns/main.tf +118 -15
  38. package/dist/terraform/modules/app/www-dns/outputs.tf +10 -0
  39. package/dist/terraform/modules/app/www-dns/variables.tf +42 -0
  40. package/dist/terraform/modules/data/aurora-postgres/main.tf +164 -3
  41. package/dist/terraform/modules/data/aurora-postgres/outputs.tf +34 -0
  42. package/dist/terraform/modules/data/aurora-postgres/variables.tf +16 -0
  43. package/dist/terraform/modules/data/compliance-audit-bucket/README.md +145 -0
  44. package/dist/terraform/modules/data/compliance-audit-bucket/main.tf +573 -0
  45. package/dist/terraform/modules/data/compliance-audit-bucket/outputs.tf +43 -0
  46. package/dist/terraform/modules/data/compliance-audit-bucket/variables.tf +93 -0
  47. package/dist/terraform/modules/data/compliance-exports-bucket/main.tf +269 -0
  48. package/dist/terraform/modules/data/compliance-exports-bucket/outputs.tf +23 -0
  49. package/dist/terraform/modules/data/compliance-exports-bucket/variables.tf +50 -0
  50. package/dist/terraform/modules/data/s3-backups-bucket/main.tf +123 -0
  51. package/dist/terraform/modules/data/s3-buckets/main.tf +13 -0
  52. package/dist/terraform/modules/foundation/cognito/variables.tf +5 -2
  53. package/dist/terraform/modules/thinkwork/main.tf +439 -21
  54. package/dist/terraform/modules/thinkwork/outputs.tf +121 -0
  55. package/dist/terraform/modules/thinkwork/variables.tf +165 -6
  56. package/dist/terraform/schema.graphql +45 -0
  57. package/package.json +15 -14
@@ -50,6 +50,21 @@ output "bucket_name" {
50
50
  value = module.s3.bucket_name
51
51
  }
52
52
 
53
+ output "backups_bucket_name" {
54
+ description = "S3 bucket for operational backups (pre-drop snapshots from destructive migrations, via the aws_s3 Aurora extension)."
55
+ value = module.s3_backups.bucket_name
56
+ }
57
+
58
+ output "backups_bucket_arn" {
59
+ description = "ARN of the operational backups bucket."
60
+ value = module.s3_backups.bucket_arn
61
+ }
62
+
63
+ output "aurora_aws_s3_iam_role_arn" {
64
+ description = "IAM role ARN attached to the Aurora cluster for the aws_s3 extension. Null when backups are not wired (e.g. rds-postgres dev mode). Used in post-deploy runbooks to confirm the role association before running CREATE EXTENSION aws_s3."
65
+ value = module.database.aws_s3_iam_role_arn
66
+ }
67
+
53
68
  output "kb_service_role_arn" {
54
69
  value = module.bedrock_kb.kb_service_role_arn
55
70
  }
@@ -59,6 +74,11 @@ output "api_endpoint" {
59
74
  value = module.api.api_endpoint
60
75
  }
61
76
 
77
+ output "api_id" {
78
+ description = "aws_apigatewayv2_api.main.id — needed by the www-dns module to map api.<domain> onto the HTTP API."
79
+ value = module.api.api_id
80
+ }
81
+
62
82
  output "appsync_api_url" {
63
83
  value = module.appsync.graphql_api_url
64
84
  }
@@ -77,6 +97,12 @@ output "auth_domain" {
77
97
  value = module.cognito.auth_domain
78
98
  }
79
99
 
100
+ output "mapbox_public_token" {
101
+ description = "Mapbox public token used by apps/computer MapView. Surfaced for scripts/build-computer.sh to inline as VITE_MAPBOX_PUBLIC_TOKEN at build time. MapView falls back to OSM tiles when this is empty."
102
+ value = var.mapbox_public_token
103
+ sensitive = true
104
+ }
105
+
80
106
  output "ecr_repository_url" {
81
107
  value = module.agentcore.ecr_repository_url
82
108
  }
@@ -112,6 +138,61 @@ output "admin_bucket_name" {
112
138
  value = module.admin_site.bucket_name
113
139
  }
114
140
 
141
+ output "admin_url" {
142
+ description = "Public URL for the admin app (custom domain when set, CloudFront default otherwise)"
143
+ value = var.admin_domain != "" ? "https://${var.admin_domain}" : "https://${module.admin_site.distribution_domain}"
144
+ }
145
+
146
+ # Computer static site (apps/computer — end-user surface)
147
+ output "computer_distribution_id" {
148
+ description = "CloudFront distribution ID for the computer app"
149
+ value = module.computer_site.distribution_id
150
+ }
151
+
152
+ output "computer_distribution_domain" {
153
+ description = "CloudFront domain for the computer app"
154
+ value = module.computer_site.distribution_domain
155
+ }
156
+
157
+ output "computer_bucket_name" {
158
+ description = "S3 bucket for computer app assets"
159
+ value = module.computer_site.bucket_name
160
+ }
161
+
162
+ output "computer_url" {
163
+ description = "Public URL for the computer app (custom domain when set, CloudFront default otherwise)"
164
+ value = var.computer_domain != "" ? "https://${var.computer_domain}" : "https://${module.computer_site.distribution_domain}"
165
+ }
166
+
167
+ # Computer sandbox subdomain (plan-012 U3 / U11.5 — iframe-isolated
168
+ # fragment substrate). Provisioned only when var.computer_sandbox_domain
169
+ # is set. scripts/build-computer.sh reads these to sync the iframe-shell
170
+ # bundle and invalidate the sandbox distribution.
171
+ output "computer_sandbox_distribution_id" {
172
+ description = "CloudFront distribution ID for the iframe-isolated sandbox subdomain (empty when not provisioned)"
173
+ value = local.computer_sandbox_enabled ? module.computer_sandbox_site[0].distribution_id : ""
174
+ }
175
+
176
+ output "computer_sandbox_distribution_domain" {
177
+ description = "CloudFront domain for the sandbox subdomain (empty when not provisioned)"
178
+ value = local.computer_sandbox_enabled ? module.computer_sandbox_site[0].distribution_domain : ""
179
+ }
180
+
181
+ output "computer_sandbox_bucket_name" {
182
+ description = "S3 bucket holding the iframe-shell bundle for the sandbox subdomain (empty when not provisioned)"
183
+ value = local.computer_sandbox_enabled ? module.computer_sandbox_site[0].bucket_name : ""
184
+ }
185
+
186
+ output "computer_sandbox_url" {
187
+ description = "Public URL for the iframe-shell host (empty when not provisioned). The host app's __SANDBOX_IFRAME_SRC__ Vite define points at <url>/iframe-shell.html."
188
+ value = local.computer_sandbox_enabled ? "https://${var.computer_sandbox_domain}" : ""
189
+ }
190
+
191
+ output "computer_sandbox_allowed_parent_origins" {
192
+ description = "Comma-separated list of trusted parent origins for the iframe-shell. Mirrors the CSP frame-ancestors directive on the sandbox distribution and is wired into the iframe-shell's __ALLOWED_PARENT_ORIGINS__ Vite define at build time."
193
+ value = var.computer_sandbox_allowed_parent_origins
194
+ }
195
+
115
196
  # Docs static site
116
197
  output "docs_distribution_id" {
117
198
  description = "CloudFront distribution ID for the docs site"
@@ -159,3 +240,43 @@ output "ses_inbound_mx_target" {
159
240
  description = "MX target host for the email subdomain. Terraform already writes this into the subzone — this output is informational."
160
241
  value = module.ses.mx_target
161
242
  }
243
+
244
+ # MCP custom domain — consumed by `pnpm cf:sync-mcp`.
245
+ output "mcp_custom_domain" {
246
+ description = "Configured MCP custom domain (e.g., mcp.thinkwork.ai), or empty when disabled."
247
+ value = module.api.mcp_custom_domain
248
+ }
249
+
250
+ output "mcp_custom_domain_cert_arn" {
251
+ description = "ACM cert ARN for the MCP custom domain. Used by the CF sync script to poll validation status."
252
+ value = module.api.mcp_custom_domain_cert_arn
253
+ }
254
+
255
+ output "mcp_custom_domain_validation" {
256
+ description = "DNS validation records that must be added to Cloudflare for ACM to issue the cert. Each record: { name, type, value }."
257
+ value = module.api.mcp_custom_domain_validation
258
+ }
259
+
260
+ output "mcp_custom_domain_target" {
261
+ description = "Regional target for the final mcp CNAME — only populated on the second apply after mcp_custom_domain_ready=true. { target_domain_name, hosted_zone_id } or null."
262
+ value = module.api.mcp_custom_domain_target
263
+ }
264
+
265
+ # Phase 3 U7 — Compliance audit-anchor bucket (S3 Object Lock). Consumed by
266
+ # operator runbooks for post-deploy verification (`aws s3api get-object-lock-
267
+ # configuration`) and by U8a/U8b when the anchor Lambda lands.
268
+
269
+ output "compliance_anchor_bucket_arn" {
270
+ description = "ARN of the WORM-protected compliance audit-anchor S3 bucket."
271
+ value = module.compliance_anchors.bucket_arn
272
+ }
273
+
274
+ output "compliance_anchor_bucket_name" {
275
+ description = "Name of the WORM-protected compliance audit-anchor S3 bucket (thinkwork-{stage}-compliance-anchors)."
276
+ value = module.compliance_anchors.bucket_name
277
+ }
278
+
279
+ output "compliance_anchor_lambda_role_arn" {
280
+ description = "ARN of the IAM role the anchor Lambda (U8a/U8b) will assume. Inert in U7 — no Lambda function references this yet."
281
+ value = module.compliance_anchors.lambda_role_arn
282
+ }
@@ -50,6 +50,18 @@ variable "google_oauth_client_secret" {
50
50
  default = ""
51
51
  }
52
52
 
53
+ variable "redirect_success_url" {
54
+ description = "Default OAuth-callback redirect target when no per-request returnUrl is supplied. Mobile callers pass thinkwork:// custom scheme; web falls through to this."
55
+ type = string
56
+ default = "https://app.thinkwork.ai/settings/credentials"
57
+ }
58
+
59
+ variable "platform_operator_emails" {
60
+ description = "Comma-separated allowlist of emails permitted to invoke operator-gated GraphQL mutations (updateTenantPolicy, sandbox fixture setup, etc.). Forwarded to graphql-http as THINKWORK_PLATFORM_OPERATOR_EMAILS. Empty ⇒ the gate rejects every call."
61
+ type = string
62
+ default = ""
63
+ }
64
+
53
65
  # ---------------------------------------------------------------------------
54
66
  # BYO Foundation (all optional — defaults to creating everything)
55
67
  # ---------------------------------------------------------------------------
@@ -167,6 +179,12 @@ variable "agentcore_memory_id" {
167
179
  default = ""
168
180
  }
169
181
 
182
+ variable "enable_workspace_orchestration" {
183
+ description = "Enable S3 EventBridge/SQS routing for folder-native workspace orchestration. Also requires the per-tenant workspace_orchestration_enabled database flag before tenant events wake agents."
184
+ type = bool
185
+ default = false
186
+ }
187
+
170
188
  # ---------------------------------------------------------------------------
171
189
  # Naming / Buckets
172
190
  # ---------------------------------------------------------------------------
@@ -217,13 +235,21 @@ variable "api_auth_secret" {
217
235
  # ---------------------------------------------------------------------------
218
236
 
219
237
  variable "admin_callback_urls" {
220
- type = list(string)
221
- default = ["http://localhost:5174", "http://localhost:5174/auth/callback"]
238
+ type = list(string)
239
+ default = [
240
+ "http://localhost:5174",
241
+ "http://localhost:5174/auth/callback",
242
+ "http://localhost:5175",
243
+ "http://localhost:5175/auth/callback",
244
+ ]
222
245
  }
223
246
 
224
247
  variable "admin_logout_urls" {
225
- type = list(string)
226
- default = ["http://localhost:5174"]
248
+ type = list(string)
249
+ default = [
250
+ "http://localhost:5174",
251
+ "http://localhost:5175",
252
+ ]
227
253
  }
228
254
 
229
255
  variable "mobile_callback_urls" {
@@ -294,6 +320,56 @@ variable "admin_certificate_arn" {
294
320
  default = ""
295
321
  }
296
322
 
323
+ variable "computer_domain" {
324
+ description = "Custom domain for the computer SPA (e.g. computer.thinkwork.ai). Leave empty for CloudFront default."
325
+ type = string
326
+ default = ""
327
+ }
328
+
329
+ variable "computer_certificate_arn" {
330
+ description = "ACM certificate ARN for the computer domain (us-east-1, required for CloudFront custom domains)."
331
+ type = string
332
+ default = ""
333
+ }
334
+
335
+ variable "computer_sandbox_domain" {
336
+ description = "Custom domain for the LLM-fragment iframe substrate (e.g. sandbox.thinkwork.ai). Cross-origin from the computer SPA — load-bearing for the iframe-isolation security boundary documented in docs/specs/computer-ai-elements-contract-v1.md. Leave empty to skip provisioning the sandbox distribution."
337
+ type = string
338
+ default = ""
339
+ }
340
+
341
+ variable "computer_sandbox_certificate_arn" {
342
+ description = "ACM certificate ARN for the sandbox domain (us-east-1, required for CloudFront custom domains)."
343
+ type = string
344
+ default = ""
345
+ }
346
+
347
+ variable "computer_sandbox_allowed_parent_origins" {
348
+ description = "Comma-separated list of trusted parent origins that may frame the sandbox iframe (e.g. 'https://thinkwork.ai,https://dev.thinkwork.ai'). Wired into the sandbox CSP frame-ancestors directive AND mirrored at iframe-shell build time as __ALLOWED_PARENT_ORIGINS__. The two trust sets MUST stay in sync. Leave empty to allow no parents (effectively disabling the sandbox)."
349
+ type = string
350
+ default = ""
351
+ }
352
+
353
+ # ---------------------------------------------------------------------------
354
+ # API Gateway (custom domain — optional)
355
+ # ---------------------------------------------------------------------------
356
+
357
+ variable "api_domain" {
358
+ description = "Custom domain for the HTTP API Gateway (e.g. api.thinkwork.ai). Leave empty to keep only the default execute-api URL. When set, the www-dns module adds a SAN to the shared ACM cert and creates a Cloudflare CNAME pointing at the API Gateway regional domain."
359
+ type = string
360
+ default = ""
361
+ }
362
+
363
+ # ---------------------------------------------------------------------------
364
+ # Stripe billing
365
+ # ---------------------------------------------------------------------------
366
+
367
+ variable "stripe_price_ids_json" {
368
+ description = "JSON object mapping internal plan names to Stripe price IDs for this stage, e.g. {\"starter\":\"price_...\",\"team\":\"price_...\"}. Non-secret; per-stage. Exposed to Lambdas as STRIPE_PRICE_IDS_JSON env var. The secret_key, publishable_key, and webhook_signing_secret live in Secrets Manager at thinkwork/<stage>/stripe/api-credentials — never in tfvars."
369
+ type = string
370
+ default = "{}"
371
+ }
372
+
297
373
  # ---------------------------------------------------------------------------
298
374
  # SES inbound email (delegated subzone — Option A)
299
375
  # ---------------------------------------------------------------------------
@@ -310,8 +386,91 @@ variable "ses_manage_active_rule_set" {
310
386
  default = true
311
387
  }
312
388
 
313
- variable "lastmile_tasks_api_url" {
314
- description = "Base URL of the LastMile Tasks REST API (e.g. https://api-dev.lastmile-tei.com for develop). Feature-flags the outbound task sync leave blank to keep mobile-created tasks in sync_status='local'."
389
+ variable "wiki_compile_model_id" {
390
+ description = "Bedrock model id used by the wiki-compile Lambda (leaf planner + aggregation planner + section writer). Any Converse-compatible model works; change without a code deploy."
391
+ type = string
392
+ default = "openai.gpt-oss-120b-1:0"
393
+ }
394
+
395
+ variable "company_brain_source_agent_model_id" {
396
+ description = "Bedrock model id used by GraphQL Company Brain source agents for JSON tool/action turns. Defaults to Claude Haiku for reliable action output while the wiki compiler can remain on gpt-oss for throughput."
397
+ type = string
398
+ default = "us.anthropic.claude-haiku-4-5-20251001-v1:0"
399
+ }
400
+
401
+ variable "wiki_aggregation_pass_enabled" {
402
+ description = "Feature flag for the wiki aggregation pass (parent section rollups + section promotion). 'true' to enable, anything else disables. Pinned in terraform so unrelated deploys don't reset it."
403
+ type = string
404
+ default = "true"
405
+ }
406
+
407
+ variable "wiki_deterministic_linking_enabled" {
408
+ description = "Feature flag for deterministic compile-time link emission — parent-expander-derived city/journal links plus entity↔entity co-mention links. 'true' to enable, anything else disables. Precision-bounded: rollback is `DELETE FROM wiki_page_links WHERE context LIKE 'deterministic:%' OR context LIKE 'co_mention:%'`."
409
+ type = string
410
+ default = "true"
411
+ }
412
+
413
+ variable "google_places_api_key" {
414
+ description = "Google Places API (New) key used by wiki-compile for POI → city/state/country hierarchy enrichment. Stored as SSM SecureString at /thinkwork/<stage>/google-places/api-key. Empty string = parameter created with a placeholder; operator populates via `aws ssm put-parameter --overwrite`. Compile gracefully degrades to metadata-only rows when the key is absent — never fails compile."
415
+ type = string
416
+ default = ""
417
+ sensitive = true
418
+ }
419
+
420
+ variable "mapbox_public_token" {
421
+ description = "Mapbox public pk.* token consumed by apps/computer's MapView primitive (in @thinkwork/computer-stdlib) for inline map tile rendering inside generated applets. Flows from this variable → terraform output → scripts/build-computer.sh → apps/computer/.env.production as VITE_MAPBOX_PUBLIC_TOKEN. URL-restrict on the Mapbox dashboard to the deployed `computer.<apex>` host (and any dev hosts) — the token ships in the public Vite bundle, so URL allowlist is the security boundary. Empty string is acceptable: MapView falls back to OpenStreetMap tiles when the env var is unset, so dev environments without an operator-provisioned token still render maps."
422
+ type = string
423
+ default = ""
424
+ sensitive = true
425
+ }
426
+
427
+ variable "nova_act_api_key" {
428
+ description = "Nova Act API key used by the Strands Browser Automation tool. Stored as SSM SecureString at /thinkwork/<stage>/agentcore/nova-act-api-key. Empty string = parameter created with a placeholder; operator populates via `aws ssm put-parameter --overwrite`."
315
429
  type = string
316
430
  default = ""
431
+ sensitive = true
432
+ }
433
+
434
+ variable "agentcore_code_interpreter_id" {
435
+ description = "AgentCore Code Interpreter id used by routine-task-python for SFN python recipe states. Leave empty to fail closed until the stage has a routines-capable interpreter."
436
+ type = string
437
+ default = ""
438
+ }
439
+
440
+ variable "mcp_custom_domain" {
441
+ description = "MCP custom domain (e.g., 'mcp.thinkwork.ai'). Empty disables custom-domain setup — the MCP endpoint stays reachable at the API Gateway execute-api URL. When set, an ACM cert is created on the first apply; flip `mcp_custom_domain_ready = true` on a second apply after DNS validation completes. See docs/solutions/patterns/mcp-custom-domain-setup-2026-04-23.md."
442
+ type = string
443
+ default = ""
444
+ }
445
+
446
+ variable "mcp_custom_domain_ready" {
447
+ description = "Two-apply gate for the MCP custom domain. Leave false on the first apply (cert-only). After running `pnpm cf:sync-mcp` + waiting ~5 min for ACM validation, flip to true and re-apply to create the API Gateway domain + mapping."
448
+ type = bool
449
+ default = false
450
+ }
451
+
452
+ # ---------------------------------------------------------------------------
453
+ # Phase 3 U7 — Compliance audit-anchor bucket (S3 Object Lock)
454
+ # ---------------------------------------------------------------------------
455
+
456
+ variable "compliance_anchor_object_lock_mode" {
457
+ description = "S3 Object Lock retention mode for the compliance audit-anchor bucket. GOVERNANCE allows a privileged role with s3:BypassGovernanceRetention to delete or shorten retention; COMPLIANCE is irreversible (even AWS root cannot delete or shorten until retention expires). Default GOVERNANCE per master plan Decision #2; flip to COMPLIANCE in prod tfvars at audit-engagement time."
458
+ type = string
459
+ default = "GOVERNANCE"
460
+
461
+ validation {
462
+ condition = contains(["GOVERNANCE", "COMPLIANCE"], var.compliance_anchor_object_lock_mode)
463
+ error_message = "compliance_anchor_object_lock_mode must be either GOVERNANCE or COMPLIANCE."
464
+ }
465
+ }
466
+
467
+ variable "compliance_anchor_retention_days" {
468
+ description = "Default Object Lock retention in days for the compliance audit-anchor bucket. SOC2 Type 1 baseline is 12 months (365)."
469
+ type = number
470
+ default = 365
471
+
472
+ validation {
473
+ condition = var.compliance_anchor_retention_days > 0
474
+ error_message = "compliance_anchor_retention_days must be greater than 0."
475
+ }
317
476
  }
@@ -4,6 +4,7 @@
4
4
  # Source: packages/database-pg/graphql/types/subscriptions.graphql
5
5
 
6
6
  scalar AWSDateTime
7
+ scalar AWSJSON
7
8
 
8
9
  schema {
9
10
  query: Query
@@ -78,6 +79,13 @@ type ThreadTurnUpdateEvent {
78
79
  updatedAt: AWSDateTime!
79
80
  }
80
81
 
82
+ type ComputerThreadChunkEvent {
83
+ threadId: ID!
84
+ chunk: AWSJSON
85
+ seq: Int
86
+ publishedAt: AWSDateTime!
87
+ }
88
+
81
89
  type OrgUpdateEvent {
82
90
  tenantId: ID!
83
91
  changeType: String!
@@ -96,6 +104,19 @@ type CostRecordedEvent {
96
104
  updatedAt: AWSDateTime!
97
105
  }
98
106
 
107
+ type EvalRunUpdateEvent {
108
+ runId: ID!
109
+ tenantId: ID!
110
+ agentId: ID
111
+ status: String!
112
+ totalTests: Int
113
+ passed: Int
114
+ failed: Int
115
+ passRate: Float
116
+ errorMessage: String
117
+ updatedAt: AWSDateTime!
118
+ }
119
+
99
120
  # ────────────────────────────────────────────────────────────────────
100
121
  # Notification mutations
101
122
  #
@@ -154,6 +175,12 @@ type Mutation {
154
175
  triggerName: String
155
176
  ): ThreadTurnUpdateEvent @aws_api_key @aws_cognito_user_pools @aws_iam
156
177
 
178
+ publishComputerThreadChunk(
179
+ threadId: ID!
180
+ chunk: AWSJSON!
181
+ seq: Int!
182
+ ): ComputerThreadChunkEvent! @aws_api_key @aws_cognito_user_pools @aws_iam
183
+
157
184
  notifyOrgUpdate(
158
185
  tenantId: ID!
159
186
  changeType: String!
@@ -169,6 +196,18 @@ type Mutation {
169
196
  amountUsd: Float!
170
197
  model: String
171
198
  ): CostRecordedEvent @aws_api_key @aws_cognito_user_pools @aws_iam
199
+
200
+ notifyEvalRunUpdate(
201
+ runId: ID!
202
+ tenantId: ID!
203
+ agentId: ID
204
+ status: String!
205
+ totalTests: Int
206
+ passed: Int
207
+ failed: Int
208
+ passRate: Float
209
+ errorMessage: String
210
+ ): EvalRunUpdateEvent @aws_api_key @aws_cognito_user_pools @aws_iam
172
211
  }
173
212
 
174
213
  type Subscription {
@@ -191,9 +230,15 @@ type Subscription {
191
230
  onThreadTurnUpdated(tenantId: ID!): ThreadTurnUpdateEvent @aws_api_key @aws_cognito_user_pools @aws_iam
192
231
  @aws_subscribe(mutations: ["notifyThreadTurnUpdate"])
193
232
 
233
+ onComputerThreadChunk(threadId: ID!): ComputerThreadChunkEvent @aws_api_key @aws_cognito_user_pools @aws_iam
234
+ @aws_subscribe(mutations: ["publishComputerThreadChunk"])
235
+
194
236
  onOrgUpdated(tenantId: ID!): OrgUpdateEvent @aws_api_key @aws_cognito_user_pools @aws_iam
195
237
  @aws_subscribe(mutations: ["notifyOrgUpdate"])
196
238
 
197
239
  onCostRecorded(tenantId: ID!): CostRecordedEvent @aws_api_key @aws_cognito_user_pools @aws_iam
198
240
  @aws_subscribe(mutations: ["notifyCostRecorded"])
241
+
242
+ onEvalRunUpdated(tenantId: ID!): EvalRunUpdateEvent @aws_api_key @aws_cognito_user_pools @aws_iam
243
+ @aws_subscribe(mutations: ["notifyEvalRunUpdate"])
199
244
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "thinkwork-cli",
3
- "version": "0.8.2",
3
+ "version": "0.9.1",
4
4
  "description": "Thinkwork CLI — deploy, manage, and interact with your Thinkwork stack",
5
- "license": "MIT",
5
+ "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "bin": {
8
8
  "thinkwork": "dist/cli.js"
@@ -10,15 +10,6 @@
10
10
  "files": [
11
11
  "dist"
12
12
  ],
13
- "scripts": {
14
- "build": "tsup src/cli.ts --format esm --dts --clean && node scripts/bundle-terraform.js",
15
- "dev": "tsx src/cli.ts",
16
- "codegen": "graphql-codegen --config codegen.ts",
17
- "typecheck": "tsc --noEmit",
18
- "test": "vitest run",
19
- "lint": "echo 'lint: skipped (eslint not configured)'",
20
- "prepublishOnly": "npm run build && npm run typecheck"
21
- },
22
13
  "dependencies": {
23
14
  "@graphql-typed-document-node/core": "^3.2.0",
24
15
  "@inquirer/prompts": "^8.4.1",
@@ -26,7 +17,9 @@
26
17
  "chalk": "^5.6.2",
27
18
  "commander": "^12.0.0",
28
19
  "graphql": "^16.10.0",
29
- "ora": "^9.3.0"
20
+ "jszip": "^3.10.1",
21
+ "ora": "^9.3.0",
22
+ "@thinkwork/admin-ops": "0.0.0"
30
23
  },
31
24
  "devDependencies": {
32
25
  "@graphql-codegen/cli": "^5.0.6",
@@ -52,5 +45,13 @@
52
45
  "agents",
53
46
  "terraform",
54
47
  "cli"
55
- ]
56
- }
48
+ ],
49
+ "scripts": {
50
+ "build": "tsup src/cli.ts --format esm --dts --clean && node scripts/bundle-terraform.js",
51
+ "dev": "tsx src/cli.ts",
52
+ "codegen": "graphql-codegen --config codegen.ts",
53
+ "typecheck": "tsc --noEmit",
54
+ "test": "vitest run",
55
+ "lint": "echo 'lint: skipped (eslint not configured)'"
56
+ }
57
+ }