Skip to content

Commit f87402e

Browse files
committed
chore: code formatting only
1 parent c8b5448 commit f87402e

14 files changed

Lines changed: 238 additions & 154 deletions

.github/workflows/sdk-coverage.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ jobs:
7878
const testsPassed = '${{ steps.tests.outcome }}' === 'success';
7979
const runUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
8080
const COMMENT_MARKER = '<!-- sdk-coverage-report -->';
81-
81+
8282
let lines = [COMMENT_MARKER];
83-
83+
8484
if (!testsPassed) {
8585
let failedTests = [];
8686
try {
@@ -173,17 +173,17 @@ jobs:
173173
lines.push(`[📋 View workflow run](${runUrl})`);
174174
}
175175
}
176-
176+
177177
const comment = lines.join('\n');
178-
178+
179179
const { data: comments } = await github.rest.issues.listComments({
180180
owner: context.repo.owner,
181181
repo: context.repo.repo,
182182
issue_number: context.issue.number
183183
});
184-
184+
185185
const existingComment = comments.find(c => c.body.includes(COMMENT_MARKER));
186-
186+
187187
if (existingComment) {
188188
await github.rest.issues.updateComment({
189189
owner: context.repo.owner,
@@ -199,4 +199,3 @@ jobs:
199199
body: comment
200200
});
201201
}
202-

.github/workflows/smoke-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
required: true
1212
type: string
1313
discriminator:
14-
default: "true"
14+
default: 'true'
1515
type: string
1616
workflow_dispatch:
1717
inputs:

EXAMPLES.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ Runnable examples live in [`examples/`](./examples).
1616
- [Secrets with Devbox and Agent Gateway](#secrets-with-devbox)
1717

1818
<a id="blueprint-with-build-context"></a>
19+
1920
## Blueprint with Build Context
2021

2122
**Use case:** Create a blueprint using the object store to provide docker build context files, then verify files are copied into the image.
2223

2324
**Tags:** `blueprint`, `object-store`, `build-context`, `devbox`, `cleanup`
2425

2526
### Workflow
27+
2628
- Create a temporary directory with sample application files
2729
- Upload the directory to object storage as build context
2830
- Create a blueprint with a Dockerfile that copies the context files
@@ -31,28 +33,33 @@ Runnable examples live in [`examples/`](./examples).
3133
- Shutdown devbox and delete blueprint and storage object
3234

3335
### Prerequisites
36+
3437
- `RUNLOOP_API_KEY`
3538

3639
### Run
40+
3741
```sh
3842
yarn tsn -T examples/blueprint-with-build-context.ts
3943
```
4044

4145
### Test
46+
4247
```sh
4348
yarn test:examples
4449
```
4550

4651
**Source:** [`examples/blueprint-with-build-context.ts`](./examples/blueprint-with-build-context.ts)
4752

4853
<a id="devbox-from-blueprint-lifecycle"></a>
54+
4955
## Devbox From Blueprint (Run Command, Shutdown)
5056

5157
**Use case:** Create a devbox from a blueprint, run a command, fetch logs, validate output, and cleanly tear everything down.
5258

5359
**Tags:** `devbox`, `blueprint`, `commands`, `logs`, `cleanup`
5460

5561
### Workflow
62+
5663
- Create a blueprint
5764
- Fetch blueprint build logs
5865
- Create a devbox from the blueprint
@@ -62,28 +69,33 @@ yarn test:examples
6269
- Shutdown devbox and delete blueprint
6370

6471
### Prerequisites
72+
6573
- `RUNLOOP_API_KEY`
6674

6775
### Run
76+
6877
```sh
6978
yarn tsn -T examples/devbox-from-blueprint-lifecycle.ts
7079
```
7180

7281
### Test
82+
7383
```sh
7484
yarn test:examples
7585
```
7686

7787
**Source:** [`examples/devbox-from-blueprint-lifecycle.ts`](./examples/devbox-from-blueprint-lifecycle.ts)
7888

7989
<a id="devbox-mounts"></a>
90+
8091
## Devbox Mounts (Agent, Code, Object)
8192

8293
**Use case:** Launch a devbox that combines an agent mount for Claude Code, a code mount for the Runloop CLI repo, and an object mount for startup files.
8394

8495
**Tags:** `devbox`, `mounts`, `agent`, `code`, `object`, `claude-code`, `agent-gateway`, `ttl`
8596

8697
### Workflow
98+
8799
- Create or reuse an agent by name
88100
- Create a secret for an agent and route it through agent gateway
89101
- Upload a temporary directory as a storage object with a TTL
@@ -93,29 +105,34 @@ yarn test:examples
93105
- Shutdown the devbox and delete the temporary secret and object
94106

95107
### Prerequisites
108+
96109
- `RUNLOOP_API_KEY`
97110
- `ANTHROPIC_API_KEY`
98111

99112
### Run
113+
100114
```sh
101115
ANTHROPIC_API_KEY=sk-ant-xxx yarn tsn -T examples/devbox-mounts.ts
102116
```
103117

104118
### Test
119+
105120
```sh
106121
yarn test:examples
107122
```
108123

109124
**Source:** [`examples/devbox-mounts.ts`](./examples/devbox-mounts.ts)
110125

111126
<a id="devbox-snapshots"></a>
127+
112128
## Devbox Snapshots (Suspend, Resume, Restore, Delete)
113129

114130
**Use case:** Upload a file to a devbox, preserve it across suspend and resume, create a disk snapshot, restore multiple devboxes from that snapshot, mutate each copy independently, and delete the snapshot when finished.
115131

116132
**Tags:** `devbox`, `snapshot`, `suspend`, `resume`, `files`, `cleanup`
117133

118134
### Workflow
135+
119136
- Create a source devbox
120137
- Upload a file and mutate it into a shared baseline
121138
- Suspend and resume the source devbox
@@ -125,28 +142,33 @@ yarn test:examples
125142
- Shutdown the devboxes and delete the snapshot
126143

127144
### Prerequisites
145+
128146
- `RUNLOOP_API_KEY`
129147

130148
### Run
149+
131150
```sh
132151
yarn tsn -T examples/devbox-snapshots.ts
133152
```
134153

135154
### Test
155+
136156
```sh
137157
yarn test:examples
138158
```
139159

140160
**Source:** [`examples/devbox-snapshots.ts`](./examples/devbox-snapshots.ts)
141161

142162
<a id="devbox-tunnel"></a>
163+
143164
## Devbox Tunnel (HTTP Server Access)
144165

145166
**Use case:** Create a devbox with a tunnel, start an HTTP server, and access the server from the local machine through the tunnel.
146167

147168
**Tags:** `devbox`, `tunnel`, `networking`, `http`
148169

149170
### Workflow
171+
150172
- Create a devbox with a tunnel
151173
- Start an HTTP server inside the devbox
152174
- Read the tunnel details from the devbox
@@ -155,28 +177,33 @@ yarn test:examples
155177
- Shutdown the devbox
156178

157179
### Prerequisites
180+
158181
- `RUNLOOP_API_KEY`
159182

160183
### Run
184+
161185
```sh
162186
yarn tsn -T examples/devbox-tunnel.ts
163187
```
164188

165189
### Test
190+
166191
```sh
167192
yarn test:examples
168193
```
169194

170195
**Source:** [`examples/devbox-tunnel.ts`](./examples/devbox-tunnel.ts)
171196

172197
<a id="mcp-github-tools"></a>
198+
173199
## MCP Hub + Claude Code + GitHub
174200

175201
**Use case:** Connect Claude Code running in a devbox to GitHub tools through MCP Hub without exposing raw GitHub credentials to the devbox.
176202

177203
**Tags:** `mcp`, `devbox`, `github`, `commands`, `cleanup`
178204

179205
### Workflow
206+
180207
- Create an MCP config for GitHub
181208
- Store GitHub token as a Runloop secret
182209
- Launch a devbox with MCP Hub wiring
@@ -185,30 +212,35 @@ yarn test:examples
185212
- Shutdown devbox and clean up cloud resources
186213

187214
### Prerequisites
215+
188216
- `RUNLOOP_API_KEY`
189217
- `GITHUB_TOKEN (GitHub PAT with repo scope)`
190218
- `ANTHROPIC_API_KEY`
191219

192220
### Run
221+
193222
```sh
194223
GITHUB_TOKEN=ghp_xxx ANTHROPIC_API_KEY=sk-ant-xxx yarn tsn -T examples/mcp-github-tools.ts
195224
```
196225

197226
### Test
227+
198228
```sh
199229
yarn test:examples
200230
```
201231

202232
**Source:** [`examples/mcp-github-tools.ts`](./examples/mcp-github-tools.ts)
203233

204234
<a id="secrets-with-devbox"></a>
235+
205236
## Secrets with Devbox and Agent Gateway
206237

207238
**Use case:** Use a normal secret for sensitive app data in the devbox and agent gateway for upstream API credentials that should never be exposed to the agent.
208239

209240
**Tags:** `secrets`, `devbox`, `agent-gateway`, `credentials`, `environment-variables`, `cleanup`
210241

211242
### Workflow
243+
212244
- Create a secret for application data that should be available inside the devbox
213245
- Create a separate secret for an upstream API credential
214246
- Create an agent gateway config for an upstream API
@@ -217,14 +249,17 @@ yarn test:examples
217249
- Shutdown the devbox and delete the gateway config and both secrets
218250

219251
### Prerequisites
252+
220253
- `RUNLOOP_API_KEY`
221254

222255
### Run
256+
223257
```sh
224258
yarn tsn -T examples/secrets-with-devbox.ts
225259
```
226260

227261
### Test
262+
228263
```sh
229264
yarn test:examples
230265
```

packages/mcp-server/manifest.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
"entry_point": "index.js",
1919
"mcp_config": {
2020
"command": "node",
21-
"args": [
22-
"${__dirname}/index.js"
23-
],
21+
"args": ["${__dirname}/index.js"],
2422
"env": {
2523
"RUNLOOP_API_KEY": "${user_config.RUNLOOP_API_KEY}"
2624
}
@@ -41,7 +39,5 @@
4139
"node": ">=18.0.0"
4240
}
4341
},
44-
"keywords": [
45-
"api"
46-
]
42+
"keywords": ["api"]
4743
}

scripts/generate-examples-md.cjs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@ function readExampleFiles() {
2727
.readdirSync(EXAMPLES_DIR)
2828
.filter(
2929
(file) =>
30-
file.endsWith('.ts') &&
31-
!file.startsWith('_') &&
32-
file !== 'types.ts' &&
33-
file !== 'registry.ts',
30+
file.endsWith('.ts') && !file.startsWith('_') && file !== 'types.ts' && file !== 'registry.ts',
3431
)
3532
.sort();
3633
}
@@ -107,9 +104,7 @@ function ensureLlmsReferences(examples) {
107104
}
108105

109106
if (referencedFiles.size === 0) {
110-
throw new Error(
111-
`${path.relative(ROOT, LLMS_FILE)}: expected at least one reference to examples/*.ts`,
112-
);
107+
throw new Error(`${path.relative(ROOT, LLMS_FILE)}: expected at least one reference to examples/*.ts`);
113108
}
114109

115110
const generatedFiles = new Set(examples.map((example) => example.fileName));
@@ -125,24 +120,29 @@ function ensureLlmsReferences(examples) {
125120
function markdownForExample(example) {
126121
return [
127122
`<a id="${example.slug}"></a>`,
123+
'',
128124
`## ${example.title}`,
129125
'',
130126
`**Use case:** ${example.use_case}`,
131127
'',
132128
`**Tags:** ${example.tags.map((tag) => `\`${tag}\``).join(', ')}`,
133129
'',
134130
'### Workflow',
131+
'',
135132
...example.workflow.map((step) => `- ${step}`),
136133
'',
137134
'### Prerequisites',
135+
'',
138136
...example.prerequisites.map((item) => `- \`${item}\``),
139137
'',
140138
'### Run',
139+
'',
141140
'```sh',
142141
example.run,
143142
'```',
144143
'',
145144
'### Test',
145+
'',
146146
'```sh',
147147
example.test,
148148
'```',
@@ -256,7 +256,9 @@ function main() {
256256
fs.writeFileSync(OUTPUT_FILE, markdown);
257257
fs.writeFileSync(OUTPUT_REGISTRY_FILE, registrySource);
258258
process.stdout.write(`Wrote ${path.relative(ROOT, OUTPUT_FILE)} from ${examples.length} example(s)\n`);
259-
process.stdout.write(`Wrote ${path.relative(ROOT, OUTPUT_REGISTRY_FILE)} from ${examples.length} example(s)\n`);
259+
process.stdout.write(
260+
`Wrote ${path.relative(ROOT, OUTPUT_REGISTRY_FILE)} from ${examples.length} example(s)\n`,
261+
);
260262
}
261263

262264
main();

0 commit comments

Comments
 (0)