@agentsdock/server 1.0.9 → 1.0.10-beta.4
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/npm/cli.cjs +6 -2
- package/package.json +1 -1
- package/server/VERSION +1 -1
- package/server/agent_server.py +1261 -2151
- package/server/claude_goals.py +16 -4
- package/server/codex_app_server.py +4 -0
- package/server/codex_auth.py +31 -0
- package/server/codex_history_repair.py +144 -39
- package/server/codex_provider.py +52 -2
- package/server/codex_response_stream.py +229 -0
- package/server/install.sh +3 -3
- package/server/server_instances.py +166 -2
package/npm/cli.cjs
CHANGED
|
@@ -66,7 +66,8 @@ function ensureFreshInstall(context) {
|
|
|
66
66
|
if (context.uid === 0) throw new Error('Run as the user who will own the server, without sudo.')
|
|
67
67
|
if (!['darwin', 'linux'].includes(context.platform)) throw new Error('Server installation requires Linux or Apple silicon macOS.')
|
|
68
68
|
for (const name of ROOT_SELECTORS) if (context.env[name]) throw new Error(`Custom installation selector ${name} is unsupported by the fresh-install CLI. Use the existing server's managed updater.`)
|
|
69
|
-
const existingInstall = (
|
|
69
|
+
const existingInstall = (message = 'An existing server installation or state was found. Use AgentsDock or agentsdock-server update; no installer was started.') =>
|
|
70
|
+
Object.assign(new Error(message), { code: 'AGENTSDOCK_EXISTING_INSTALLATION' })
|
|
70
71
|
const safeDirectory = info => info.isDirectory() && !info.isSymbolicLink() && info.uid === context.uid && (info.mode & 0o022) === 0 && (info.mode & 0o500) === 0o500
|
|
71
72
|
const allowEmptyScaffold = (relative, child) => {
|
|
72
73
|
const root = path.join(context.home, relative)
|
|
@@ -100,11 +101,14 @@ function ensureFreshInstall(context) {
|
|
|
100
101
|
}
|
|
101
102
|
if (context.platform === 'darwin') {
|
|
102
103
|
const check = context.spawn('/bin/launchctl', ['print', `gui/${context.uid}/com.agentsdock.server`], { encoding: 'utf8', timeout: 10000 })
|
|
103
|
-
if (check.status === 0) throw
|
|
104
|
+
if (check.status === 0) throw existingInstall('An AgentsServer service already exists. Use its managed updater.')
|
|
104
105
|
if (check.error || !/could not find service|service.*not found/i.test(`${check.stdout || ''} ${check.stderr || ''}`)) throw new Error('Could not verify the user service is absent. No installer was started.')
|
|
105
106
|
} else {
|
|
106
107
|
for (const unit of ['agents-server.service', 'zenithbot-agent.service']) {
|
|
107
108
|
const check = context.spawn('systemctl', ['--user', 'show', unit, '--property=LoadState', '--value'], { encoding: 'utf8', timeout: 10000 })
|
|
109
|
+
if (!check.error && check.status === 0 && String(check.stdout).trim() && String(check.stdout).trim() !== 'not-found') {
|
|
110
|
+
throw existingInstall('An existing user service was found. Use its managed updater.')
|
|
111
|
+
}
|
|
108
112
|
if (check.error || String(check.stdout).trim() !== 'not-found') throw new Error('An existing user service was found or its absence could not be verified. Use its managed updater.')
|
|
109
113
|
}
|
|
110
114
|
}
|
package/package.json
CHANGED
package/server/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.10-beta.4
|