@openacp/cli 0.6.10 → 2026.41.1
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/README.md +34 -16
- package/dist/cli.d.ts +11 -0
- package/dist/cli.js +27787 -467
- package/dist/cli.js.map +1 -1
- package/dist/data/registry-snapshot.json +1 -1
- package/dist/index.d.ts +1944 -463
- package/dist/index.js +17365 -102
- package/dist/index.js.map +1 -1
- package/package.json +13 -7
- package/dist/action-detect-P7ZE4NEM.js +0 -16
- package/dist/action-detect-P7ZE4NEM.js.map +0 -1
- package/dist/adapter-ZOANORGM.js +0 -799
- package/dist/adapter-ZOANORGM.js.map +0 -1
- package/dist/admin-6SYB6XCZ.js +0 -23
- package/dist/admin-6SYB6XCZ.js.map +0 -1
- package/dist/agent-catalog-FC3HGDEQ.js +0 -11
- package/dist/agent-catalog-FC3HGDEQ.js.map +0 -1
- package/dist/agent-dependencies-4OWBMZWZ.js +0 -24
- package/dist/agent-dependencies-4OWBMZWZ.js.map +0 -1
- package/dist/agent-registry-WT4NXPYG.js +0 -9
- package/dist/agent-registry-WT4NXPYG.js.map +0 -1
- package/dist/agent-store-VZLFPTZU.js +0 -9
- package/dist/agent-store-VZLFPTZU.js.map +0 -1
- package/dist/agents-QO7DKARJ.js +0 -15
- package/dist/agents-QO7DKARJ.js.map +0 -1
- package/dist/api-client-CFQT5U7D.js +0 -14
- package/dist/api-client-CFQT5U7D.js.map +0 -1
- package/dist/autostart-X33OGMX6.js +0 -23
- package/dist/autostart-X33OGMX6.js.map +0 -1
- package/dist/chunk-2CJ46J3C.js +0 -154
- package/dist/chunk-2CJ46J3C.js.map +0 -1
- package/dist/chunk-2HMQOC7N.js +0 -134
- package/dist/chunk-2HMQOC7N.js.map +0 -1
- package/dist/chunk-33RP6K2O.js +0 -435
- package/dist/chunk-33RP6K2O.js.map +0 -1
- package/dist/chunk-34M4OS5P.js +0 -83
- package/dist/chunk-34M4OS5P.js.map +0 -1
- package/dist/chunk-4CTX774K.js +0 -265
- package/dist/chunk-4CTX774K.js.map +0 -1
- package/dist/chunk-7QJS2XBD.js +0 -92
- package/dist/chunk-7QJS2XBD.js.map +0 -1
- package/dist/chunk-BNLGTZ34.js +0 -122
- package/dist/chunk-BNLGTZ34.js.map +0 -1
- package/dist/chunk-CS3KCJ5D.js +0 -4788
- package/dist/chunk-CS3KCJ5D.js.map +0 -1
- package/dist/chunk-GAK6PIBW.js +0 -224
- package/dist/chunk-GAK6PIBW.js.map +0 -1
- package/dist/chunk-I7WC6E5S.js +0 -71
- package/dist/chunk-I7WC6E5S.js.map +0 -1
- package/dist/chunk-J4SJTKIK.js +0 -203
- package/dist/chunk-J4SJTKIK.js.map +0 -1
- package/dist/chunk-JHYXKVV2.js +0 -183
- package/dist/chunk-JHYXKVV2.js.map +0 -1
- package/dist/chunk-JKBFUAJK.js +0 -282
- package/dist/chunk-JKBFUAJK.js.map +0 -1
- package/dist/chunk-KIRH7TUJ.js +0 -219
- package/dist/chunk-KIRH7TUJ.js.map +0 -1
- package/dist/chunk-LBIKITQT.js +0 -22
- package/dist/chunk-LBIKITQT.js.map +0 -1
- package/dist/chunk-LCRLAV4G.js +0 -1085
- package/dist/chunk-LCRLAV4G.js.map +0 -1
- package/dist/chunk-LGP2YGRL.js +0 -4880
- package/dist/chunk-LGP2YGRL.js.map +0 -1
- package/dist/chunk-MKHUZLII.js +0 -738
- package/dist/chunk-MKHUZLII.js.map +0 -1
- package/dist/chunk-NAMYZIS5.js +0 -1
- package/dist/chunk-NAMYZIS5.js.map +0 -1
- package/dist/chunk-NVPG6JCL.js +0 -724
- package/dist/chunk-NVPG6JCL.js.map +0 -1
- package/dist/chunk-O7CPGUAI.js +0 -298
- package/dist/chunk-O7CPGUAI.js.map +0 -1
- package/dist/chunk-OWP7RZ62.js +0 -697
- package/dist/chunk-OWP7RZ62.js.map +0 -1
- package/dist/chunk-S64CB6J3.js +0 -98
- package/dist/chunk-S64CB6J3.js.map +0 -1
- package/dist/chunk-UKT3G5IA.js +0 -484
- package/dist/chunk-UKT3G5IA.js.map +0 -1
- package/dist/chunk-V5GZQEIY.js +0 -101
- package/dist/chunk-V5GZQEIY.js.map +0 -1
- package/dist/chunk-VOIJ6OY4.js +0 -63
- package/dist/chunk-VOIJ6OY4.js.map +0 -1
- package/dist/chunk-VUNV25KB.js +0 -16
- package/dist/chunk-VUNV25KB.js.map +0 -1
- package/dist/chunk-W3EYKZNQ.js +0 -45
- package/dist/chunk-W3EYKZNQ.js.map +0 -1
- package/dist/chunk-WTZDAYZX.js +0 -172
- package/dist/chunk-WTZDAYZX.js.map +0 -1
- package/dist/chunk-XANPHG7W.js +0 -145
- package/dist/chunk-XANPHG7W.js.map +0 -1
- package/dist/config-6S355X75.js +0 -15
- package/dist/config-6S355X75.js.map +0 -1
- package/dist/config-editor-QQTZMWGD.js +0 -13
- package/dist/config-editor-QQTZMWGD.js.map +0 -1
- package/dist/config-registry-AHYI4MYL.js +0 -18
- package/dist/config-registry-AHYI4MYL.js.map +0 -1
- package/dist/daemon-4CS6HMB5.js +0 -30
- package/dist/daemon-4CS6HMB5.js.map +0 -1
- package/dist/discord-OMC52Y54.js +0 -2239
- package/dist/discord-OMC52Y54.js.map +0 -1
- package/dist/dist-UHQK5CXN.js +0 -21151
- package/dist/dist-UHQK5CXN.js.map +0 -1
- package/dist/doctor-HZZ5BSHB.js +0 -10
- package/dist/doctor-HZZ5BSHB.js.map +0 -1
- package/dist/doctor-OLYBO3V3.js +0 -15
- package/dist/doctor-OLYBO3V3.js.map +0 -1
- package/dist/install-cloudflared-Z7VCGOVG.js +0 -33
- package/dist/install-cloudflared-Z7VCGOVG.js.map +0 -1
- package/dist/install-jq-HUYSQWKR.js +0 -32
- package/dist/install-jq-HUYSQWKR.js.map +0 -1
- package/dist/integrate-PNEHRY2I.js +0 -373
- package/dist/integrate-PNEHRY2I.js.map +0 -1
- package/dist/log-NXABYJTT.js +0 -24
- package/dist/log-NXABYJTT.js.map +0 -1
- package/dist/main-XOZCLFUK.js +0 -238
- package/dist/main-XOZCLFUK.js.map +0 -1
- package/dist/menu-YY5MKHEK.js +0 -16
- package/dist/menu-YY5MKHEK.js.map +0 -1
- package/dist/new-session-FEO4J4VU.js +0 -17
- package/dist/new-session-FEO4J4VU.js.map +0 -1
- package/dist/post-upgrade-CJG5I7M2.js +0 -80
- package/dist/post-upgrade-CJG5I7M2.js.map +0 -1
- package/dist/session-IUSI7P5S.js +0 -20
- package/dist/session-IUSI7P5S.js.map +0 -1
- package/dist/settings-RQPAM4KC.js +0 -14
- package/dist/settings-RQPAM4KC.js.map +0 -1
- package/dist/setup-XHS4OMPM.js +0 -37
- package/dist/setup-XHS4OMPM.js.map +0 -1
- package/dist/suggest-7D6B542M.js +0 -38
- package/dist/suggest-7D6B542M.js.map +0 -1
- package/dist/tunnel-service-CJLUH6SZ.js +0 -1174
- package/dist/tunnel-service-CJLUH6SZ.js.map +0 -1
- package/dist/version-NQZBM5M7.js +0 -16
- package/dist/version-NQZBM5M7.js.map +0 -1
package/dist/chunk-VOIJ6OY4.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
PLUGINS_DIR
|
|
3
|
-
} from "./chunk-33RP6K2O.js";
|
|
4
|
-
import {
|
|
5
|
-
createChildLogger
|
|
6
|
-
} from "./chunk-GAK6PIBW.js";
|
|
7
|
-
|
|
8
|
-
// src/core/plugin-manager.ts
|
|
9
|
-
import { execSync } from "child_process";
|
|
10
|
-
import * as fs from "fs";
|
|
11
|
-
import * as path from "path";
|
|
12
|
-
import { createRequire } from "module";
|
|
13
|
-
var log = createChildLogger({ module: "plugin-manager" });
|
|
14
|
-
function ensurePluginsDir() {
|
|
15
|
-
fs.mkdirSync(PLUGINS_DIR, { recursive: true });
|
|
16
|
-
const pkgPath = path.join(PLUGINS_DIR, "package.json");
|
|
17
|
-
if (!fs.existsSync(pkgPath)) {
|
|
18
|
-
fs.writeFileSync(pkgPath, JSON.stringify({ name: "openacp-plugins", private: true, dependencies: {} }, null, 2));
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
function installPlugin(packageName) {
|
|
22
|
-
ensurePluginsDir();
|
|
23
|
-
log.info({ packageName }, "Installing plugin");
|
|
24
|
-
execSync(`npm install ${packageName} --prefix "${PLUGINS_DIR}"`, { stdio: "inherit" });
|
|
25
|
-
log.info({ packageName }, "Plugin installed successfully");
|
|
26
|
-
}
|
|
27
|
-
function uninstallPlugin(packageName) {
|
|
28
|
-
ensurePluginsDir();
|
|
29
|
-
log.info({ packageName }, "Uninstalling plugin");
|
|
30
|
-
execSync(`npm uninstall ${packageName} --prefix "${PLUGINS_DIR}"`, { stdio: "inherit" });
|
|
31
|
-
log.info({ packageName }, "Plugin uninstalled");
|
|
32
|
-
}
|
|
33
|
-
function listPlugins() {
|
|
34
|
-
const pkgPath = path.join(PLUGINS_DIR, "package.json");
|
|
35
|
-
if (!fs.existsSync(pkgPath)) return {};
|
|
36
|
-
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf-8"));
|
|
37
|
-
return pkg.dependencies || {};
|
|
38
|
-
}
|
|
39
|
-
async function loadAdapterFactory(packageName) {
|
|
40
|
-
try {
|
|
41
|
-
const require2 = createRequire(path.join(PLUGINS_DIR, "package.json"));
|
|
42
|
-
const resolved = require2.resolve(packageName);
|
|
43
|
-
const mod = await import(resolved);
|
|
44
|
-
const factory = mod.adapterFactory || mod.default;
|
|
45
|
-
if (!factory || typeof factory.createAdapter !== "function") {
|
|
46
|
-
log.error({ packageName }, "Plugin does not export a valid AdapterFactory (needs .createAdapter())");
|
|
47
|
-
return null;
|
|
48
|
-
}
|
|
49
|
-
return factory;
|
|
50
|
-
} catch (err) {
|
|
51
|
-
log.error({ packageName, err }, "Failed to load plugin");
|
|
52
|
-
log.error({ packageName }, "Run: npx openacp install <packageName>");
|
|
53
|
-
return null;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export {
|
|
58
|
-
installPlugin,
|
|
59
|
-
uninstallPlugin,
|
|
60
|
-
listPlugins,
|
|
61
|
-
loadAdapterFactory
|
|
62
|
-
};
|
|
63
|
-
//# sourceMappingURL=chunk-VOIJ6OY4.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/core/plugin-manager.ts"],"sourcesContent":["import { execSync } from 'node:child_process'\nimport * as fs from 'node:fs'\nimport * as path from 'node:path'\nimport { createRequire } from 'node:module'\nimport { PLUGINS_DIR } from './config.js'\nimport { createChildLogger } from './log.js'\nconst log = createChildLogger({ module: 'plugin-manager' })\nimport type { ChannelAdapter, ChannelConfig } from './channel.js'\nimport type { OpenACPCore } from './core.js'\n\nexport interface AdapterFactory {\n name: string\n createAdapter(core: OpenACPCore, config: ChannelConfig): ChannelAdapter\n}\n\nfunction ensurePluginsDir(): void {\n fs.mkdirSync(PLUGINS_DIR, { recursive: true })\n const pkgPath = path.join(PLUGINS_DIR, 'package.json')\n if (!fs.existsSync(pkgPath)) {\n fs.writeFileSync(pkgPath, JSON.stringify({ name: 'openacp-plugins', private: true, dependencies: {} }, null, 2))\n }\n}\n\nexport function installPlugin(packageName: string): void {\n ensurePluginsDir()\n log.info({ packageName }, 'Installing plugin')\n execSync(`npm install ${packageName} --prefix \"${PLUGINS_DIR}\"`, { stdio: 'inherit' })\n log.info({ packageName }, 'Plugin installed successfully')\n}\n\nexport function uninstallPlugin(packageName: string): void {\n ensurePluginsDir()\n log.info({ packageName }, 'Uninstalling plugin')\n execSync(`npm uninstall ${packageName} --prefix \"${PLUGINS_DIR}\"`, { stdio: 'inherit' })\n log.info({ packageName }, 'Plugin uninstalled')\n}\n\nexport function listPlugins(): Record<string, string> {\n const pkgPath = path.join(PLUGINS_DIR, 'package.json')\n if (!fs.existsSync(pkgPath)) return {}\n const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'))\n return pkg.dependencies || {}\n}\n\nexport async function loadAdapterFactory(packageName: string): Promise<AdapterFactory | null> {\n try {\n const require = createRequire(path.join(PLUGINS_DIR, 'package.json'))\n const resolved = require.resolve(packageName)\n const mod = await import(resolved)\n\n // Plugin must export `adapterFactory` or default export conforming to AdapterFactory\n const factory: AdapterFactory | undefined = mod.adapterFactory || mod.default\n if (!factory || typeof factory.createAdapter !== 'function') {\n log.error({ packageName }, 'Plugin does not export a valid AdapterFactory (needs .createAdapter())')\n return null\n }\n return factory\n } catch (err) {\n log.error({ packageName, err }, 'Failed to load plugin')\n log.error({ packageName }, 'Run: npx openacp install <packageName>')\n return null\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,gBAAgB;AACzB,YAAY,QAAQ;AACpB,YAAY,UAAU;AACtB,SAAS,qBAAqB;AAG9B,IAAM,MAAM,kBAAkB,EAAE,QAAQ,iBAAiB,CAAC;AAS1D,SAAS,mBAAyB;AAChC,EAAG,aAAU,aAAa,EAAE,WAAW,KAAK,CAAC;AAC7C,QAAM,UAAe,UAAK,aAAa,cAAc;AACrD,MAAI,CAAI,cAAW,OAAO,GAAG;AAC3B,IAAG,iBAAc,SAAS,KAAK,UAAU,EAAE,MAAM,mBAAmB,SAAS,MAAM,cAAc,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC;AAAA,EACjH;AACF;AAEO,SAAS,cAAc,aAA2B;AACvD,mBAAiB;AACjB,MAAI,KAAK,EAAE,YAAY,GAAG,mBAAmB;AAC7C,WAAS,eAAe,WAAW,cAAc,WAAW,KAAK,EAAE,OAAO,UAAU,CAAC;AACrF,MAAI,KAAK,EAAE,YAAY,GAAG,+BAA+B;AAC3D;AAEO,SAAS,gBAAgB,aAA2B;AACzD,mBAAiB;AACjB,MAAI,KAAK,EAAE,YAAY,GAAG,qBAAqB;AAC/C,WAAS,iBAAiB,WAAW,cAAc,WAAW,KAAK,EAAE,OAAO,UAAU,CAAC;AACvF,MAAI,KAAK,EAAE,YAAY,GAAG,oBAAoB;AAChD;AAEO,SAAS,cAAsC;AACpD,QAAM,UAAe,UAAK,aAAa,cAAc;AACrD,MAAI,CAAI,cAAW,OAAO,EAAG,QAAO,CAAC;AACrC,QAAM,MAAM,KAAK,MAAS,gBAAa,SAAS,OAAO,CAAC;AACxD,SAAO,IAAI,gBAAgB,CAAC;AAC9B;AAEA,eAAsB,mBAAmB,aAAqD;AAC5F,MAAI;AACF,UAAMA,WAAU,cAAmB,UAAK,aAAa,cAAc,CAAC;AACpE,UAAM,WAAWA,SAAQ,QAAQ,WAAW;AAC5C,UAAM,MAAM,MAAM,OAAO;AAGzB,UAAM,UAAsC,IAAI,kBAAkB,IAAI;AACtE,QAAI,CAAC,WAAW,OAAO,QAAQ,kBAAkB,YAAY;AAC3D,UAAI,MAAM,EAAE,YAAY,GAAG,wEAAwE;AACnG,aAAO;AAAA,IACT;AACA,WAAO;AAAA,EACT,SAAS,KAAK;AACZ,QAAI,MAAM,EAAE,aAAa,IAAI,GAAG,uBAAuB;AACvD,QAAI,MAAM,EAAE,YAAY,GAAG,wCAAwC;AACnE,WAAO;AAAA,EACT;AACF;","names":["require"]}
|
package/dist/chunk-VUNV25KB.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
2
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
3
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
4
|
-
}) : x)(function(x) {
|
|
5
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
6
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
7
|
-
});
|
|
8
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
9
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export {
|
|
13
|
-
__require,
|
|
14
|
-
__commonJS
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=chunk-VUNV25KB.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/chunk-W3EYKZNQ.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
// src/core/api-client.ts
|
|
2
|
-
import * as fs from "fs";
|
|
3
|
-
import * as path from "path";
|
|
4
|
-
import * as os from "os";
|
|
5
|
-
var DEFAULT_PORT_FILE = path.join(os.homedir(), ".openacp", "api.port");
|
|
6
|
-
var DEFAULT_SECRET_FILE = path.join(os.homedir(), ".openacp", "api-secret");
|
|
7
|
-
function readApiPort(portFilePath = DEFAULT_PORT_FILE) {
|
|
8
|
-
try {
|
|
9
|
-
const content = fs.readFileSync(portFilePath, "utf-8").trim();
|
|
10
|
-
const port = parseInt(content, 10);
|
|
11
|
-
return isNaN(port) ? null : port;
|
|
12
|
-
} catch {
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
function readApiSecret(secretFilePath = DEFAULT_SECRET_FILE) {
|
|
17
|
-
try {
|
|
18
|
-
const content = fs.readFileSync(secretFilePath, "utf-8").trim();
|
|
19
|
-
return content || null;
|
|
20
|
-
} catch {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
function removeStalePortFile(portFilePath = DEFAULT_PORT_FILE) {
|
|
25
|
-
try {
|
|
26
|
-
fs.unlinkSync(portFilePath);
|
|
27
|
-
} catch {
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
async function apiCall(port, urlPath, options) {
|
|
31
|
-
const secret = readApiSecret();
|
|
32
|
-
const headers = new Headers(options?.headers);
|
|
33
|
-
if (secret) {
|
|
34
|
-
headers.set("Authorization", `Bearer ${secret}`);
|
|
35
|
-
}
|
|
36
|
-
return fetch(`http://127.0.0.1:${port}${urlPath}`, { ...options, headers });
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export {
|
|
40
|
-
readApiPort,
|
|
41
|
-
readApiSecret,
|
|
42
|
-
removeStalePortFile,
|
|
43
|
-
apiCall
|
|
44
|
-
};
|
|
45
|
-
//# sourceMappingURL=chunk-W3EYKZNQ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/core/api-client.ts"],"sourcesContent":["import * as fs from 'node:fs'\nimport * as path from 'node:path'\nimport * as os from 'node:os'\n\nconst DEFAULT_PORT_FILE = path.join(os.homedir(), '.openacp', 'api.port')\nconst DEFAULT_SECRET_FILE = path.join(os.homedir(), '.openacp', 'api-secret')\n\nexport function readApiPort(portFilePath: string = DEFAULT_PORT_FILE): number | null {\n try {\n const content = fs.readFileSync(portFilePath, 'utf-8').trim()\n const port = parseInt(content, 10)\n return isNaN(port) ? null : port\n } catch {\n return null\n }\n}\n\nexport function readApiSecret(secretFilePath: string = DEFAULT_SECRET_FILE): string | null {\n try {\n const content = fs.readFileSync(secretFilePath, 'utf-8').trim()\n return content || null\n } catch {\n return null\n }\n}\n\nexport function removeStalePortFile(portFilePath: string = DEFAULT_PORT_FILE): void {\n try {\n fs.unlinkSync(portFilePath)\n } catch {\n // ignore\n }\n}\n\nexport async function apiCall(\n port: number,\n urlPath: string,\n options?: RequestInit,\n): Promise<Response> {\n const secret = readApiSecret()\n const headers = new Headers(options?.headers)\n if (secret) {\n headers.set('Authorization', `Bearer ${secret}`)\n }\n return fetch(`http://127.0.0.1:${port}${urlPath}`, { ...options, headers })\n}\n"],"mappings":";AAAA,YAAY,QAAQ;AACpB,YAAY,UAAU;AACtB,YAAY,QAAQ;AAEpB,IAAM,oBAAyB,UAAQ,WAAQ,GAAG,YAAY,UAAU;AACxE,IAAM,sBAA2B,UAAQ,WAAQ,GAAG,YAAY,YAAY;AAErE,SAAS,YAAY,eAAuB,mBAAkC;AACnF,MAAI;AACF,UAAM,UAAa,gBAAa,cAAc,OAAO,EAAE,KAAK;AAC5D,UAAM,OAAO,SAAS,SAAS,EAAE;AACjC,WAAO,MAAM,IAAI,IAAI,OAAO;AAAA,EAC9B,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEO,SAAS,cAAc,iBAAyB,qBAAoC;AACzF,MAAI;AACF,UAAM,UAAa,gBAAa,gBAAgB,OAAO,EAAE,KAAK;AAC9D,WAAO,WAAW;AAAA,EACpB,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEO,SAAS,oBAAoB,eAAuB,mBAAyB;AAClF,MAAI;AACF,IAAG,cAAW,YAAY;AAAA,EAC5B,QAAQ;AAAA,EAER;AACF;AAEA,eAAsB,QACpB,MACA,SACA,SACmB;AACnB,QAAM,SAAS,cAAc;AAC7B,QAAM,UAAU,IAAI,QAAQ,SAAS,OAAO;AAC5C,MAAI,QAAQ;AACV,YAAQ,IAAI,iBAAiB,UAAU,MAAM,EAAE;AAAA,EACjD;AACA,SAAO,MAAM,oBAAoB,IAAI,GAAG,OAAO,IAAI,EAAE,GAAG,SAAS,QAAQ,CAAC;AAC5E;","names":[]}
|
package/dist/chunk-WTZDAYZX.js
DELETED
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
expandHome
|
|
3
|
-
} from "./chunk-33RP6K2O.js";
|
|
4
|
-
|
|
5
|
-
// src/core/daemon.ts
|
|
6
|
-
import { spawn } from "child_process";
|
|
7
|
-
import * as fs from "fs";
|
|
8
|
-
import * as path from "path";
|
|
9
|
-
import * as os from "os";
|
|
10
|
-
var DEFAULT_PID_PATH = path.join(os.homedir(), ".openacp", "openacp.pid");
|
|
11
|
-
var DEFAULT_LOG_DIR = path.join(os.homedir(), ".openacp", "logs");
|
|
12
|
-
var RUNNING_MARKER = path.join(os.homedir(), ".openacp", "running");
|
|
13
|
-
function writePidFile(pidPath, pid) {
|
|
14
|
-
const dir = path.dirname(pidPath);
|
|
15
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
16
|
-
fs.writeFileSync(pidPath, String(pid));
|
|
17
|
-
}
|
|
18
|
-
function readPidFile(pidPath) {
|
|
19
|
-
try {
|
|
20
|
-
const content = fs.readFileSync(pidPath, "utf-8").trim();
|
|
21
|
-
const pid = parseInt(content, 10);
|
|
22
|
-
return isNaN(pid) ? null : pid;
|
|
23
|
-
} catch {
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
function removePidFile(pidPath) {
|
|
28
|
-
try {
|
|
29
|
-
fs.unlinkSync(pidPath);
|
|
30
|
-
} catch {
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
function isProcessRunning(pidPath) {
|
|
34
|
-
const pid = readPidFile(pidPath);
|
|
35
|
-
if (pid === null) return false;
|
|
36
|
-
try {
|
|
37
|
-
process.kill(pid, 0);
|
|
38
|
-
return true;
|
|
39
|
-
} catch {
|
|
40
|
-
removePidFile(pidPath);
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
function getStatus(pidPath = DEFAULT_PID_PATH) {
|
|
45
|
-
const pid = readPidFile(pidPath);
|
|
46
|
-
if (pid === null) return { running: false };
|
|
47
|
-
try {
|
|
48
|
-
process.kill(pid, 0);
|
|
49
|
-
return { running: true, pid };
|
|
50
|
-
} catch {
|
|
51
|
-
removePidFile(pidPath);
|
|
52
|
-
return { running: false };
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
function startDaemon(pidPath = DEFAULT_PID_PATH, logDir) {
|
|
56
|
-
markRunning();
|
|
57
|
-
if (isProcessRunning(pidPath)) {
|
|
58
|
-
const pid = readPidFile(pidPath);
|
|
59
|
-
return { error: `Already running (PID ${pid})` };
|
|
60
|
-
}
|
|
61
|
-
const resolvedLogDir = logDir ? expandHome(logDir) : DEFAULT_LOG_DIR;
|
|
62
|
-
fs.mkdirSync(resolvedLogDir, { recursive: true });
|
|
63
|
-
const logFile = path.join(resolvedLogDir, "openacp.log");
|
|
64
|
-
const cliPath = path.resolve(process.argv[1]);
|
|
65
|
-
const nodePath = process.execPath;
|
|
66
|
-
const out = fs.openSync(logFile, "a");
|
|
67
|
-
const err = fs.openSync(logFile, "a");
|
|
68
|
-
const child = spawn(nodePath, [cliPath, "--daemon-child"], {
|
|
69
|
-
detached: true,
|
|
70
|
-
stdio: ["ignore", out, err]
|
|
71
|
-
});
|
|
72
|
-
fs.closeSync(out);
|
|
73
|
-
fs.closeSync(err);
|
|
74
|
-
if (!child.pid) {
|
|
75
|
-
return { error: "Failed to spawn daemon process" };
|
|
76
|
-
}
|
|
77
|
-
writePidFile(pidPath, child.pid);
|
|
78
|
-
child.unref();
|
|
79
|
-
return { pid: child.pid };
|
|
80
|
-
}
|
|
81
|
-
function sleep(ms) {
|
|
82
|
-
return new Promise((resolve2) => setTimeout(resolve2, ms));
|
|
83
|
-
}
|
|
84
|
-
function isProcessAlive(pid) {
|
|
85
|
-
try {
|
|
86
|
-
process.kill(pid, 0);
|
|
87
|
-
return "alive";
|
|
88
|
-
} catch (e) {
|
|
89
|
-
const err = e;
|
|
90
|
-
if (err.code === "EPERM") return "eperm";
|
|
91
|
-
return "dead";
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
async function stopDaemon(pidPath = DEFAULT_PID_PATH) {
|
|
95
|
-
const pid = readPidFile(pidPath);
|
|
96
|
-
if (pid === null) return { stopped: false, error: "Not running (no PID file)" };
|
|
97
|
-
const status = isProcessAlive(pid);
|
|
98
|
-
if (status === "dead") {
|
|
99
|
-
removePidFile(pidPath);
|
|
100
|
-
return { stopped: false, error: "Not running (stale PID file removed)" };
|
|
101
|
-
}
|
|
102
|
-
if (status === "eperm") {
|
|
103
|
-
removePidFile(pidPath);
|
|
104
|
-
return { stopped: false, error: "PID belongs to another process (stale PID file removed)" };
|
|
105
|
-
}
|
|
106
|
-
try {
|
|
107
|
-
process.kill(pid, "SIGTERM");
|
|
108
|
-
} catch (e) {
|
|
109
|
-
return { stopped: false, error: `Failed to stop: ${e.message}` };
|
|
110
|
-
}
|
|
111
|
-
clearRunning();
|
|
112
|
-
const POLL_INTERVAL = 100;
|
|
113
|
-
const TIMEOUT = 5e3;
|
|
114
|
-
const start = Date.now();
|
|
115
|
-
while (Date.now() - start < TIMEOUT) {
|
|
116
|
-
await sleep(POLL_INTERVAL);
|
|
117
|
-
const s = isProcessAlive(pid);
|
|
118
|
-
if (s === "dead" || s === "eperm") {
|
|
119
|
-
removePidFile(pidPath);
|
|
120
|
-
return { stopped: true, pid };
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
try {
|
|
124
|
-
process.kill(pid, "SIGKILL");
|
|
125
|
-
} catch (e) {
|
|
126
|
-
const err = e;
|
|
127
|
-
if (err.code === "EPERM") {
|
|
128
|
-
return { stopped: false, pid, error: "PID may have been reused by another process. Run `openacp status` to verify, or manually delete the PID file." };
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
const killStart = Date.now();
|
|
132
|
-
while (Date.now() - killStart < 1e3) {
|
|
133
|
-
await sleep(POLL_INTERVAL);
|
|
134
|
-
const s = isProcessAlive(pid);
|
|
135
|
-
if (s === "dead" || s === "eperm") {
|
|
136
|
-
removePidFile(pidPath);
|
|
137
|
-
return { stopped: true, pid };
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
return { stopped: false, pid, error: "Process did not exit after SIGKILL (possible uninterruptible I/O). PID file retained." };
|
|
141
|
-
}
|
|
142
|
-
function getPidPath() {
|
|
143
|
-
return DEFAULT_PID_PATH;
|
|
144
|
-
}
|
|
145
|
-
function markRunning() {
|
|
146
|
-
fs.mkdirSync(path.dirname(RUNNING_MARKER), { recursive: true });
|
|
147
|
-
fs.writeFileSync(RUNNING_MARKER, "");
|
|
148
|
-
}
|
|
149
|
-
function clearRunning() {
|
|
150
|
-
try {
|
|
151
|
-
fs.unlinkSync(RUNNING_MARKER);
|
|
152
|
-
} catch {
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
function shouldAutoStart() {
|
|
156
|
-
return fs.existsSync(RUNNING_MARKER);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export {
|
|
160
|
-
writePidFile,
|
|
161
|
-
readPidFile,
|
|
162
|
-
removePidFile,
|
|
163
|
-
isProcessRunning,
|
|
164
|
-
getStatus,
|
|
165
|
-
startDaemon,
|
|
166
|
-
stopDaemon,
|
|
167
|
-
getPidPath,
|
|
168
|
-
markRunning,
|
|
169
|
-
clearRunning,
|
|
170
|
-
shouldAutoStart
|
|
171
|
-
};
|
|
172
|
-
//# sourceMappingURL=chunk-WTZDAYZX.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/core/daemon.ts"],"sourcesContent":["import { spawn } from 'node:child_process'\nimport * as fs from 'node:fs'\nimport * as path from 'node:path'\nimport * as os from 'node:os'\nimport { expandHome } from './config.js'\n\nconst DEFAULT_PID_PATH = path.join(os.homedir(), '.openacp', 'openacp.pid')\nconst DEFAULT_LOG_DIR = path.join(os.homedir(), '.openacp', 'logs')\nconst RUNNING_MARKER = path.join(os.homedir(), '.openacp', 'running')\n\nexport function writePidFile(pidPath: string, pid: number): void {\n const dir = path.dirname(pidPath)\n fs.mkdirSync(dir, { recursive: true })\n fs.writeFileSync(pidPath, String(pid))\n}\n\nexport function readPidFile(pidPath: string): number | null {\n try {\n const content = fs.readFileSync(pidPath, 'utf-8').trim()\n const pid = parseInt(content, 10)\n return isNaN(pid) ? null : pid\n } catch {\n return null\n }\n}\n\nexport function removePidFile(pidPath: string): void {\n try {\n fs.unlinkSync(pidPath)\n } catch {\n // ignore if already gone\n }\n}\n\nexport function isProcessRunning(pidPath: string): boolean {\n const pid = readPidFile(pidPath)\n if (pid === null) return false\n try {\n process.kill(pid, 0)\n return true\n } catch {\n // Process not running, clean up stale PID file\n removePidFile(pidPath)\n return false\n }\n}\n\nexport function getStatus(pidPath: string = DEFAULT_PID_PATH): { running: boolean; pid?: number } {\n const pid = readPidFile(pidPath)\n if (pid === null) return { running: false }\n try {\n process.kill(pid, 0)\n return { running: true, pid }\n } catch {\n removePidFile(pidPath)\n return { running: false }\n }\n}\n\nexport function startDaemon(pidPath: string = DEFAULT_PID_PATH, logDir?: string): { pid: number } | { error: string } {\n // Mark as running so auto-start works on next boot\n markRunning()\n\n // Check if already running\n if (isProcessRunning(pidPath)) {\n const pid = readPidFile(pidPath)!\n return { error: `Already running (PID ${pid})` }\n }\n\n const resolvedLogDir = logDir ? expandHome(logDir) : DEFAULT_LOG_DIR\n fs.mkdirSync(resolvedLogDir, { recursive: true })\n const logFile = path.join(resolvedLogDir, 'openacp.log')\n\n // Find the CLI entry point\n const cliPath = path.resolve(process.argv[1])\n const nodePath = process.execPath\n\n const out = fs.openSync(logFile, 'a')\n const err = fs.openSync(logFile, 'a')\n\n const child = spawn(nodePath, [cliPath, '--daemon-child'], {\n detached: true,\n stdio: ['ignore', out, err],\n })\n\n // Close file descriptors in parent — child has its own copies\n fs.closeSync(out)\n fs.closeSync(err)\n\n if (!child.pid) {\n return { error: 'Failed to spawn daemon process' }\n }\n\n // PID file is written by the child process itself (in main.ts startServer)\n // to avoid race conditions and ensure consistency with LaunchAgent/systemd starts.\n // We still write it here as a fallback in case the child hasn't written it yet\n // when the parent needs to report the PID.\n writePidFile(pidPath, child.pid)\n child.unref()\n\n return { pid: child.pid }\n}\n\nfunction sleep(ms: number): Promise<void> {\n return new Promise(resolve => setTimeout(resolve, ms))\n}\n\nfunction isProcessAlive(pid: number): 'alive' | 'dead' | 'eperm' {\n try {\n process.kill(pid, 0)\n return 'alive'\n } catch (e) {\n const err = e as NodeJS.ErrnoException\n if (err.code === 'EPERM') return 'eperm'\n return 'dead'\n }\n}\n\nexport async function stopDaemon(pidPath: string = DEFAULT_PID_PATH): Promise<{ stopped: boolean; pid?: number; error?: string }> {\n const pid = readPidFile(pidPath)\n if (pid === null) return { stopped: false, error: 'Not running (no PID file)' }\n\n const status = isProcessAlive(pid)\n if (status === 'dead') {\n removePidFile(pidPath)\n return { stopped: false, error: 'Not running (stale PID file removed)' }\n }\n if (status === 'eperm') {\n removePidFile(pidPath)\n return { stopped: false, error: 'PID belongs to another process (stale PID file removed)' }\n }\n\n try {\n process.kill(pid, 'SIGTERM')\n } catch (e) {\n return { stopped: false, error: `Failed to stop: ${(e as Error).message}` }\n }\n\n clearRunning()\n\n const POLL_INTERVAL = 100\n const TIMEOUT = 5000\n const start = Date.now()\n\n while (Date.now() - start < TIMEOUT) {\n await sleep(POLL_INTERVAL)\n const s = isProcessAlive(pid)\n if (s === 'dead' || s === 'eperm') {\n removePidFile(pidPath)\n return { stopped: true, pid }\n }\n }\n\n try {\n process.kill(pid, 'SIGKILL')\n } catch (e) {\n const err = e as NodeJS.ErrnoException\n if (err.code === 'EPERM') {\n return { stopped: false, pid, error: 'PID may have been reused by another process. Run `openacp status` to verify, or manually delete the PID file.' }\n }\n }\n\n const killStart = Date.now()\n while (Date.now() - killStart < 1000) {\n await sleep(POLL_INTERVAL)\n const s = isProcessAlive(pid)\n if (s === 'dead' || s === 'eperm') {\n removePidFile(pidPath)\n return { stopped: true, pid }\n }\n }\n\n // SIGKILL sent but process still alive after 1s — extremely rare (uninterruptible I/O).\n return { stopped: false, pid, error: 'Process did not exit after SIGKILL (possible uninterruptible I/O). PID file retained.' }\n}\n\nexport function getPidPath(): string {\n return DEFAULT_PID_PATH\n}\n\n/** Mark that the daemon should auto-start on boot */\nexport function markRunning(): void {\n fs.mkdirSync(path.dirname(RUNNING_MARKER), { recursive: true })\n fs.writeFileSync(RUNNING_MARKER, '')\n}\n\n/** Remove running marker — daemon won't auto-start on boot */\nexport function clearRunning(): void {\n try { fs.unlinkSync(RUNNING_MARKER) } catch { /* ignore */ }\n}\n\n/** Check if the daemon was running before (should auto-start on boot) */\nexport function shouldAutoStart(): boolean {\n return fs.existsSync(RUNNING_MARKER)\n}\n"],"mappings":";;;;;AAAA,SAAS,aAAa;AACtB,YAAY,QAAQ;AACpB,YAAY,UAAU;AACtB,YAAY,QAAQ;AAGpB,IAAM,mBAAwB,UAAQ,WAAQ,GAAG,YAAY,aAAa;AAC1E,IAAM,kBAAuB,UAAQ,WAAQ,GAAG,YAAY,MA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rC;","names":["resolve"]}
|
package/dist/chunk-XANPHG7W.js
DELETED
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
buildSessionControlKeyboard
|
|
3
|
-
} from "./chunk-KIRH7TUJ.js";
|
|
4
|
-
import {
|
|
5
|
-
createSessionThread,
|
|
6
|
-
deleteSessionThread
|
|
7
|
-
} from "./chunk-BNLGTZ34.js";
|
|
8
|
-
import {
|
|
9
|
-
log
|
|
10
|
-
} from "./chunk-GAK6PIBW.js";
|
|
11
|
-
|
|
12
|
-
// src/adapters/discord/commands/new-session.ts
|
|
13
|
-
import {
|
|
14
|
-
ActionRowBuilder,
|
|
15
|
-
ButtonBuilder,
|
|
16
|
-
ButtonStyle
|
|
17
|
-
} from "discord.js";
|
|
18
|
-
async function handleNew(interaction, adapter) {
|
|
19
|
-
await interaction.deferReply({ ephemeral: true });
|
|
20
|
-
const agentName = interaction.options.getString("agent") ?? void 0;
|
|
21
|
-
const workspace = interaction.options.getString("workspace") ?? void 0;
|
|
22
|
-
if (agentName) {
|
|
23
|
-
await executeNewSession(interaction, adapter, agentName, workspace);
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
const installedEntries = adapter.core.agentCatalog.getInstalledEntries();
|
|
27
|
-
const agentKeys = Object.keys(installedEntries);
|
|
28
|
-
const config = adapter.core.configManager.get();
|
|
29
|
-
if (agentKeys.length === 0) {
|
|
30
|
-
await interaction.editReply("\u274C No agents installed. Use `/install` to install an agent first.");
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
if (agentKeys.length === 1) {
|
|
34
|
-
await executeNewSession(interaction, adapter, config.defaultAgent, workspace);
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
const row = new ActionRowBuilder();
|
|
38
|
-
for (const key of agentKeys) {
|
|
39
|
-
const agent = installedEntries[key];
|
|
40
|
-
const label = key === config.defaultAgent ? `${agent.name} (default)` : agent.name;
|
|
41
|
-
row.addComponents(
|
|
42
|
-
new ButtonBuilder().setCustomId(`m:new:agent:${key}`).setLabel(label).setStyle(ButtonStyle.Primary)
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
await interaction.editReply({
|
|
46
|
-
content: "\u{1F916} **Choose an agent:**",
|
|
47
|
-
components: [row]
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
async function handleNewChat(interaction, adapter) {
|
|
51
|
-
await interaction.deferReply({ ephemeral: true });
|
|
52
|
-
const channelId = interaction.channelId;
|
|
53
|
-
const currentSession = adapter.core.sessionManager.getSessionByThread("discord", channelId);
|
|
54
|
-
let agentName;
|
|
55
|
-
let workspace;
|
|
56
|
-
if (currentSession) {
|
|
57
|
-
agentName = currentSession.agentName;
|
|
58
|
-
workspace = currentSession.workingDirectory;
|
|
59
|
-
} else {
|
|
60
|
-
const record = adapter.core.sessionManager.getRecordByThread("discord", channelId);
|
|
61
|
-
if (!record || record.status === "cancelled" || record.status === "error") {
|
|
62
|
-
await interaction.editReply("No active session in this channel. Use `/new` to start one.");
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
agentName = record.agentName;
|
|
66
|
-
workspace = record.workingDir;
|
|
67
|
-
}
|
|
68
|
-
await executeNewSession(interaction, adapter, agentName, workspace);
|
|
69
|
-
}
|
|
70
|
-
async function executeNewSession(interaction, adapter, agentName, workspace) {
|
|
71
|
-
const config = adapter.core.configManager.get();
|
|
72
|
-
const resolvedAgent = agentName || config.defaultAgent;
|
|
73
|
-
log.info({ agentName: resolvedAgent, workspace }, "[discord-new-session] Creating session");
|
|
74
|
-
const forumChannel = adapter.getForumChannel();
|
|
75
|
-
if (!forumChannel) {
|
|
76
|
-
const msg = "\u274C Forum channel not configured. Please run setup first.";
|
|
77
|
-
if (interaction.deferred || interaction.replied) {
|
|
78
|
-
await interaction.editReply(msg);
|
|
79
|
-
} else {
|
|
80
|
-
await interaction.reply({ content: msg, ephemeral: true });
|
|
81
|
-
}
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
let thread;
|
|
85
|
-
try {
|
|
86
|
-
thread = await createSessionThread(forumChannel, `\u{1F504} ${resolvedAgent} \u2014 New Session`);
|
|
87
|
-
const session = await adapter.core.handleNewSession("discord", resolvedAgent, workspace);
|
|
88
|
-
session.threadId = thread.id;
|
|
89
|
-
await adapter.core.sessionManager.patchRecord(session.id, {
|
|
90
|
-
platform: { threadId: thread.id }
|
|
91
|
-
});
|
|
92
|
-
const controlRow = buildSessionControlKeyboard(session.id, false, false);
|
|
93
|
-
await thread.send({
|
|
94
|
-
content: `\u2705 **Session started**
|
|
95
|
-
**Agent:** ${session.agentName}
|
|
96
|
-
**Workspace:** \`${session.workingDirectory}\`
|
|
97
|
-
|
|
98
|
-
This is your coding session \u2014 chat here to work with the agent.`,
|
|
99
|
-
components: [controlRow]
|
|
100
|
-
});
|
|
101
|
-
const replyMsg = `\u2705 Session created \u2192 [Open thread](https://discord.com/channels/${adapter.getGuildId()}/${thread.id})`;
|
|
102
|
-
if (interaction.deferred || interaction.replied) {
|
|
103
|
-
await interaction.editReply(replyMsg);
|
|
104
|
-
} else {
|
|
105
|
-
await interaction.reply({ content: replyMsg, ephemeral: true });
|
|
106
|
-
}
|
|
107
|
-
session.warmup().catch((err) => log.error({ err }, "[discord-new-session] Warm-up error"));
|
|
108
|
-
} catch (err) {
|
|
109
|
-
log.error({ err }, "[discord-new-session] Session creation failed");
|
|
110
|
-
if (thread) {
|
|
111
|
-
try {
|
|
112
|
-
await deleteSessionThread(adapter.getGuild(), thread.id);
|
|
113
|
-
} catch {
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
const errMsg = `\u274C ${err instanceof Error ? err.message : String(err)}`;
|
|
117
|
-
try {
|
|
118
|
-
if (interaction.deferred || interaction.replied) {
|
|
119
|
-
await interaction.editReply(errMsg);
|
|
120
|
-
} else {
|
|
121
|
-
await interaction.reply({ content: errMsg, ephemeral: true });
|
|
122
|
-
}
|
|
123
|
-
} catch {
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
async function handleNewSessionButton(interaction, adapter) {
|
|
128
|
-
const { customId } = interaction;
|
|
129
|
-
if (customId.startsWith("m:new:agent:")) {
|
|
130
|
-
const agentKey = customId.replace("m:new:agent:", "");
|
|
131
|
-
try {
|
|
132
|
-
await interaction.deferUpdate();
|
|
133
|
-
} catch {
|
|
134
|
-
}
|
|
135
|
-
await executeNewSession(interaction, adapter, agentKey, void 0);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export {
|
|
140
|
-
handleNew,
|
|
141
|
-
handleNewChat,
|
|
142
|
-
executeNewSession,
|
|
143
|
-
handleNewSessionButton
|
|
144
|
-
};
|
|
145
|
-
//# sourceMappingURL=chunk-XANPHG7W.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/adapters/discord/commands/new-session.ts"],"sourcesContent":["import {\n ActionRowBuilder,\n ButtonBuilder,\n ButtonStyle,\n} from 'discord.js'\nimport type { ChatInputCommandInteraction, ButtonInteraction } from 'discord.js'\nimport { log } from '../../../core/log.js'\nimport { buildSessionControlKeyboard } from './admin.js'\nimport { createSessionThread, deleteSessionThread } from '../forums.js'\nimport type { DiscordAdapter } from '../adapter.js'\n\nexport async function handleNew(\n interaction: ChatInputCommandInteraction,\n adapter: DiscordAdapter,\n): Promise<void> {\n await interaction.deferReply({ ephemeral: true })\n\n const agentName = interaction.options.getString('agent') ?? undefined\n const workspace = interaction.options.getString('workspace') ?? undefined\n\n if (agentName) {\n await executeNewSession(interaction, adapter, agentName, workspace)\n return\n }\n\n // No agent specified — show agent picker\n const installedEntries = adapter.core.agentCatalog.getInstalledEntries()\n const agentKeys = Object.keys(installedEntries)\n const config = adapter.core.configManager.get()\n\n if (agentKeys.length === 0) {\n await interaction.editReply('❌ No agents installed. Use `/install` to install an agent first.')\n return\n }\n\n if (agentKeys.length === 1) {\n await executeNewSession(interaction, adapter, config.defaultAgent, workspace)\n return\n }\n\n // Multiple agents — show picker buttons\n const row = new ActionRowBuilder<ButtonBuilder>()\n for (const key of agentKeys) {\n const agent = installedEntries[key]!\n const label = key === config.defaultAgent ? `${agent.name} (default)` : agent.name\n row.addComponents(\n new ButtonBuilder()\n .setCustomId(`m:new:agent:${key}`)\n .setLabel(label)\n .setStyle(ButtonStyle.Primary),\n )\n }\n\n await interaction.editReply({\n content: '🤖 **Choose an agent:**',\n components: [row],\n })\n}\n\nexport async function handleNewChat(\n interaction: ChatInputCommandInteraction,\n adapter: DiscordAdapter,\n): Promise<void> {\n await interaction.deferReply({ ephemeral: true })\n\n // Get current thread to inherit config from\n const channelId = interaction.channelId\n const currentSession = adapter.core.sessionManager.getSessionByThread('discord', channelId)\n\n let agentName: string | undefined\n let workspace: string | undefined\n\n if (currentSession) {\n agentName = currentSession.agentName\n workspace = currentSession.workingDirectory\n } else {\n const record = adapter.core.sessionManager.getRecordByThread('discord', channelId)\n if (!record || record.status === 'cancelled' || record.status === 'error') {\n await interaction.editReply('No active session in this channel. Use `/new` to start one.')\n return\n }\n agentName = record.agentName\n workspace = record.workingDir\n }\n\n await executeNewSession(interaction, adapter, agentName, workspace)\n}\n\nexport async function executeNewSession(\n interaction: ChatInputCommandInteraction | ButtonInteraction,\n adapter: DiscordAdapter,\n agentName?: string,\n workspace?: string,\n): Promise<void> {\n const config = adapter.core.configManager.get()\n const resolvedAgent = agentName || config.defaultAgent\n\n log.info({ agentName: resolvedAgent, workspace }, '[discord-new-session] Creating session')\n\n const forumChannel = adapter.getForumChannel()\n if (!forumChannel) {\n const msg = '❌ Forum channel not configured. Please run setup first.'\n if (interaction.deferred || interaction.replied) {\n await interaction.editReply(msg)\n } else {\n await (interaction as ChatInputCommandInteraction).reply({ content: msg, ephemeral: true })\n }\n return\n }\n\n let thread: import('discord.js').ThreadChannel | undefined\n\n try {\n // Create forum thread BEFORE creating session to avoid race condition\n thread = await createSessionThread(forumChannel, `🔄 ${resolvedAgent} — New Session`)\n\n // Create session via core\n const session = await adapter.core.handleNewSession('discord', resolvedAgent, workspace)\n session.threadId = thread.id\n\n // Patch platform record with Discord thread ID\n await adapter.core.sessionManager.patchRecord(session.id, {\n platform: { threadId: thread.id },\n })\n\n // Send welcome message in the new thread\n const controlRow = buildSessionControlKeyboard(session.id, false, false)\n await thread.send({\n content:\n `✅ **Session started**\\n` +\n `**Agent:** ${session.agentName}\\n` +\n `**Workspace:** \\`${session.workingDirectory}\\`\\n\\n` +\n `This is your coding session — chat here to work with the agent.`,\n components: [controlRow],\n })\n\n // Reply to the interaction with a link to the thread\n const replyMsg = `✅ Session created → [Open thread](https://discord.com/channels/${adapter.getGuildId()}/${thread.id})`\n if (interaction.deferred || interaction.replied) {\n await interaction.editReply(replyMsg)\n } else {\n await (interaction as ChatInputCommandInteraction).reply({ content: replyMsg, ephemeral: true })\n }\n\n // Warm up model cache in background\n session.warmup().catch((err: unknown) => log.error({ err }, '[discord-new-session] Warm-up error'))\n } catch (err) {\n log.error({ err }, '[discord-new-session] Session creation failed')\n\n // Clean up orphaned thread on failure (archive+lock instead of permanent delete)\n if (thread) {\n try { await deleteSessionThread(adapter.getGuild(), thread.id) } catch { /* ignore */ }\n }\n\n const errMsg = `❌ ${err instanceof Error ? err.message : String(err)}`\n try {\n if (interaction.deferred || interaction.replied) {\n await interaction.editReply(errMsg)\n } else {\n await (interaction as ChatInputCommandInteraction).reply({ content: errMsg, ephemeral: true })\n }\n } catch { /* ignore */ }\n }\n}\n\nexport async function handleNewSessionButton(\n interaction: ButtonInteraction,\n adapter: DiscordAdapter,\n): Promise<void> {\n const { customId } = interaction\n\n if (customId.startsWith('m:new:agent:')) {\n const agentKey = customId.replace('m:new:agent:', '')\n try { await interaction.deferUpdate() } catch { /* ignore */ }\n await executeNewSession(interaction, adapter, agentKey, undefined)\n }\n}\n"],"mappings":";;;;;;;;;;;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAOP,eAAsB,UACpB,aACA,SACe;AACf,QAAM,YAAY,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export {
|
|
10
|
-
ConfigManager,
|
|
11
|
-
ConfigSchema,
|
|
12
|
-
PLUGINS_DIR,
|
|
13
|
-
expandHome
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=config-6S355X75.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
runConfigEditor
|
|
3
|
-
} from "./chunk-MKHUZLII.js";
|
|
4
|
-
import "./chunk-2CJ46J3C.js";
|
|
5
|
-
import "./chunk-LCRLAV4G.js";
|
|
6
|
-
import "./chunk-JKBFUAJK.js";
|
|
7
|
-
import "./chunk-33RP6K2O.js";
|
|
8
|
-
import "./chunk-GAK6PIBW.js";
|
|
9
|
-
import "./chunk-VUNV25KB.js";
|
|
10
|
-
export {
|
|
11
|
-
runConfigEditor
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=config-editor-QQTZMWGD.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CONFIG_REGISTRY,
|
|
3
|
-
getConfigValue,
|
|
4
|
-
getFieldDef,
|
|
5
|
-
getSafeFields,
|
|
6
|
-
isHotReloadable,
|
|
7
|
-
resolveOptions
|
|
8
|
-
} from "./chunk-JHYXKVV2.js";
|
|
9
|
-
import "./chunk-VUNV25KB.js";
|
|
10
|
-
export {
|
|
11
|
-
CONFIG_REGISTRY,
|
|
12
|
-
getConfigValue,
|
|
13
|
-
getFieldDef,
|
|
14
|
-
getSafeFields,
|
|
15
|
-
isHotReloadable,
|
|
16
|
-
resolveOptions
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=config-registry-AHYI4MYL.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/daemon-4CS6HMB5.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
clearRunning,
|
|
3
|
-
getPidPath,
|
|
4
|
-
getStatus,
|
|
5
|
-
isProcessRunning,
|
|
6
|
-
markRunning,
|
|
7
|
-
readPidFile,
|
|
8
|
-
removePidFile,
|
|
9
|
-
shouldAutoStart,
|
|
10
|
-
startDaemon,
|
|
11
|
-
stopDaemon,
|
|
12
|
-
writePidFile
|
|
13
|
-
} from "./chunk-WTZDAYZX.js";
|
|
14
|
-
import "./chunk-33RP6K2O.js";
|
|
15
|
-
import "./chunk-GAK6PIBW.js";
|
|
16
|
-
import "./chunk-VUNV25KB.js";
|
|
17
|
-
export {
|
|
18
|
-
clearRunning,
|
|
19
|
-
getPidPath,
|
|
20
|
-
getStatus,
|
|
21
|
-
isProcessRunning,
|
|
22
|
-
markRunning,
|
|
23
|
-
readPidFile,
|
|
24
|
-
removePidFile,
|
|
25
|
-
shouldAutoStart,
|
|
26
|
-
startDaemon,
|
|
27
|
-
stopDaemon,
|
|
28
|
-
writePidFile
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=daemon-4CS6HMB5.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|