Skip to content

Commit 15f9e3f

Browse files
Waleed Latifwaleedlatif1
authored andcommitted
fix(deps): complete the OTel pin, restore SDK error detail, revert email list
Follow-ups from an independent audit of the previous commit. - Pin @opentelemetry/sdk-node and the three otlp-http exporters to exact 0.217.0. Pinning only their four dependents was self-reversing: sdk-node 0.219.0 requires core 2.8.0 exactly, so the next update would have silently rebuilt the split this PR removes. - Declare @opentelemetry/core (2.7.1). It is imported by lib/copilot/request/go/propagation.ts but resolved only by hoisting, and it is the OTel package with the most version churn in the tree. - Pin @radix-ui/react-dismissable-layer to exact 1.1.13 in @sim/emcn. All five transitive parents pin it exactly; a caret would fork a second copy on 1.1.14, which is the duplicate-context bug the declaration prevents. - Surface error.cause in simstudio-ts-sdk. Native fetch reports network failures as a bare "fetch failed" and puts the reason on cause, so every DNS/TLS/refused error was reaching callers with no diagnostic content. - Revert free-email-domains to 1.2.25. Upstream now merges the free-domain list with two disposable-email blocklists, so 1.9.70 classifies real organization domains as free — UK charities, some companies and universities, and the JP/KR ISP domains APAC SMBs use for business mail. The demo form blocks submission on that check, so a false positive costs the booking entirely. Worth doing deliberately, not inside a deps change. - Lower packages/cli engines to >=18. chalk 5 and commander 11 both accept >=16 and the source uses no Node 20 API, so >=20 only produced EBADENGINE for Node 18 users.
1 parent 20dca7e commit 15f9e3f

5 files changed

Lines changed: 42 additions & 20 deletions

File tree

apps/sim/package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,13 @@
7979
"@modelcontextprotocol/sdk": "1.29.0",
8080
"@monaco-editor/react": "4.7.0",
8181
"@opentelemetry/api": "^1.9.0",
82-
"@opentelemetry/exporter-logs-otlp-http": "^0.217.0",
83-
"@opentelemetry/exporter-metrics-otlp-http": "^0.217.0",
84-
"@opentelemetry/exporter-trace-otlp-http": "^0.217.0",
82+
"@opentelemetry/core": "2.7.1",
83+
"@opentelemetry/exporter-logs-otlp-http": "0.217.0",
84+
"@opentelemetry/exporter-metrics-otlp-http": "0.217.0",
85+
"@opentelemetry/exporter-trace-otlp-http": "0.217.0",
8586
"@opentelemetry/resources": "2.7.1",
8687
"@opentelemetry/sdk-metrics": "2.7.1",
87-
"@opentelemetry/sdk-node": "^0.217.0",
88+
"@opentelemetry/sdk-node": "0.217.0",
8889
"@opentelemetry/sdk-trace-base": "2.7.1",
8990
"@opentelemetry/sdk-trace-node": "2.7.1",
9091
"@opentelemetry/semantic-conventions": "^1.32.0",
@@ -151,7 +152,7 @@
151152
"es-toolkit": "1.45.1",
152153
"fluent-ffmpeg": "2.1.3",
153154
"framer-motion": "^12.5.0",
154-
"free-email-domains": "1.9.70",
155+
"free-email-domains": "1.2.25",
155156
"google-auth-library": "10.5.0",
156157
"gray-matter": "^4.0.3",
157158
"groq-sdk": "^0.15.0",

bun.lock

Lines changed: 9 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"author": "Sim",
3737
"license": "Apache-2.0",
3838
"engines": {
39-
"node": ">=20"
39+
"node": ">=18"
4040
},
4141
"dependencies": {
4242
"chalk": "5.6.2",

packages/emcn/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"@radix-ui/react-checkbox": "^1.1.3",
4545
"@radix-ui/react-collapsible": "^1.1.3",
4646
"@radix-ui/react-dialog": "^1.1.5",
47-
"@radix-ui/react-dismissable-layer": "^1.1.13",
47+
"@radix-ui/react-dismissable-layer": "1.1.13",
4848
"@radix-ui/react-dropdown-menu": "^2.1.17",
4949
"@radix-ui/react-label": "^2.1.2",
5050
"@radix-ui/react-popover": "^1.1.5",
@@ -67,7 +67,7 @@
6767
"@radix-ui/react-checkbox": "^1.1.3",
6868
"@radix-ui/react-collapsible": "^1.1.3",
6969
"@radix-ui/react-dialog": "^1.1.5",
70-
"@radix-ui/react-dismissable-layer": "^1.1.13",
70+
"@radix-ui/react-dismissable-layer": "1.1.13",
7171
"@radix-ui/react-dropdown-menu": "^2.1.17",
7272
"@radix-ui/react-label": "^2.1.2",
7373
"@radix-ui/react-popover": "^1.1.5",

packages/ts-sdk/src/index.ts

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,20 @@ export interface UsageLimits {
105105
}
106106
}
107107

108+
/**
109+
* Native fetch reports network failures as a bare `TypeError: fetch failed` and puts the
110+
* underlying reason (ECONNREFUSED, DNS, TLS) on `cause`. Fold it into the message so callers
111+
* keep the diagnostic detail, and return the plain message unchanged when there is no cause.
112+
*/
113+
function describeError(error: any): string | undefined {
114+
const message: string | undefined = error?.message
115+
const cause: string | undefined = error?.cause?.message
116+
if (message && cause && !message.includes(cause)) {
117+
return `${message}: ${cause}`
118+
}
119+
return message
120+
}
121+
108122
export class SimStudioError extends Error {
109123
public code?: string
110124
public status?: number
@@ -274,7 +288,10 @@ export class SimStudioClient {
274288
throw new SimStudioError(`Workflow execution timed out after ${timeout}ms`, 'TIMEOUT')
275289
}
276290

277-
throw new SimStudioError(error?.message || 'Failed to execute workflow', 'EXECUTION_ERROR')
291+
throw new SimStudioError(
292+
describeError(error) || 'Failed to execute workflow',
293+
'EXECUTION_ERROR'
294+
)
278295
}
279296
}
280297

@@ -308,7 +325,10 @@ export class SimStudioClient {
308325
throw error
309326
}
310327

311-
throw new SimStudioError(error?.message || 'Failed to get workflow status', 'STATUS_ERROR')
328+
throw new SimStudioError(
329+
describeError(error) || 'Failed to get workflow status',
330+
'STATUS_ERROR'
331+
)
312332
}
313333
}
314334

@@ -386,7 +406,7 @@ export class SimStudioClient {
386406
throw error
387407
}
388408

389-
throw new SimStudioError(error?.message || 'Failed to get job status', 'STATUS_ERROR')
409+
throw new SimStudioError(describeError(error) || 'Failed to get job status', 'STATUS_ERROR')
390410
}
391411
}
392412

@@ -509,7 +529,7 @@ export class SimStudioClient {
509529
throw error
510530
}
511531

512-
throw new SimStudioError(error?.message || 'Failed to get usage limits', 'USAGE_ERROR')
532+
throw new SimStudioError(describeError(error) || 'Failed to get usage limits', 'USAGE_ERROR')
513533
}
514534
}
515535
}

0 commit comments

Comments
 (0)