replicas-engine 0.1.33 → 0.1.35
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/src/index.js +11 -2
- package/package.json +1 -1
package/dist/src/index.js
CHANGED
|
@@ -746,12 +746,19 @@ function inferMediaType(url, contentType) {
|
|
|
746
746
|
}
|
|
747
747
|
async function fetchImageAsBase64(url) {
|
|
748
748
|
const headers = {};
|
|
749
|
-
|
|
749
|
+
const hostname = new URL(url).hostname;
|
|
750
|
+
if (hostname === "uploads.linear.app") {
|
|
750
751
|
const token = process.env.LINEAR_TOKEN;
|
|
751
752
|
if (token) {
|
|
752
753
|
headers["Authorization"] = `Bearer ${token}`;
|
|
753
754
|
}
|
|
754
755
|
}
|
|
756
|
+
if (hostname === "files.slack.com") {
|
|
757
|
+
const token = process.env.SLACK_BOT_TOKEN;
|
|
758
|
+
if (token) {
|
|
759
|
+
headers["Authorization"] = `Bearer ${token}`;
|
|
760
|
+
}
|
|
761
|
+
}
|
|
755
762
|
const response = await fetch(url, { headers });
|
|
756
763
|
if (!response.ok) {
|
|
757
764
|
throw new Error(`Failed to fetch image from ${url}: ${response.status} ${response.statusText}`);
|
|
@@ -1655,6 +1662,8 @@ var ClaudeManager = class {
|
|
|
1655
1662
|
cwd: this.workingDirectory,
|
|
1656
1663
|
permissionMode: permissionMode === "read" ? "plan" : "bypassPermissions",
|
|
1657
1664
|
allowDangerouslySkipPermissions: permissionMode !== "read",
|
|
1665
|
+
// Disable tools that require user input - this is a background agent
|
|
1666
|
+
disallowedTools: ["ExitPlanMode", "AskUserQuestion"],
|
|
1658
1667
|
settingSources: ["user", "project", "local"],
|
|
1659
1668
|
systemPrompt: {
|
|
1660
1669
|
type: "preset",
|
|
@@ -1948,7 +1957,7 @@ async function listPlans() {
|
|
|
1948
1957
|
await ensurePlansDir();
|
|
1949
1958
|
try {
|
|
1950
1959
|
const files = [...await readdir2(PLANS_DIR), ...await readdir2(CLAUDE_PLANS_DIR)];
|
|
1951
|
-
return files.filter((file) => file
|
|
1960
|
+
return files.filter((file) => isValidFilename(file)).sort((a, b) => a.localeCompare(b));
|
|
1952
1961
|
} catch {
|
|
1953
1962
|
return [];
|
|
1954
1963
|
}
|