@hasna/oldpal 0.6.3 → 0.6.5
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/index.js +39 -14
- package/dist/index.js.map +6 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28828,12 +28828,37 @@ class ToolRegistry {
|
|
|
28828
28828
|
// packages/core/src/tools/connector.ts
|
|
28829
28829
|
import { homedir } from "os";
|
|
28830
28830
|
import { join } from "path";
|
|
28831
|
+
import { readdirSync } from "fs";
|
|
28831
28832
|
|
|
28832
28833
|
class ConnectorBridge {
|
|
28833
28834
|
connectors = new Map;
|
|
28834
28835
|
static cache = new Map;
|
|
28836
|
+
autoDiscoverConnectorNames() {
|
|
28837
|
+
const connectorNames = new Set;
|
|
28838
|
+
const pathDirs = (process.env.PATH || "").split(":");
|
|
28839
|
+
const extraDirs = [
|
|
28840
|
+
join(homedir(), ".bun", "bin"),
|
|
28841
|
+
join(homedir(), ".npm-global", "bin"),
|
|
28842
|
+
"/usr/local/bin"
|
|
28843
|
+
];
|
|
28844
|
+
const allDirs = [...new Set([...pathDirs, ...extraDirs])];
|
|
28845
|
+
for (const dir of allDirs) {
|
|
28846
|
+
try {
|
|
28847
|
+
const files = readdirSync(dir);
|
|
28848
|
+
for (const file of files) {
|
|
28849
|
+
if (file.startsWith("connect-")) {
|
|
28850
|
+
const name = file.replace("connect-", "");
|
|
28851
|
+
if (name && !name.includes(".") && name.length > 1) {
|
|
28852
|
+
connectorNames.add(name);
|
|
28853
|
+
}
|
|
28854
|
+
}
|
|
28855
|
+
}
|
|
28856
|
+
} catch {}
|
|
28857
|
+
}
|
|
28858
|
+
return Array.from(connectorNames);
|
|
28859
|
+
}
|
|
28835
28860
|
async discover(connectorNames) {
|
|
28836
|
-
const names = connectorNames
|
|
28861
|
+
const names = connectorNames && connectorNames.length > 0 ? connectorNames : this.autoDiscoverConnectorNames();
|
|
28837
28862
|
if (names.length === 0) {
|
|
28838
28863
|
return [];
|
|
28839
28864
|
}
|
|
@@ -30069,8 +30094,8 @@ class HookExecutor {
|
|
|
30069
30094
|
}
|
|
30070
30095
|
}
|
|
30071
30096
|
// packages/core/src/commands/loader.ts
|
|
30072
|
-
import { existsSync as existsSync3, readdirSync, statSync } from "fs";
|
|
30073
|
-
import { join as join5, basename, extname } from "path";
|
|
30097
|
+
import { existsSync as existsSync3, readdirSync as readdirSync2, statSync as statSync2 } from "fs";
|
|
30098
|
+
import { join as join5, basename as basename2, extname } from "path";
|
|
30074
30099
|
import { homedir as homedir5 } from "os";
|
|
30075
30100
|
|
|
30076
30101
|
class CommandLoader {
|
|
@@ -30089,10 +30114,10 @@ class CommandLoader {
|
|
|
30089
30114
|
async loadFromDirectory(dir, source, prefix = "") {
|
|
30090
30115
|
if (!existsSync3(dir))
|
|
30091
30116
|
return;
|
|
30092
|
-
const entries =
|
|
30117
|
+
const entries = readdirSync2(dir);
|
|
30093
30118
|
for (const entry of entries) {
|
|
30094
30119
|
const fullPath = join5(dir, entry);
|
|
30095
|
-
const stat =
|
|
30120
|
+
const stat = statSync2(fullPath);
|
|
30096
30121
|
if (stat.isDirectory()) {
|
|
30097
30122
|
const newPrefix = prefix ? `${prefix}:${entry}` : entry;
|
|
30098
30123
|
await this.loadFromDirectory(fullPath, source, newPrefix);
|
|
@@ -30108,7 +30133,7 @@ class CommandLoader {
|
|
|
30108
30133
|
try {
|
|
30109
30134
|
const content = await Bun.file(filePath).text();
|
|
30110
30135
|
const { frontmatter, body } = this.parseFrontmatter(content);
|
|
30111
|
-
const fileName =
|
|
30136
|
+
const fileName = basename2(filePath, ".md");
|
|
30112
30137
|
const name = frontmatter.name || (prefix ? `${prefix}:${fileName}` : fileName);
|
|
30113
30138
|
return {
|
|
30114
30139
|
name,
|
|
@@ -30272,7 +30297,7 @@ ${stderr}`;
|
|
|
30272
30297
|
import { join as join6 } from "path";
|
|
30273
30298
|
import { homedir as homedir6, platform as platform2, release, arch } from "os";
|
|
30274
30299
|
import { existsSync as existsSync4, mkdirSync, writeFileSync as writeFileSync2 } from "fs";
|
|
30275
|
-
var VERSION = "0.6.
|
|
30300
|
+
var VERSION = "0.6.5";
|
|
30276
30301
|
|
|
30277
30302
|
class BuiltinCommands {
|
|
30278
30303
|
tokenUsage = {
|
|
@@ -31368,7 +31393,7 @@ class AgentLoop {
|
|
|
31368
31393
|
init_anthropic();
|
|
31369
31394
|
|
|
31370
31395
|
// packages/core/src/logger.ts
|
|
31371
|
-
import { existsSync as existsSync6, mkdirSync as mkdirSync2, appendFileSync, readdirSync as
|
|
31396
|
+
import { existsSync as existsSync6, mkdirSync as mkdirSync2, appendFileSync, readdirSync as readdirSync3, readFileSync as readFileSync3 } from "fs";
|
|
31372
31397
|
import { join as join9 } from "path";
|
|
31373
31398
|
import { homedir as homedir9 } from "os";
|
|
31374
31399
|
|
|
@@ -31456,7 +31481,7 @@ class SessionStorage {
|
|
|
31456
31481
|
if (!existsSync6(sessionsDir))
|
|
31457
31482
|
return [];
|
|
31458
31483
|
const sessions = [];
|
|
31459
|
-
const files =
|
|
31484
|
+
const files = readdirSync3(sessionsDir);
|
|
31460
31485
|
for (const file of files) {
|
|
31461
31486
|
if (!file.endsWith(".json"))
|
|
31462
31487
|
continue;
|
|
@@ -32980,10 +33005,10 @@ function App2({ cwd: cwd2 }) {
|
|
|
32980
33005
|
timestamp: now()
|
|
32981
33006
|
};
|
|
32982
33007
|
activityLogRef.current = [...activityLogRef.current, textEntry];
|
|
33008
|
+
responseRef.current = "";
|
|
32983
33009
|
}
|
|
32984
33010
|
const fullContent = activityLogRef.current.filter((e) => e.type === "text").map((e) => e.content).join(`
|
|
32985
|
-
`)
|
|
32986
|
-
` + responseRef.current : "");
|
|
33011
|
+
`);
|
|
32987
33012
|
if (fullContent.trim() || toolCallsRef.current.length > 0) {
|
|
32988
33013
|
setMessages((prev) => [
|
|
32989
33014
|
...prev,
|
|
@@ -33291,7 +33316,7 @@ function App2({ cwd: cwd2 }) {
|
|
|
33291
33316
|
padding: 1,
|
|
33292
33317
|
children: [
|
|
33293
33318
|
showWelcome && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(WelcomeBanner, {
|
|
33294
|
-
version: "0.6.
|
|
33319
|
+
version: "0.6.5",
|
|
33295
33320
|
model: "claude-sonnet-4",
|
|
33296
33321
|
directory: activeSession?.cwd || cwd2
|
|
33297
33322
|
}, undefined, false, undefined, this),
|
|
@@ -33522,7 +33547,7 @@ function formatStreamEvent(chunk) {
|
|
|
33522
33547
|
|
|
33523
33548
|
// packages/terminal/src/index.tsx
|
|
33524
33549
|
var jsx_dev_runtime10 = __toESM(require_jsx_dev_runtime(), 1);
|
|
33525
|
-
var VERSION3 = "0.6.
|
|
33550
|
+
var VERSION3 = "0.6.5";
|
|
33526
33551
|
function parseArgs(argv) {
|
|
33527
33552
|
const args = argv.slice(2);
|
|
33528
33553
|
const options = {
|
|
@@ -33671,4 +33696,4 @@ if (options.print !== null) {
|
|
|
33671
33696
|
});
|
|
33672
33697
|
}
|
|
33673
33698
|
|
|
33674
|
-
//# debugId=
|
|
33699
|
+
//# debugId=ADFFC68BF16F8E6264756E2164756E21
|