Skip to content
Closed
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
14 changes: 14 additions & 0 deletions ENV_VARIABLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,20 @@ Model name / deployment name used by both backends. For Foundry, this must
match the deployment name on the Foundry resource. Examples: `gpt-4.1`,
`gpt-4o`, `gpt-4.1-mini`. Put in `.env.local` (see note above).

## Prompt Storage Configuration

### PROMPT_INLINE_MAX_BYTES
**Default:** `16384` (16 KB)
**Type:** integer (UTF-8 byte length)
**Used by:** API (`apps/api`)

Threshold deciding where a task/AGENTS.md prompt body is stored. A body whose
UTF-8 byte length is at/under this value is stored **inline** in Mongo (`text`);
a larger body is uploaded to blob storage (`prompts/{promptId}.txt`) and the doc
references it via `contentBlobUrl` with no inline `text`. The decision is purely
size-based — independent of the prompt's `type`. Small task prompts stay inline
(today's behavior); large AGENTS.md bodies go to blob automatically.

## Judge Strategy Configuration

### JUDGE_MODEL
Expand Down
130 changes: 105 additions & 25 deletions apps/api/src/__snapshots__/openapi-snapshot.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,9 @@ exports[`OpenAPI spec snapshot > matches the committed snapshot 1`] = `
"prompt": {
"type": "string",
},
"type": {
"$ref": "#/components/schemas/PromptType",
},
},
"required": [
"id",
Expand Down Expand Up @@ -844,6 +847,15 @@ exports[`OpenAPI spec snapshot > matches the committed snapshot 1`] = `
},
"CreateRequestInput": {
"properties": {
"agentsMd": {
"type": "string",
},
"agentsMdParentIds": {
"items": {
"type": "string",
},
"type": "array",
},
"codebaseRevisionId": {
"type": "string",
},
Expand Down Expand Up @@ -945,14 +957,7 @@ exports[`OpenAPI spec snapshot > matches the committed snapshot 1`] = `
"type": "string",
},
"type": {
"enum": [
"select",
"build",
"test",
"run",
"deploy",
],
"type": "string",
"$ref": "#/components/schemas/PromptType",
},
},
"required": [
Expand Down Expand Up @@ -2012,6 +2017,9 @@ exports[`OpenAPI spec snapshot > matches the committed snapshot 1`] = `
"prompt": {
"type": "string",
},
"type": {
"$ref": "#/components/schemas/PromptType",
},
"updatedAt": {
"format": "date-time",
"type": [
Expand Down Expand Up @@ -2046,6 +2054,17 @@ exports[`OpenAPI spec snapshot > matches the committed snapshot 1`] = `
],
"type": "object",
},
"PromptType": {
"enum": [
"select",
"build",
"test",
"run",
"deploy",
"agents.md",
],
"type": "string",
},
"RegisterAgentVersionInput": {
"properties": {
"agentVersion": {
Expand Down Expand Up @@ -2383,6 +2402,15 @@ exports[`OpenAPI spec snapshot > matches the committed snapshot 1`] = `
"agentVersion": {
"type": "string",
},
"agentsMdParentIds": {
"items": {
"type": "string",
},
"type": "array",
},
"agentsMdPromptId": {
"type": "string",
},
"codebaseRevisionId": {
"type": "string",
},
Expand Down Expand Up @@ -2944,6 +2972,9 @@ exports[`OpenAPI spec snapshot > matches the committed snapshot 1`] = `
"_id": {
"type": "string",
},
"contentBlobUrl": {
"type": "string",
},
"createdAt": {
"format": "date-time",
"type": [
Expand Down Expand Up @@ -2975,19 +3006,11 @@ exports[`OpenAPI spec snapshot > matches the committed snapshot 1`] = `
"type": "string",
},
"type": {
"enum": [
"select",
"build",
"test",
"run",
"deploy",
],
"type": "string",
"$ref": "#/components/schemas/PromptType",
},
},
"required": [
"_id",
"text",
"createdAt",
],
"type": "object",
Expand Down Expand Up @@ -6158,6 +6181,18 @@ exports[`OpenAPI spec snapshot > matches the committed snapshot 1`] = `
"type": "string",
},
},
{
"in": "query",
"name": "type",
"required": false,
"schema": {
"enum": [
"select",
"agents.md",
],
"type": "string",
},
},
],
"responses": {
"200": {
Expand Down Expand Up @@ -6226,6 +6261,13 @@ exports[`OpenAPI spec snapshot > matches the committed snapshot 1`] = `
"text": {
"type": "string",
},
"type": {
"enum": [
"select",
"agents.md",
],
"type": "string",
},
},
"required": [
"text",
Expand Down Expand Up @@ -9191,14 +9233,7 @@ exports[`OpenAPI spec snapshot > matches the committed snapshot 1`] = `
"name": "type",
"required": false,
"schema": {
"enum": [
"select",
"build",
"test",
"run",
"deploy",
],
"type": "string",
"$ref": "#/components/schemas/PromptType",
},
},
],
Expand Down Expand Up @@ -9396,6 +9431,51 @@ exports[`OpenAPI spec snapshot > matches the committed snapshot 1`] = `
],
},
},
"/api/v1/task-prompts/{id}/content": {
"get": {
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"schema": {
"type": "string",
},
},
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string",
},
"text": {
"type": "string",
},
},
"required": [
"id",
"text",
],
"type": "object",
},
},
},
"description": "Success",
},
"404": {
"description": "Task prompt not found",
},
},
"summary": "Get resolved task prompt content",
"tags": [
"Task Prompts",
],
},
},
"/api/v1/task-prompts/{id}/extract-features": {
"post": {
"parameters": [
Expand Down
Loading