@askexenow/exe-os 0.8.14 → 0.8.15
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/dist/bin/exe-launch-agent.js +33 -3
- package/package.json +1 -1
|
@@ -257,8 +257,8 @@ function shardExists(projectName) {
|
|
|
257
257
|
}
|
|
258
258
|
function listShards() {
|
|
259
259
|
if (!existsSync3(SHARDS_DIR)) return [];
|
|
260
|
-
const { readdirSync:
|
|
261
|
-
return
|
|
260
|
+
const { readdirSync: readdirSync3 } = __require("fs");
|
|
261
|
+
return readdirSync3(SHARDS_DIR).filter((f) => f.endsWith(".db")).map((f) => f.replace(".db", ""));
|
|
262
262
|
}
|
|
263
263
|
async function ensureShardSchema(client) {
|
|
264
264
|
await client.execute("PRAGMA journal_mode = WAL");
|
|
@@ -449,7 +449,7 @@ var init_shard_manager = __esm({
|
|
|
449
449
|
// src/bin/exe-launch-agent.ts
|
|
450
450
|
import os3 from "os";
|
|
451
451
|
import path6 from "path";
|
|
452
|
-
import { existsSync as existsSync6, readFileSync as readFileSync2 } from "fs";
|
|
452
|
+
import { existsSync as existsSync6, readFileSync as readFileSync2, mkdirSync as mkdirSync3, copyFileSync, readdirSync as readdirSync2 } from "fs";
|
|
453
453
|
import { spawnSync } from "child_process";
|
|
454
454
|
|
|
455
455
|
// src/lib/database.ts
|
|
@@ -1812,6 +1812,36 @@ async function main() {
|
|
|
1812
1812
|
}
|
|
1813
1813
|
_resetCcAgentSupportCache();
|
|
1814
1814
|
const hasAgentFlag = claudeSupportsAgentFlag();
|
|
1815
|
+
if (hasAgentFlag) {
|
|
1816
|
+
const ccAgentDir = path6.join(os3.homedir(), ".claude", "agents");
|
|
1817
|
+
const ccAgentFile = path6.join(ccAgentDir, `${agent}.md`);
|
|
1818
|
+
if (!existsSync6(ccAgentFile)) {
|
|
1819
|
+
const exeIdentity = identityPathFor(agent);
|
|
1820
|
+
let sourceFile = null;
|
|
1821
|
+
if (existsSync6(exeIdentity)) {
|
|
1822
|
+
sourceFile = exeIdentity;
|
|
1823
|
+
} else {
|
|
1824
|
+
try {
|
|
1825
|
+
const identityDir = path6.dirname(exeIdentity);
|
|
1826
|
+
const files = readdirSync2(identityDir);
|
|
1827
|
+
const match = files.find((f) => f.toLowerCase() === `${agent.toLowerCase()}.md`);
|
|
1828
|
+
if (match) sourceFile = path6.join(identityDir, match);
|
|
1829
|
+
} catch {
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
if (sourceFile) {
|
|
1833
|
+
try {
|
|
1834
|
+
mkdirSync3(ccAgentDir, { recursive: true });
|
|
1835
|
+
copyFileSync(sourceFile, ccAgentFile);
|
|
1836
|
+
process.stderr.write(
|
|
1837
|
+
`[exe-launch-agent] auto-provisioned ${ccAgentFile} from ${sourceFile}
|
|
1838
|
+
`
|
|
1839
|
+
);
|
|
1840
|
+
} catch {
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
}
|
|
1844
|
+
}
|
|
1815
1845
|
const plan = buildLaunchPlan(agent, behaviorsPath, passthrough, hasAgentFlag, provider);
|
|
1816
1846
|
if (!process.env.CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING) {
|
|
1817
1847
|
process.env.CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING = "1";
|
package/package.json
CHANGED