chore: fork @llblab/[email protected].0 as @evandrodevbr/oh-my-pi-telegram
Fork of upstream llblab/[email protected].0 (SHA afe09c5) repackaged as a drop-in extension for can1357/oh-my-pi (omp >= 16.5.2). Changes vs upstream: - Rename package: @llblab/pi-telegram -> @evandrodevbr/oh-my-pi-telegram - Bump version: 0.22.0 -> 0.22.0-evandro.1 - Update repository/homepage/bugs URLs to evandrodevbr - Add omp field in package.json (displayName + compatibleWith) - README: prepend 'Oh My Pi (omp) Compatibility' section with install commands, verified-components table, upstream lineage, and rationale - CHANGELOG: add '0.22.0-evandro.1' entry under Unreleased - docs/: rename @llblab/pi-telegram imports to @evandrodevbr/oh-my-pi-telegram - tests/public-api.test.ts: rename package import paths Gates re-run on the fork: - npm run typecheck -> tsc --noEmit (success) - npm test -> 1229 pass / 0 fail / 1 platform-only skip - npm run audit -> found 0 vulnerabilities - npm run pack:check -> evandrodevbr-oh-my-pi-telegram-0.22.0-evandro.1.tgz Verified: - omp install --link ./pi-telegram -> Linked OK - omp plugin list -> @evandrodevbr/[email protected].0-evandro.1 Upstream lineage: badlogic/pi-telegram -> llblab/pi-telegram (0.22.0) -> evandrodevbr/oh-my-pi-telegram (this fork)
This commit is contained in:
commit
d1d04001d0
155 files changed
+107848
No files matched your search
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
* Regression tests for Telegram bridge path resolution
|
||||
* Guards agent-dir detection for Pi-compatible runtimes and path derivation helpers.
|
||||
*/
|
||||
|
||||
import assert from "node:assert/strict";
|
||||
import { homedir } from "node:os";
|
||||
import { join, resolve } from "node:path";
|
||||
import test from "node:test";
|
||||
|
||||
import {
|
||||
resolveAgentDir,
|
||||
resolveTelegramConfigPath,
|
||||
resolveTelegramLocksPath,
|
||||
resolveTelegramTempDir,
|
||||
resolveTelegramRuntimeLogPath,
|
||||
} from "../lib/paths.ts";
|
||||
|
||||
await test("resolveAgentDir", async (t) => {
|
||||
await t.test("returns PI_CODING_AGENT_DIR when env is set", () => {
|
||||
assert.equal(
|
||||
resolveAgentDir({
|
||||
env: { PI_CODING_AGENT_DIR: "/custom/agent/dir" },
|
||||
execPath: "/usr/bin/omp",
|
||||
argv: ["omp"],
|
||||
}),
|
||||
resolve("/custom/agent/dir"),
|
||||
);
|
||||
});
|
||||
|
||||
await t.test("returns ~/.omp/agent for OMP-compatible runtimes", () => {
|
||||
assert.equal(
|
||||
resolveAgentDir({ env: {}, execPath: "/home/user/.local/bin/omp" }),
|
||||
join(homedir(), ".omp", "agent"),
|
||||
);
|
||||
assert.equal(
|
||||
resolveAgentDir({
|
||||
env: {},
|
||||
execPath: "/usr/bin/node",
|
||||
argv: ["node", "omp"],
|
||||
}),
|
||||
join(homedir(), ".omp", "agent"),
|
||||
);
|
||||
});
|
||||
|
||||
await t.test(
|
||||
"returns ~/.pi/agent as fallback when no env and no OMP runtime",
|
||||
() => {
|
||||
assert.equal(
|
||||
resolveAgentDir({ env: {}, execPath: "/usr/bin/node", argv: ["node"] }),
|
||||
join(homedir(), ".pi", "agent"),
|
||||
);
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
await test("resolveTelegramConfigPath", () => {
|
||||
assert.ok(
|
||||
resolveTelegramConfigPath().endsWith("telegram.json"),
|
||||
"config path ends with telegram.json",
|
||||
);
|
||||
});
|
||||
|
||||
await test("resolveTelegramLocksPath", () => {
|
||||
assert.ok(
|
||||
resolveTelegramLocksPath().endsWith("locks.json"),
|
||||
"locks path ends with locks.json",
|
||||
);
|
||||
});
|
||||
|
||||
await test("resolveTelegramTempDir", () => {
|
||||
assert.ok(
|
||||
resolveTelegramTempDir().endsWith("/tmp/telegram"),
|
||||
"temp dir ends with /tmp/telegram",
|
||||
);
|
||||
});
|
||||
|
||||
await test("resolveTelegramRuntimeLogPath", () => {
|
||||
assert.ok(
|
||||
resolveTelegramRuntimeLogPath().endsWith("/tmp/telegram/logs.jsonl"),
|
||||
"runtime log path ends with logs.jsonl",
|
||||
);
|
||||
});
|
||||
Reference in new issue
Block a user