Skip to content

Commit 7fd91da

Browse files
authored
Merge branch 'dev' into fix/shell-preview-byte-truncation
2 parents bb21535 + 49707c2 commit 7fd91da

7 files changed

Lines changed: 29 additions & 73 deletions

File tree

bun.lock

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

infra/stage.ts

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -9,49 +9,6 @@ export const zoneID = "430ba34c138cfb5360826c4909f99be8"
99
export const awsStage = $app.stage === "production" ? "production" : "dev"
1010
export const deployAws = $app.stage === awsStage
1111

12-
const githubActionsDeployRole = (() => {
13-
if ($app.stage !== "dev" && $app.stage !== "production") return
14-
15-
const provider = new aws.iam.OpenIdConnectProvider("GithubActionsOidcProvider", {
16-
url: "https://token.actions.githubusercontent.com",
17-
clientIdLists: ["sts.amazonaws.com"],
18-
})
19-
const role = new aws.iam.Role("GithubActionsDeployRole", {
20-
name: `opencode-${$app.stage}-github-actions-deploy`,
21-
maxSessionDuration: 3600,
22-
assumeRolePolicy: aws.iam.getPolicyDocumentOutput({
23-
statements: [
24-
{
25-
effect: "Allow",
26-
actions: ["sts:AssumeRoleWithWebIdentity"],
27-
principals: [{ type: "Federated", identifiers: [provider.arn] }],
28-
conditions: [
29-
{
30-
test: "StringEquals",
31-
variable: "token.actions.githubusercontent.com:aud",
32-
values: ["sts.amazonaws.com"],
33-
},
34-
{
35-
test: "StringEquals",
36-
variable: "token.actions.githubusercontent.com:sub",
37-
values: [`repo:anomalyco/opencode:environment:${$app.stage}`],
38-
},
39-
],
40-
},
41-
],
42-
}).json,
43-
})
44-
45-
new aws.iam.RolePolicyAttachment("GithubActionsDeployRoleAdmin", {
46-
role: role.name,
47-
policyArn: "arn:aws:iam::aws:policy/AdministratorAccess",
48-
})
49-
50-
return role
51-
})()
52-
53-
export const githubActionsDeployRoleArn = githubActionsDeployRole?.arn
54-
5512
new cloudflare.RegionalHostname("RegionalHostname", {
5613
hostname: domain,
5714
regionKey: "us",

nix/hashes.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"nodeModules": {
3-
"x86_64-linux": "sha256-6s5msV+dYMHHt9Gc/CqvCrUj8K7ELjxoAe6ejHSJo4I=",
4-
"aarch64-linux": "sha256-SP94UPy5LePd7ZdC3eENIXiozc67blpg1SN9Ug5yiv8=",
5-
"aarch64-darwin": "sha256-jv3lffiAQ5kxDAbXNavsHD+tjjdgT0dT0JxN0bWMYTE=",
6-
"x86_64-darwin": "sha256-aYNtcarg516ZmqaO62mnUZYiSyWt8rJjUHQslhrhGHM="
3+
"x86_64-linux": "sha256-gqXxbi1OwLoDSDtlmYWcTTPT/fqhVGb53JXS/9a1vWw=",
4+
"aarch64-linux": "sha256-+ARbWtOUDx0J5k55mmre/2kPekUsQtWWS0QZnyX6NTo=",
5+
"aarch64-darwin": "sha256-Q6ioI6lFUhNKogbvbtGWsZcXJfbRgUAWS5X2X4mKdg4=",
6+
"x86_64-darwin": "sha256-8K/hmcvXi9FGqprNbTKzMB80h5zZhO2TjOQbtve3ltQ="
77
}
88
}

packages/app/src/context/server.tsx

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,24 +36,30 @@ export function resolveServerList(input: {
3636
props?: Array<ServerConnection.Any>
3737
stored: StoredServer[]
3838
}): Array<ServerConnection.Any> {
39-
const servers = [
40-
...(input.props ?? []),
41-
...input.stored.map((value) =>
39+
const deduped = new Map<ServerConnection.Key, ServerConnection.Any>(
40+
input.props?.map((v) => [ServerConnection.key(v), v]) ?? [],
41+
)
42+
43+
for (const value of input.stored) {
44+
const conn: ServerConnection.Http =
4245
typeof value === "string"
4346
? {
4447
type: "http" as const,
4548
http: { url: value },
4649
}
47-
: value,
48-
),
49-
]
50-
51-
const deduped = new Map<ServerConnection.Key, ServerConnection.Any>()
52-
for (const value of servers) {
53-
const conn: ServerConnection.Any = "type" in value ? value : { type: "http", http: value }
50+
: "http" in value
51+
? value
52+
: { type: "http", http: value }
5453
const key = ServerConnection.key(conn)
55-
if (deduped.has(key) && conn.type === "http" && !conn.authToken) continue
56-
deduped.set(key, conn)
54+
55+
const existing = deduped.get(key)
56+
if (existing)
57+
deduped.set(key, {
58+
...existing,
59+
...conn,
60+
http: { ...existing.http, ...conn.http },
61+
})
62+
else deduped.set(key, conn)
5763
}
5864

5965
return [...deduped.values()]

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"@ai-sdk/cohere": "3.0.27",
3535
"@ai-sdk/deepinfra": "2.0.41",
3636
"@ai-sdk/gateway": "3.0.104",
37-
"@ai-sdk/google": "3.0.75",
37+
"@ai-sdk/google": "3.0.63",
3838
"@ai-sdk/google-vertex": "4.0.131",
3939
"@ai-sdk/groq": "3.0.31",
4040
"@ai-sdk/mistral": "3.0.27",

packages/opencode/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"@ai-sdk/cohere": "3.0.27",
8282
"@ai-sdk/deepinfra": "2.0.41",
8383
"@ai-sdk/gateway": "3.0.104",
84-
"@ai-sdk/google": "3.0.75",
84+
"@ai-sdk/google": "3.0.63",
8585
"@ai-sdk/google-vertex": "4.0.131",
8686
"@ai-sdk/groq": "3.0.31",
8787
"@ai-sdk/mistral": "3.0.27",

sst.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ export default $config({
5151
StatWorkerUrl: stat.url,
5252
// StatsUrl: stats.app.url,
5353
AwsStage: stage.awsStage,
54-
...(stage.githubActionsDeployRoleArn ? { GithubActionsDeployRoleArn: stage.githubActionsDeployRoleArn } : {}),
5554
}
5655
},
5756
})

0 commit comments

Comments
 (0)