@cortices/agent 0.2.15 → 0.3.7
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/cortices-claude.mjs +1 -1
- package/bin/cortices-codex.mjs +1 -1
- package/bin/cortices-native.mjs +29 -0
- package/bin/cortices-opencode.mjs +29 -0
- package/bin/cortices.mjs +9 -6
- package/dist/claude-daemon.mjs +1 -0
- package/dist/codex-daemon.mjs +1 -1
- package/dist/cortices-daemon.mjs +1 -0
- package/dist/opencode-daemon.mjs +1 -0
- package/dist/scripts/plan.mjs +2 -0
- package/dist/scripts/schedule.mjs +2 -0
- package/dist/scripts/service.mjs +2 -0
- package/dist/sdk.mjs +1 -0
- package/dist/wasm/_map.json +1 -0
- package/dist/wasm/cortices_core.js +1 -0
- package/dist/wasm/cortices_core_bg.wasm +0 -0
- package/dist/wasm/package.json +1 -0
- package/package.json +22 -12
- package/dist/claude-daemon.cjs +0 -4
- package/dist/claude-daemon.jsc +0 -0
- package/dist/core.darwin-arm64.node +0 -0
- package/dist/core.darwin-x64.node +0 -0
- package/dist/core.linux-arm64.node +0 -0
- package/dist/core.linux-x64.node +0 -0
- package/dist/core.win32-x64.node +0 -0
- package/dist/scripts/plan.cjs +0 -4
- package/dist/scripts/plan.jsc +0 -0
- package/dist/scripts/schedule.cjs +0 -4
- package/dist/scripts/schedule.jsc +0 -0
- package/dist/scripts/service.cjs +0 -4
- package/dist/scripts/service.jsc +0 -0
- package/dist/sdk.cjs +0 -4
- package/dist/sdk.jsc +0 -0
package/bin/cortices-claude.mjs
CHANGED
|
@@ -11,7 +11,7 @@ const bundled = resolve(__dirname, '..', 'dist', 'claude-daemon.mjs') // esbui
|
|
|
11
11
|
const source = resolve(__dirname, '..', 'claude-daemon.ts') // dev source
|
|
12
12
|
|
|
13
13
|
try {
|
|
14
|
-
if (existsSync(bytecode)
|
|
14
|
+
if (existsSync(bytecode)) {
|
|
15
15
|
execFileSync('node', [bytecode, ...process.argv.slice(2)], {
|
|
16
16
|
stdio: 'inherit', env: process.env,
|
|
17
17
|
})
|
package/bin/cortices-codex.mjs
CHANGED
|
@@ -11,7 +11,7 @@ const bundled = resolve(__dirname, '..', 'dist', 'codex-daemon.mjs') // esbuil
|
|
|
11
11
|
const source = resolve(__dirname, '..', 'codex-daemon.ts') // dev source
|
|
12
12
|
|
|
13
13
|
try {
|
|
14
|
-
if (existsSync(bytecode)
|
|
14
|
+
if (existsSync(bytecode)) {
|
|
15
15
|
execFileSync('node', [bytecode, ...process.argv.slice(2)], {
|
|
16
16
|
stdio: 'inherit', env: process.env,
|
|
17
17
|
})
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { dirname, resolve } from 'path'
|
|
4
|
+
import { fileURLToPath } from 'url'
|
|
5
|
+
import { existsSync } from 'fs'
|
|
6
|
+
import { execFileSync } from 'child_process'
|
|
7
|
+
|
|
8
|
+
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
9
|
+
const bytecode = resolve(__dirname, '..', 'dist', 'cortices-daemon.cjs')
|
|
10
|
+
const bundled = resolve(__dirname, '..', 'dist', 'cortices-daemon.mjs')
|
|
11
|
+
const source = resolve(__dirname, '..', 'cortices-daemon.ts')
|
|
12
|
+
|
|
13
|
+
try {
|
|
14
|
+
if (existsSync(bytecode)) {
|
|
15
|
+
execFileSync('node', [bytecode, ...process.argv.slice(2)], {
|
|
16
|
+
stdio: 'inherit', env: process.env,
|
|
17
|
+
})
|
|
18
|
+
} else if (existsSync(bundled)) {
|
|
19
|
+
execFileSync('node', [bundled, ...process.argv.slice(2)], {
|
|
20
|
+
stdio: 'inherit', env: process.env,
|
|
21
|
+
})
|
|
22
|
+
} else {
|
|
23
|
+
execFileSync('npx', ['tsx', source, ...process.argv.slice(2)], {
|
|
24
|
+
stdio: 'inherit', env: process.env,
|
|
25
|
+
})
|
|
26
|
+
}
|
|
27
|
+
} catch (e) {
|
|
28
|
+
process.exit(e.status || 1)
|
|
29
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { dirname, resolve } from 'path'
|
|
4
|
+
import { fileURLToPath } from 'url'
|
|
5
|
+
import { existsSync } from 'fs'
|
|
6
|
+
import { execFileSync } from 'child_process'
|
|
7
|
+
|
|
8
|
+
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
9
|
+
const bytecode = resolve(__dirname, '..', 'dist', 'opencode-daemon.cjs') // bytecode loader
|
|
10
|
+
const bundled = resolve(__dirname, '..', 'dist', 'opencode-daemon.mjs') // esbuild ESM
|
|
11
|
+
const source = resolve(__dirname, '..', 'opencode-daemon.ts') // dev source
|
|
12
|
+
|
|
13
|
+
try {
|
|
14
|
+
if (existsSync(bytecode)) {
|
|
15
|
+
execFileSync('node', [bytecode, ...process.argv.slice(2)], {
|
|
16
|
+
stdio: 'inherit', env: process.env,
|
|
17
|
+
})
|
|
18
|
+
} else if (existsSync(bundled)) {
|
|
19
|
+
execFileSync('node', [bundled, ...process.argv.slice(2)], {
|
|
20
|
+
stdio: 'inherit', env: process.env,
|
|
21
|
+
})
|
|
22
|
+
} else {
|
|
23
|
+
execFileSync('npx', ['tsx', source, ...process.argv.slice(2)], {
|
|
24
|
+
stdio: 'inherit', env: process.env,
|
|
25
|
+
})
|
|
26
|
+
}
|
|
27
|
+
} catch (e) {
|
|
28
|
+
process.exit(e.status || 1)
|
|
29
|
+
}
|
package/bin/cortices.mjs
CHANGED
|
@@ -16,17 +16,20 @@ if (agentIdx !== -1 && args[agentIdx + 1]) {
|
|
|
16
16
|
args.splice(agentIdx, 2) // remove --agent and its value from args
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
const VALID_TYPES = ['claude', 'codex', 'opencode', 'native']
|
|
20
|
+
if (!VALID_TYPES.includes(agentType)) {
|
|
21
|
+
console.error(`Unknown agent type: ${agentType}. Use: ${VALID_TYPES.join(', ')}`)
|
|
21
22
|
process.exit(1)
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
const
|
|
25
|
+
// 'native' type uses cortices-daemon.ts, others use <type>-daemon.ts
|
|
26
|
+
const daemonName = agentType === 'native' ? 'cortices-daemon' : `${agentType}-daemon`
|
|
27
|
+
const bytecode = resolve(__dirname, '..', 'dist', `${daemonName}.cjs`)
|
|
28
|
+
const bundled = resolve(__dirname, '..', 'dist', `${daemonName}.mjs`)
|
|
29
|
+
const source = resolve(__dirname, '..', `${daemonName}.ts`)
|
|
27
30
|
|
|
28
31
|
try {
|
|
29
|
-
if (existsSync(bytecode)
|
|
32
|
+
if (existsSync(bytecode)) {
|
|
30
33
|
execFileSync('node', [bytecode, ...args], {
|
|
31
34
|
stdio: 'inherit', env: process.env,
|
|
32
35
|
})
|