Skip to content

Commit 7373ac5

Browse files
Release: 1.5.0 (#562)
* Version stuff (#558) * add server version header to all responses * return version key on chat payloads * add version to langfuse * add has_code_attachment tag to langfuse * changesets * update template * add an error to echo service for debugging * ensure services respond to HEAD requests * revert langfuse tags * Upgrade to Claude Opus (#553) * switch to opus * adjust tokens effort * add changeset * adjust tokens * version: 1.5.0 --------- Co-authored-by: Hanna Paasivirta <hanna@openfn.org>
1 parent a615349 commit 7373ac5

17 files changed

Lines changed: 183 additions & 59 deletions

File tree

.github/pull_request_template.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,16 @@ Fixes #
66

77
## Implementation Details
88

9-
A more detailed breakdown of the changes, including motivations (if not provided in the issue).
9+
A more detailed breakdown of the changes, including motivations (if not provided
10+
in the issue).
1011

1112
## AI Usage
1213

13-
Please disclose how you've used AI in this work (it's cool, we just want to know!):
14+
Please disclose whether you've used AI in this work (it's cool, we just want to
15+
know!):
1416

15-
- [ ] Code generation (copilot but not intellisense)
16-
- [ ] Learning or fact checking
17-
- [ ] Strategy / design
18-
- [ ] Optimisation / refactoring
19-
- [ ] Translation / spellchecking / doc gen
20-
- [ ] Other
21-
- [ ] I have not used AI
17+
- [ ] Yes, I have not used AI
18+
- [ ] No, I have not used AI
2219

23-
You can read more details in our [Responsible AI Policy](https://www.openfn.org/ai#pull-request-templates)
20+
You can read more details in our
21+
[Responsible AI Policy](https://www.openfn.org/ai#pull-request-templates)

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# apollo
22

3+
## 1.5.0
4+
5+
### Minor Changes
6+
7+
- 5cd94ea: upgrade to opus in planner and job chat
8+
9+
### Patch Changes
10+
11+
- 01754a0: Add version metadata to HTTP headers, chat payloads (meta key), and
12+
langfuse traces
13+
- 01754a0: For langfuse traces with code, add a `has_code_attachment` tag
14+
315
## 1.4.0
416

517
### Minor Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "apollo",
33
"module": "platform/index.ts",
4-
"version": "1.4.0",
4+
"version": "1.5.0",
55
"type": "module",
66
"scripts": {
77
"start": "NODE_ENV=production bun platform/src/index.ts",

platform/src/bridge.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import path from "node:path";
33
import { spawn } from "node:child_process";
44
import { rm } from "node:fs/promises";
55
import { getInternalToken } from "./auth/internal-token";
6+
import pkg from "../../package.json";
67

78
/**
89
Run a python script
@@ -46,7 +47,13 @@ export const run = async (
4647
// Hand the internal token to the child explicitly so its apollo() self-calls
4748
// are recognised by the auth hook. Spawned from here (the honest owner) rather than
4849
// written back onto this process's env.
49-
{ env: { ...process.env, APOLLO_INTERNAL_TOKEN: getInternalToken() } }
50+
{
51+
env: {
52+
...process.env,
53+
APOLLO_INTERNAL_TOKEN: getInternalToken(),
54+
APOLLO_VERSION: pkg.version,
55+
},
56+
}
5057
);
5158

5259
proc.on("error", async (err) => {

platform/src/middleware/dir.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ export default async (app: Elysia) => {
2424
// jsx templates!
2525
// https://elysiajs.com/patterns/mvc.html#view
2626

27+
app.head("/", () => new Response(null, { status: 200 }));
28+
2729
const modules = await describeModules(path.resolve("./services"));
2830
app.get("/", () => {
2931
return (

platform/src/middleware/services.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ export default async (app: Elysia, port: number, auth: InstanceAuth) => {
7474
const { name, readme } = m;
7575
console.log(" - mounted /services/" + name);
7676

77+
app.head(name, () => new Response(null, { status: 200 }));
78+
7779
// simple post
7880
app.post(name, async (ctx) => {
7981
console.log(`POST /services/${name}: ${ctx.uuid}`);

platform/src/server.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { captureException } from "./util/sentry";
1111
import { clientsDbUrl, closeDb } from "./db";
1212
import { runMigrations } from "./db/migrate";
1313
import { randomUUID } from "node:crypto";
14+
import pkg from "../../package.json";
1415

1516
export default async (
1617
port: number | string = 3000,
@@ -23,6 +24,7 @@ export default async (
2324
app.use(html());
2425

2526
app.derive(() => ({ start: Date.now(), uuid: randomUUID() }));
27+
app.onAfterHandle(({ set }) => { set.headers["X-Api-Version"] = pkg.version; });
2628
app.onAfterHandle(logRequest);
2729

2830
// Report unhandled throws to Sentry, then return nothing so Elysia produces

0 commit comments

Comments
 (0)