osborn 0.9.159 → 0.9.161
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +17 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
import { spawn } from 'child_process'
|
|
4
4
|
import { fileURLToPath } from 'url'
|
|
5
5
|
import { dirname, join } from 'path'
|
|
6
|
-
import { readFileSync } from 'fs'
|
|
6
|
+
import { readFileSync, existsSync, symlinkSync, rmSync } from 'fs'
|
|
7
|
+
import { homedir } from 'os'
|
|
7
8
|
|
|
8
9
|
const __filename = fileURLToPath(import.meta.url)
|
|
9
10
|
const __dirname = dirname(__filename)
|
|
@@ -59,6 +60,21 @@ Example:
|
|
|
59
60
|
process.exit(0)
|
|
60
61
|
}
|
|
61
62
|
|
|
63
|
+
// Ensure ~/.claude → /workspace/.claude symlink exists (Fly cloud machines run
|
|
64
|
+
// this binary directly, bypassing entrypoint.sh which normally creates it).
|
|
65
|
+
import { symlinkSync, rmSync } from 'fs'
|
|
66
|
+
import { homedir } from 'os'
|
|
67
|
+
{
|
|
68
|
+
const claudeLink = join(homedir(), '.claude')
|
|
69
|
+
const claudeTarget = '/workspace/.claude'
|
|
70
|
+
if (existsSync(claudeTarget)) {
|
|
71
|
+
try {
|
|
72
|
+
rmSync(claudeLink, { recursive: true, force: true })
|
|
73
|
+
symlinkSync(claudeTarget, claudeLink)
|
|
74
|
+
} catch {}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
62
78
|
// Determine mode (default to 'dev' if no mode specified)
|
|
63
79
|
let mode = 'dev'
|
|
64
80
|
if (args.includes('start')) {
|
|
@@ -69,7 +85,6 @@ if (args.includes('start')) {
|
|
|
69
85
|
}
|
|
70
86
|
|
|
71
87
|
// Use src/index.ts (dev) if available, otherwise dist/index.js (npm install)
|
|
72
|
-
import { existsSync } from 'fs'
|
|
73
88
|
const srcPath = join(__dirname, '..', 'src', 'index.ts')
|
|
74
89
|
const distPath = join(__dirname, '..', 'dist', 'index.js')
|
|
75
90
|
|
package/dist/index.js
CHANGED
|
@@ -520,7 +520,7 @@ function startApiServer(workingDir, port) {
|
|
|
520
520
|
const syncToken = process.env.OSBORN_SYNC_TOKEN;
|
|
521
521
|
if (req.method === 'GET' && url.pathname === '/sessions') {
|
|
522
522
|
try {
|
|
523
|
-
const limit = parseInt(url.searchParams.get('limit') || '
|
|
523
|
+
const limit = parseInt(url.searchParams.get('limit') || '2000', 10);
|
|
524
524
|
const sessions = await listAllClaudeSessions(limit);
|
|
525
525
|
const payload = {
|
|
526
526
|
// The agent's working directory at launch — the BASE LAYER of all
|