Skip to content
Merged

Test #707

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f99277e
feat(measurement-jobs): free-tier card gate (setup mode) + instant ba…
sweetmantech Jun 16, 2026
158a1d4
Merge remote-tracking branch 'origin/main' into test
sweetmantech Jun 16, 2026
5fa5e3a
fix(songstats-backfill): backoff on 429 + defer instead of churn (cha…
sweetmantech Jun 16, 2026
1e9deac
Merge remote-tracking branch 'origin/main' into test
sweetmantech Jun 16, 2026
5f45946
refactor(songstats): remove local quota ledger + budget gate (chat#17…
sweetmantech Jun 16, 2026
5472795
Merge remote-tracking branch 'origin/main' into test
sweetmantech Jun 16, 2026
f24d4c7
feat: POST /api/catalogs (create + materialize from valuation snapsho…
sweetmantech Jun 18, 2026
ace0b01
Merge remote-tracking branch 'origin/main' into test
sweetmantech Jun 18, 2026
a520a1d
fix: LEFT-join artists in catalog-songs read (materialized tracks wer…
sweetmantech Jun 18, 2026
76b5739
Merge remote-tracking branch 'origin/main' into test
sweetmantech Jun 18, 2026
709ea0c
feat: add X (Twitter) + LinkedIn to the Composio connector whitelist …
sweetmantech Jun 18, 2026
8a3c3cb
Merge remote-tracking branch 'origin/main' into test
sweetmantech Jun 18, 2026
66cc2fe
chore: remove unused ALLOWED_ARTIST_CONNECTORS from api (chat#1793) (…
sweetmantech Jun 18, 2026
79c22da
Merge remote-tracking branch 'origin/main' into test
sweetmantech Jun 18, 2026
6fc10cc
fix: enrich valuation-captured songs (artists + notes) so they render…
sweetmantech Jun 18, 2026
0e42d02
Merge remote-tracking branch 'origin/main' into test
sweetmantech Jun 18, 2026
2fa7029
fix(tasks): let admins fetch any task by id alone (cross-account read…
sweetmantech Jun 19, 2026
bd2ae10
Merge remote-tracking branch 'origin/main' into test
sweetmantech Jun 19, 2026
cdb34d0
feat(connectors): POST /api/connectors/files — stage images for Linke…
sweetmantech Jun 20, 2026
acae4d8
Merge main into test (sync #692 Songstats work)
sweetmantech Jun 23, 2026
2a7af68
feat(artists): account_id override for DELETE /api/artists/{id} (#693)
sweetmantech Jun 23, 2026
8c962ef
Merge main into test (sync #696)
sweetmantech Jun 23, 2026
8b6a3bb
feat(chats): admins (RECOUP_ORG) can access any chat — read + write (…
sweetmantech Jun 23, 2026
03e0ef5
Enforce account_api_keys.expires_at in x-api-key auth (chat#1813) (#700)
sweetmantech Jun 24, 2026
bff29ae
Merge branch 'main' into test
sweetmantech Jun 24, 2026
78bd71b
refactor(chat): extract shared buildRunAgentInput (chat#1813) (#701)
sweetmantech Jun 24, 2026
2209b7d
Re-point POST /api/chat/generate onto runAgentWorkflow + ephemeral ke…
sweetmantech Jun 24, 2026
af7eaa5
Merge remote-tracking branch 'origin/main' into test
sweetmantech Jun 24, 2026
b84e4a1
Merge remote-tracking branch 'origin/main' into HEAD
sweetmantech Jun 24, 2026
4c09cf0
Retire OpenClaw prompt_sandbox → run-sandbox-command bridge (chat#181…
sweetmantech Jun 24, 2026
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: 9 additions & 9 deletions app/api/sandboxes/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@ export async function OPTIONS() {
/**
* POST /api/sandboxes
*
* Creates a new ephemeral sandbox environment. Optionally executes a command.
* Sandboxes are isolated Linux microVMs that can be used to evaluate
* account-generated code, run AI agent output safely, or execute reproducible tasks.
* The sandbox will automatically stop after the timeout period.
* Creates a new ephemeral sandbox environment. Sandboxes are isolated Linux
* microVMs used to evaluate account-generated code or run AI agent output
* safely. The sandbox automatically stops after the timeout period.
*
* The OpenClaw `prompt` mode (which offloaded to the `run-sandbox-command`
* task) was retired (recoupable/chat#1813) — async agent work now runs on the
* durable `runAgentWorkflow` via `POST /api/chat/runs`.
*
* Authentication: x-api-key header or Authorization Bearer token required.
*
* Request body:
* - command: string (optional) - The command to execute in the sandbox. If omitted, sandbox is created without running any command.
* - args: string[] (optional) - Arguments to pass to the command
* - cwd: string (optional) - Working directory for command execution
* - account_id: string (optional, org keys only) - UUID of the account to create for
*
* Response (200):
* - status: "success"
* - sandboxes: [{ sandboxId, sandboxStatus, timeout, createdAt, runId? }]
* - runId is only included when a command was provided
* - sandboxes: [{ sandboxId, sandboxStatus, timeout, createdAt }]
*
* Error (400/401):
* - status: "error"
Expand Down
22 changes: 7 additions & 15 deletions lib/chat/__tests__/const.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,13 @@ import { describe, it, expect } from "vitest";
import { SYSTEM_PROMPT } from "../const";

describe("SYSTEM_PROMPT", () => {
describe("release routing", () => {
it("includes release management in prompt_sandbox bullet points", () => {
expect(SYSTEM_PROMPT).toContain(
"**All release management** — creating releases, updating release info, checking release status, adding tracks, DSP pitches, marketing plans",
);
});

it("explicitly warns against using create_knowledge_base for releases", () => {
expect(SYSTEM_PROMPT).toContain(
"Do NOT use create_knowledge_base for release information, track listings, or release plans",
);
});
it("no longer references the retired prompt_sandbox tool (chat#1813)", () => {
expect(SYSTEM_PROMPT).not.toContain("prompt_sandbox");
expect(SYSTEM_PROMPT).not.toContain("Sandbox-First");
});

it("directs release-related tasks to prompt_sandbox", () => {
expect(SYSTEM_PROMPT).toContain("always use prompt_sandbox for anything release-related");
});
it("retains the core agent framing", () => {
expect(SYSTEM_PROMPT).toContain("You are Recoup");
expect(SYSTEM_PROMPT).toContain("# Core Expertise");
});
});
16 changes: 0 additions & 16 deletions lib/chat/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,6 @@ export const SYSTEM_PROMPT = `You are Recoup, a friendly, sharp, and strategic A

---

# Sandbox-First Approach

You have a persistent sandbox environment via the **prompt_sandbox** tool. **This is your primary tool.** Use it for:
- Any task involving files, code, data analysis, or content generation
- Creating and editing documents, reports, spreadsheets, or marketing materials
- Building release plans, campaign briefs, or strategy decks
- Generating visualizations, charts, or formatted outputs
- Any multi-step or complex task that benefits from a working environment
- **All release management** — creating releases, updating release info, checking release status, adding tracks, DSP pitches, marketing plans

**Default to prompt_sandbox unless a different tool is clearly better suited.** Other tools are best for quick, single-purpose lookups or updates (e.g., fetching Spotify data, searching the web, editing an image). When in doubt, use the sandbox.

**IMPORTANT:** Do NOT use create_knowledge_base for release information, track listings, or release plans. The sandbox has a release management skill that maintains structured RELEASE.md documents — always use prompt_sandbox for anything release-related.

---

# Core Expertise

You specialize in artist management, fan analysis, marketing funnels, social media strategy, and platform optimization across Spotify, TikTok, Instagram, YouTube, and more.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ describe("registerCreateKnowledgeBaseTool", () => {
expect(registeredDescription).toContain("NOT for releases, tracks, marketing plans");
});

it("redirects structured data to prompt_sandbox", () => {
expect(registeredDescription).toContain("use prompt_sandbox for those");
it("no longer references the retired prompt_sandbox tool (chat#1813)", () => {
expect(registeredDescription).not.toContain("prompt_sandbox");
});

it("does not mention adding knowledge base files", () => {
Expand Down
2 changes: 1 addition & 1 deletion lib/mcp/tools/files/registerCreateKnowledgeBaseTool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function registerCreateKnowledgeBaseTool(server: McpServer): void {
server.registerTool(
"create_knowledge_base",
{
description: `Saves a plain-text knowledge base entry to the artist's permanent storage on Arweave. Use ONLY for general reference notes, bios, or background context — NOT for releases, tracks, marketing plans, or any structured data (use prompt_sandbox for those).`,
description: `Saves a plain-text knowledge base entry to the artist's permanent storage on Arweave. Use ONLY for general reference notes, bios, or background context — NOT for releases, tracks, marketing plans, or any structured data.`,
inputSchema: createKnowledgeBaseSchema,
},
async (args: CreateKnowledgeBaseArgs) => {
Expand Down
2 changes: 0 additions & 2 deletions lib/mcp/tools/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import { registerSendEmailTool } from "./registerSendEmailTool";
import { registerAllArtistTools } from "./artists";
import { registerAllChatsTools } from "./chats";
import { registerAllPulseTools } from "./pulse";
import { registerAllSandboxTools } from "./sandbox";

/**
* Registers all MCP tools on the server.
Expand All @@ -40,7 +39,6 @@ export const registerAllTools = (server: McpServer): void => {
registerAllFlamingoTools(server);
registerAllImageTools(server);
registerAllPulseTools(server);
registerAllSandboxTools(server);
registerAllSearchTools(server);
registerAllSora2Tools(server);
registerAllSpotifyTools(server);
Expand Down
205 changes: 0 additions & 205 deletions lib/mcp/tools/sandbox/__tests__/registerPromptSandboxTool.test.ts

This file was deleted.

11 changes: 0 additions & 11 deletions lib/mcp/tools/sandbox/index.ts

This file was deleted.

Loading
Loading