Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
perf(lexical): point every caller at the ECS lexical service (#7548)
Wolf Mermelsteincc38ad891824
diff --git a/crates/macro_service_urls/src/lib.rs b/crates/macro_service_urls/src/lib.rsindex e9021abcaa..30abe7a114 100644--- a/crates/macro_service_urls/src/lib.rs+++ b/crates/macro_service_urls/src/lib.rs@@ -616,8 +616,8 @@ service_url! {/// Lexical conversion service API URL.pub LexicalServiceUrl {local: "http://localhost:8096",- dev: "https://lexical-service-dev.macroverse.workers.dev",- prod: "https://lexical-service-prod.macroverse.workers.dev",+ dev: "https://dev-gateway.macro.com/lexical",+ prod: "https://gateway.macro.com/lexical",},/// Sync service API URL.pub SyncServiceUrl {diff --git a/crates/macro_service_urls/src/test.rs b/crates/macro_service_urls/src/test.rsindex 881c3c5ee4..6e04c24c81 100644--- a/crates/macro_service_urls/src/test.rs+++ b/crates/macro_service_urls/src/test.rs@@ -622,7 +622,7 @@ fn exported_service_urls_match_dev_values() {);assert_eq!(service_urls.lexical_service_url.as_ref(),- "https://lexical-service-dev.macroverse.workers.dev",+ "https://dev-gateway.macro.com/lexical",);assert_eq!(service_urls.sync_service_url.as_ref(),@@ -705,7 +705,7 @@ fn exported_service_urls_match_prod_values() {);assert_eq!(service_urls.lexical_service_url.as_ref(),- "https://lexical-service-prod.macroverse.workers.dev",+ "https://gateway.macro.com/lexical",);assert_eq!(service_urls.sync_service_url.as_ref(),diff --git a/infra/packages/shared/src/service_urls.ts b/infra/packages/shared/src/service_urls.tsindex 42773c590d..cde3b23e57 100644--- a/infra/packages/shared/src/service_urls.ts+++ b/infra/packages/shared/src/service_urls.ts@@ -13,8 +13,6 @@ export enum ServiceUrl {CONNECTION_GATEWAY_URL = 'CONNECTION_GATEWAY_URL',DOCUMENT_COGNITION_SERVICE_URL = 'DOCUMENT_COGNITION_SERVICE_URL',LEXICAL_SERVICE_URL = 'LEXICAL_SERVICE_URL',- /** The lexical service on ECS, behind the shared gateway. */- LEXICAL_GATEWAY_URL = 'LEXICAL_GATEWAY_URL',UNFURL_SERVICE_URL = 'UNFURL_SERVICE_URL',AGENT_HARNESS_SERVICE_URL = 'AGENT_HARNESS_SERVICE_URL',AGENT_HARNESS_EGRESS_URL = 'AGENT_HARNESS_EGRESS_URL',@@ -46,9 +44,7 @@ const DEV_SERVICE_URLS: ServiceUrlMap = {'https://dev-gateway.macro.com/connection-gateway',[ServiceUrl.DOCUMENT_COGNITION_SERVICE_URL]:'https://dev-gateway.macro.com/cognition',- [ServiceUrl.LEXICAL_SERVICE_URL]:- 'https://lexical-service-dev.macroverse.workers.dev',- [ServiceUrl.LEXICAL_GATEWAY_URL]: 'https://dev-gateway.macro.com/lexical',+ [ServiceUrl.LEXICAL_SERVICE_URL]: 'https://dev-gateway.macro.com/lexical',[ServiceUrl.UNFURL_SERVICE_URL]: 'https://dev-gateway.macro.com/unfurl',[ServiceUrl.AGENT_HARNESS_SERVICE_URL]:'https://dev-gateway.macro.com/agent-harness',@@ -73,9 +69,7 @@ const PROD_SERVICE_URLS: ServiceUrlMap = {'https://gateway.macro.com/connection-gateway',[ServiceUrl.DOCUMENT_COGNITION_SERVICE_URL]:'https://gateway.macro.com/cognition',- [ServiceUrl.LEXICAL_SERVICE_URL]:- 'https://lexical-service-prod.macroverse.workers.dev',- [ServiceUrl.LEXICAL_GATEWAY_URL]: 'https://gateway.macro.com/lexical',+ [ServiceUrl.LEXICAL_SERVICE_URL]: 'https://gateway.macro.com/lexical',[ServiceUrl.UNFURL_SERVICE_URL]: 'https://gateway.macro.com/unfurl',[ServiceUrl.AGENT_HARNESS_SERVICE_URL]:'https://gateway.macro.com/agent-harness',diff --git a/infra/stacks/lexical-service/index.ts b/infra/stacks/lexical-service/index.tsindex 68b713846e..7bd9836de7 100644--- a/infra/stacks/lexical-service/index.ts+++ b/infra/stacks/lexical-service/index.ts@@ -44,4 +44,4 @@ const lexicalService = new LexicalService(`lexical-service-${stack}`, {});export const lexicalServiceSgId = lexicalService.serviceSg.id;-export const lexicalServiceUrl = getServiceUrl(ServiceUrl.LEXICAL_GATEWAY_URL);+export const lexicalServiceUrl = getServiceUrl(ServiceUrl.LEXICAL_SERVICE_URL);diff --git a/infra/stacks/lexical-service/lexical-service.ts b/infra/stacks/lexical-service/lexical-service.tsindex 322b751122..0ac502a390 100644--- a/infra/stacks/lexical-service/lexical-service.ts+++ b/infra/stacks/lexical-service/lexical-service.ts@@ -198,8 +198,10 @@ export class LexicalService extends pulumi.ComponentResource {name: BASE_NAME,image: image.image.imageUri,stopTimeout: 10, // 10 seconds to force kill the task- cpu: 256,- memory: 512,+ // Every lexical caller lands here, including whole-document+ // conversions, and Bun runs a task's JS on one thread.+ cpu: 1024,+ memory: 2048,environment: containerEnvVars,secrets,logConfiguration: {