chore: remove local artifacts and sanitize repo
This commit is contained in:
+13
@@ -59,3 +59,16 @@ CLAUDE.local.md
|
|||||||
.paseo/
|
.paseo/
|
||||||
.wrangler/
|
.wrangler/
|
||||||
**/.wrangler/
|
**/.wrangler/
|
||||||
|
|
||||||
|
# Local agent/tooling artifacts (do not commit)
|
||||||
|
PLAN.md
|
||||||
|
.valknut/
|
||||||
|
valknut-report.html/
|
||||||
|
valknut-report.json/
|
||||||
|
**/.playwright-mcp/
|
||||||
|
**/.paseo-provider-history/
|
||||||
|
.claude/settings.local.json
|
||||||
|
**/.claude/settings.local.json
|
||||||
|
.plans/
|
||||||
|
packages/server/src/server/fixtures/dictation/dictation-debug-largest.wav
|
||||||
|
packages/server/src/server/fixtures/dictation/dictation-debug-largest.transcript.txt
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ describe("parseToolCallDisplay", () => {
|
|||||||
test("strips shell + cd wrapper from command (Codex exec_command style)", () => {
|
test("strips shell + cd wrapper from command (Codex exec_command style)", () => {
|
||||||
const input = {
|
const input = {
|
||||||
command:
|
command:
|
||||||
'/bin/zsh -lc "cd /Users/moboudra/dev/paseo && nl -ba packages/app/src/utils/tool-call-parsers.test.ts | sed -n \'150,260p\'"',
|
'/bin/zsh -lc "cd /Users/me/dev/paseo && nl -ba packages/app/src/utils/tool-call-parsers.test.ts | sed -n \'150,260p\'"',
|
||||||
};
|
};
|
||||||
|
|
||||||
const display: ToolCallDisplay = parseToolCallDisplay("shell", input, undefined);
|
const display: ToolCallDisplay = parseToolCallDisplay("shell", input, undefined);
|
||||||
@@ -206,7 +206,7 @@ describe("parseToolCallDisplay - apply_patch (Codex)", () => {
|
|||||||
const input = {
|
const input = {
|
||||||
files: [
|
files: [
|
||||||
{
|
{
|
||||||
path: "/Users/moboudra/dev/blankpage/editor/.tasks/578561c8.md",
|
path: "/Users/me/dev/blankpage/editor/.tasks/578561c8.md",
|
||||||
kind: "update",
|
kind: "update",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@@ -214,7 +214,7 @@ describe("parseToolCallDisplay - apply_patch (Codex)", () => {
|
|||||||
const result = {
|
const result = {
|
||||||
files: [
|
files: [
|
||||||
{
|
{
|
||||||
path: "/Users/moboudra/dev/blankpage/editor/.tasks/578561c8.md",
|
path: "/Users/me/dev/blankpage/editor/.tasks/578561c8.md",
|
||||||
patch: "@@ -15,3 +15,2 @@\n-This task defines the **design philosophy**\n+This task defines the **updated philosophy**",
|
patch: "@@ -15,3 +15,2 @@\n-This task defines the **design philosophy**\n+This task defines the **updated philosophy**",
|
||||||
kind: "update",
|
kind: "update",
|
||||||
},
|
},
|
||||||
@@ -227,7 +227,7 @@ describe("parseToolCallDisplay - apply_patch (Codex)", () => {
|
|||||||
expect(display.type).toBe("edit");
|
expect(display.type).toBe("edit");
|
||||||
expect(display.toolName).toBe("Edit");
|
expect(display.toolName).toBe("Edit");
|
||||||
if (display.type === "edit") {
|
if (display.type === "edit") {
|
||||||
expect(display.filePath).toBe("/Users/moboudra/dev/blankpage/editor/.tasks/578561c8.md");
|
expect(display.filePath).toBe("/Users/me/dev/blankpage/editor/.tasks/578561c8.md");
|
||||||
expect(display.unifiedDiff).toBe("@@ -15,3 +15,2 @@\n-This task defines the **design philosophy**\n+This task defines the **updated philosophy**");
|
expect(display.unifiedDiff).toBe("@@ -15,3 +15,2 @@\n-This task defines the **design philosophy**\n+This task defines the **updated philosophy**");
|
||||||
expect(display.oldString).toBe("");
|
expect(display.oldString).toBe("");
|
||||||
expect(display.newString).toBe("");
|
expect(display.newString).toBe("");
|
||||||
@@ -238,7 +238,7 @@ describe("parseToolCallDisplay - apply_patch (Codex)", () => {
|
|||||||
const input = {
|
const input = {
|
||||||
files: [
|
files: [
|
||||||
{
|
{
|
||||||
path: "/Users/moboudra/-paseo/worktrees/paseo/naive-zebra/packages/server/src/server/daemon-keypair.ts",
|
path: "/Users/me/.paseo/worktrees/paseo/naive-zebra/packages/server/src/server/daemon-keypair.ts",
|
||||||
kind: { type: "update", move_path: null },
|
kind: { type: "update", move_path: null },
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@@ -246,7 +246,7 @@ describe("parseToolCallDisplay - apply_patch (Codex)", () => {
|
|||||||
const result = {
|
const result = {
|
||||||
files: [
|
files: [
|
||||||
{
|
{
|
||||||
path: "/Users/moboudra/-paseo/worktrees/paseo/naive-zebra/packages/server/src/server/daemon-keypair.ts",
|
path: "/Users/me/.paseo/worktrees/paseo/naive-zebra/packages/server/src/server/daemon-keypair.ts",
|
||||||
patch: "@@ -1,1 +1,1 @@\n-foo\n+bar",
|
patch: "@@ -1,1 +1,1 @@\n-foo\n+bar",
|
||||||
kind: { type: "update", move_path: null },
|
kind: { type: "update", move_path: null },
|
||||||
},
|
},
|
||||||
@@ -259,7 +259,7 @@ describe("parseToolCallDisplay - apply_patch (Codex)", () => {
|
|||||||
expect(display.toolName).toBe("Edit");
|
expect(display.toolName).toBe("Edit");
|
||||||
if (display.type === "edit") {
|
if (display.type === "edit") {
|
||||||
expect(display.filePath).toBe(
|
expect(display.filePath).toBe(
|
||||||
"/Users/moboudra/-paseo/worktrees/paseo/naive-zebra/packages/server/src/server/daemon-keypair.ts"
|
"/Users/me/.paseo/worktrees/paseo/naive-zebra/packages/server/src/server/daemon-keypair.ts"
|
||||||
);
|
);
|
||||||
expect(display.unifiedDiff).toBe("@@ -1,1 +1,1 @@\n-foo\n+bar");
|
expect(display.unifiedDiff).toBe("@@ -1,1 +1,1 @@\n-foo\n+bar");
|
||||||
}
|
}
|
||||||
@@ -339,11 +339,11 @@ describe("parseToolCallDisplay - apply_patch (Codex)", () => {
|
|||||||
describe("parseToolCallDisplay - read_file (Codex)", () => {
|
describe("parseToolCallDisplay - read_file (Codex)", () => {
|
||||||
test("parses Codex read_file into read type", () => {
|
test("parses Codex read_file into read type", () => {
|
||||||
const input = {
|
const input = {
|
||||||
path: "/Users/moboudra/dev/blankpage/editor/.tasks/578561c8.md",
|
path: "/Users/me/dev/blankpage/editor/.tasks/578561c8.md",
|
||||||
};
|
};
|
||||||
const result = {
|
const result = {
|
||||||
type: "read_file",
|
type: "read_file",
|
||||||
path: "/Users/moboudra/dev/blankpage/editor/.tasks/578561c8.md",
|
path: "/Users/me/dev/blankpage/editor/.tasks/578561c8.md",
|
||||||
content: "260 - Source: `**bold**|`\n261 - Action: `Shift+ArrowLeft`",
|
content: "260 - Source: `**bold**|`\n261 - Action: `Shift+ArrowLeft`",
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -351,7 +351,7 @@ describe("parseToolCallDisplay - read_file (Codex)", () => {
|
|||||||
expect(display.type).toBe("read");
|
expect(display.type).toBe("read");
|
||||||
expect(display.toolName).toBe("Read");
|
expect(display.toolName).toBe("Read");
|
||||||
if (display.type === "read") {
|
if (display.type === "read") {
|
||||||
expect(display.filePath).toBe("/Users/moboudra/dev/blankpage/editor/.tasks/578561c8.md");
|
expect(display.filePath).toBe("/Users/me/dev/blankpage/editor/.tasks/578561c8.md");
|
||||||
expect(display.content).toBe("260 - Source: `**bold**|`\n261 - Action: `Shift+ArrowLeft`");
|
expect(display.content).toBe("260 - Source: `**bold**|`\n261 - Action: `Shift+ArrowLeft`");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# OpenAI API Key (for GPT-4, Whisper STT, and TTS)
|
# OpenAI API Key (for GPT-4, Whisper STT, and TTS)
|
||||||
OPENAI_API_KEY=sk-...
|
OPENAI_API_KEY=
|
||||||
|
|
||||||
# TTS Configuration (optional - defaults shown)
|
# TTS Configuration (optional - defaults shown)
|
||||||
TTS_VOICE=alloy
|
TTS_VOICE=alloy
|
||||||
|
|||||||
@@ -70,8 +70,8 @@ See [IMPLEMENTATION_PLAN.md](./IMPLEMENTATION_PLAN.md) for complete details.
|
|||||||
## Environment Variables
|
## Environment Variables
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
OPENAI_API_KEY=sk-... # GPT-4 and TTS
|
OPENAI_API_KEY=your-openai-key-here # GPT-4 and TTS
|
||||||
DEEPGRAM_API_KEY=... # Streaming STT
|
DEEPGRAM_API_KEY=your-deepgram-key-here # Streaming STT
|
||||||
STT_MODEL=whisper-1 # Optional: override to gpt-4o-transcribe, etc.
|
STT_MODEL=whisper-1 # Optional: override to gpt-4o-transcribe, etc.
|
||||||
STT_CONFIDENCE_THRESHOLD=-3.0 # Optional: reject low-confidence clips
|
STT_CONFIDENCE_THRESHOLD=-3.0 # Optional: reject low-confidence clips
|
||||||
STT_DEBUG_AUDIO_DIR=.stt-debug # Optional: persist raw dictation audio for debugging
|
STT_DEBUG_AUDIO_DIR=.stt-debug # Optional: persist raw dictation audio for debugging
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import "dotenv/config";
|
import "dotenv/config";
|
||||||
import { readFile, writeFile, mkdir } from "node:fs/promises";
|
import { writeFile, mkdir } from "node:fs/promises";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import { fileURLToPath } from "node:url";
|
import { fileURLToPath } from "node:url";
|
||||||
import OpenAI from "openai";
|
import OpenAI from "openai";
|
||||||
@@ -17,22 +17,20 @@ async function main(): Promise<void> {
|
|||||||
const __dirname = path.dirname(__filename);
|
const __dirname = path.dirname(__filename);
|
||||||
const repoRoot = path.resolve(__dirname, "..");
|
const repoRoot = path.resolve(__dirname, "..");
|
||||||
|
|
||||||
const fixturePath = path.resolve(
|
const defaultOutPath = path.resolve(repoRoot, "tmp", "dictation-baseline.transcript.txt");
|
||||||
repoRoot,
|
const audioPath =
|
||||||
"src",
|
process.env.DICTATION_AUDIO_PATH ??
|
||||||
"server",
|
(process.argv[2] ? path.resolve(process.argv[2]) : null);
|
||||||
"fixtures",
|
const outPath = path.resolve(process.env.DICTATION_OUT_PATH ?? process.argv[3] ?? defaultOutPath);
|
||||||
"dictation",
|
|
||||||
"dictation-debug-largest.wav"
|
if (!audioPath) {
|
||||||
);
|
// eslint-disable-next-line no-console
|
||||||
const outPath = path.resolve(
|
console.error(
|
||||||
repoRoot,
|
"Usage: npx tsx packages/server/scripts/dictation-generate-baseline.ts <audioPath> [outPath]\n" +
|
||||||
"src",
|
" Or set DICTATION_AUDIO_PATH / DICTATION_OUT_PATH.\n"
|
||||||
"server",
|
);
|
||||||
"fixtures",
|
process.exit(2);
|
||||||
"dictation",
|
}
|
||||||
"dictation-debug-largest.transcript.txt"
|
|
||||||
);
|
|
||||||
|
|
||||||
const apiKey = requireEnv("OPENAI_API_KEY");
|
const apiKey = requireEnv("OPENAI_API_KEY");
|
||||||
const transcriptionModel =
|
const transcriptionModel =
|
||||||
@@ -43,10 +41,8 @@ async function main(): Promise<void> {
|
|||||||
|
|
||||||
const openai = new OpenAI({ apiKey });
|
const openai = new OpenAI({ apiKey });
|
||||||
|
|
||||||
// Use a temp file path for the SDK's file stream param.
|
|
||||||
// We already have a fixture file, so just stream it.
|
|
||||||
const response = await openai.audio.transcriptions.create({
|
const response = await openai.audio.transcriptions.create({
|
||||||
file: await import("node:fs").then((fs) => fs.createReadStream(fixturePath)),
|
file: await import("node:fs").then((fs) => fs.createReadStream(audioPath)),
|
||||||
language: "en",
|
language: "en",
|
||||||
model: transcriptionModel,
|
model: transcriptionModel,
|
||||||
prompt,
|
prompt,
|
||||||
@@ -59,8 +55,7 @@ async function main(): Promise<void> {
|
|||||||
await writeFile(outPath, `${response.text.trim()}\n`, "utf8");
|
await writeFile(outPath, `${response.text.trim()}\n`, "utf8");
|
||||||
|
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.log(`Wrote baseline transcript to ${outPath}`);
|
console.log(`Wrote transcript baseline to ${outPath}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
await main();
|
await main();
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { WebSocket } from "ws";
|
import { WebSocket } from "ws";
|
||||||
|
import os from "node:os";
|
||||||
import { DaemonClient } from "../../client/daemon-client.js";
|
import { DaemonClient } from "../../client/daemon-client.js";
|
||||||
|
|
||||||
// Patch WebSocket to log all messages
|
// Patch WebSocket to log all messages
|
||||||
@@ -28,7 +29,7 @@ class LoggingWebSocket extends OriginalWebSocket {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const PASEO_HOME = process.env.PASEO_HOME ?? "/Users/moboudra/.paseo";
|
const PASEO_HOME = process.env.PASEO_HOME ?? `${os.homedir()}/.paseo`;
|
||||||
const PASEO_PORT = process.env.PASEO_PORT ?? "6767";
|
const PASEO_PORT = process.env.PASEO_PORT ?? "6767";
|
||||||
const DAEMON_URL = `ws://127.0.0.1:${PASEO_PORT}/ws`;
|
const DAEMON_URL = `ws://127.0.0.1:${PASEO_PORT}/ws`;
|
||||||
|
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ import {
|
|||||||
|
|
||||||
describe("stripShellWrapperPrefix", () => {
|
describe("stripShellWrapperPrefix", () => {
|
||||||
test("strips /bin/zsh -lc cd path && prefix", () => {
|
test("strips /bin/zsh -lc cd path && prefix", () => {
|
||||||
const command = "/bin/zsh -lc cd /Users/moboudra/dev/blankpage/editor && npm run format";
|
const command = "/bin/zsh -lc cd /Users/me/dev/blankpage/editor && npm run format";
|
||||||
expect(stripShellWrapperPrefix(command)).toBe("npm run format");
|
expect(stripShellWrapperPrefix(command)).toBe("npm run format");
|
||||||
});
|
});
|
||||||
|
|
||||||
test("strips /bin/zsh -lc \"cd path &&\" wrapper", () => {
|
test("strips /bin/zsh -lc \"cd path &&\" wrapper", () => {
|
||||||
const command = '/bin/zsh -lc "cd /Users/moboudra/dev/blankpage/editor && npm run format"';
|
const command = '/bin/zsh -lc "cd /Users/me/dev/blankpage/editor && npm run format"';
|
||||||
expect(stripShellWrapperPrefix(command)).toBe("npm run format");
|
expect(stripShellWrapperPrefix(command)).toBe("npm run format");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user