Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,16 @@ Fixes #

## Implementation Details

A more detailed breakdown of the changes, including motivations (if not provided in the issue).
A more detailed breakdown of the changes, including motivations (if not provided
in the issue).

## AI Usage

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

- [ ] Code generation (copilot but not intellisense)
- [ ] Learning or fact checking
- [ ] Strategy / design
- [ ] Optimisation / refactoring
- [ ] Translation / spellchecking / doc gen
- [ ] Other
- [ ] I have not used AI
- [ ] Yes, I have not used AI
- [ ] No, I have not used AI

You can read more details in our [Responsible AI Policy](https://www.openfn.org/ai#pull-request-templates)
You can read more details in our
[Responsible AI Policy](https://www.openfn.org/ai#pull-request-templates)
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# apollo

## 1.5.0

### Minor Changes

- 5cd94ea: upgrade to opus in planner and job chat

### Patch Changes

- 01754a0: Add version metadata to HTTP headers, chat payloads (meta key), and
langfuse traces
- 01754a0: For langfuse traces with code, add a `has_code_attachment` tag

## 1.4.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "apollo",
"module": "platform/index.ts",
"version": "1.4.0",
"version": "1.5.0",
"type": "module",
"scripts": {
"start": "NODE_ENV=production bun platform/src/index.ts",
Expand Down
9 changes: 8 additions & 1 deletion platform/src/bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import path from "node:path";
import { spawn } from "node:child_process";
import { rm } from "node:fs/promises";
import { getInternalToken } from "./auth/internal-token";
import pkg from "../../package.json";

/**
Run a python script
Expand Down Expand Up @@ -46,7 +47,13 @@ export const run = async (
// Hand the internal token to the child explicitly so its apollo() self-calls
// are recognised by the auth hook. Spawned from here (the honest owner) rather than
// written back onto this process's env.
{ env: { ...process.env, APOLLO_INTERNAL_TOKEN: getInternalToken() } }
{
env: {
...process.env,
APOLLO_INTERNAL_TOKEN: getInternalToken(),
APOLLO_VERSION: pkg.version,
},
}
);

proc.on("error", async (err) => {
Expand Down
2 changes: 2 additions & 0 deletions platform/src/middleware/dir.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export default async (app: Elysia) => {
// jsx templates!
// https://elysiajs.com/patterns/mvc.html#view

app.head("/", () => new Response(null, { status: 200 }));

const modules = await describeModules(path.resolve("./services"));
app.get("/", () => {
return (
Expand Down
2 changes: 2 additions & 0 deletions platform/src/middleware/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ export default async (app: Elysia, port: number, auth: InstanceAuth) => {
const { name, readme } = m;
console.log(" - mounted /services/" + name);

app.head(name, () => new Response(null, { status: 200 }));

// simple post
app.post(name, async (ctx) => {
console.log(`POST /services/${name}: ${ctx.uuid}`);
Expand Down
2 changes: 2 additions & 0 deletions platform/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { captureException } from "./util/sentry";
import { clientsDbUrl, closeDb } from "./db";
import { runMigrations } from "./db/migrate";
import { randomUUID } from "node:crypto";
import pkg from "../../package.json";

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

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

// Report unhandled throws to Sentry, then return nothing so Elysia produces
Expand Down
Loading