sisyphi 1.2.14 → 1.2.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/cli.js +130 -108
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +46 -11
- package/dist/daemon.js.map +1 -1
- package/dist/tui.js +11 -5
- package/dist/tui.js.map +1 -1
- package/package.json +1 -1
package/dist/daemon.js
CHANGED
|
@@ -338,11 +338,11 @@ var init_config = __esm({
|
|
|
338
338
|
"use strict";
|
|
339
339
|
init_paths();
|
|
340
340
|
DEFAULT_CONFIG = {
|
|
341
|
-
model: "claude-opus-4-
|
|
341
|
+
model: "claude-opus-4-8[1m]",
|
|
342
342
|
pollIntervalMs: 5e3,
|
|
343
343
|
statusBarRenderTicks: 4,
|
|
344
344
|
orchestratorEffort: "xhigh",
|
|
345
|
-
agentEffort: "
|
|
345
|
+
agentEffort: "high",
|
|
346
346
|
notifications: {
|
|
347
347
|
enabled: true,
|
|
348
348
|
sound: "/System/Library/Sounds/Hero.aiff"
|
|
@@ -2663,6 +2663,7 @@ var init_notify = __esm({
|
|
|
2663
2663
|
|
|
2664
2664
|
// src/daemon/ask-store.ts
|
|
2665
2665
|
import { existsSync as existsSync11, mkdirSync as mkdirSync6, readFileSync as readFileSync12, readdirSync as readdirSync7 } from "fs";
|
|
2666
|
+
import { basename as basename4 } from "path";
|
|
2666
2667
|
function maybeNotifyOnAskCreated(cwd, sessionId, meta) {
|
|
2667
2668
|
if (process.env.NODE_ENV === "test" || process.env.SISYPHUS_DISABLE_NOTIFY === "1") return;
|
|
2668
2669
|
const isActionable = meta.kind !== void 0 && ACTIONABLE_KINDS.has(meta.kind);
|
|
@@ -2724,6 +2725,14 @@ function writeOutput(cwd, sessionId, askId, responses, completedAt) {
|
|
|
2724
2725
|
completedAt: completedAt ?? (/* @__PURE__ */ new Date()).toISOString()
|
|
2725
2726
|
}, null, 2));
|
|
2726
2727
|
}
|
|
2728
|
+
function readReview(cwd, sessionId, askId) {
|
|
2729
|
+
const p = askReviewPath(cwd, sessionId, askId);
|
|
2730
|
+
try {
|
|
2731
|
+
return JSON.parse(readFileSync12(p, "utf-8"));
|
|
2732
|
+
} catch {
|
|
2733
|
+
return null;
|
|
2734
|
+
}
|
|
2735
|
+
}
|
|
2727
2736
|
function readMeta(cwd, sessionId, askId) {
|
|
2728
2737
|
const p = askMetaPath(cwd, sessionId, askId);
|
|
2729
2738
|
if (!existsSync11(p)) {
|
|
@@ -2774,6 +2783,25 @@ function listAsks(cwd, sessionId) {
|
|
|
2774
2783
|
}
|
|
2775
2784
|
return readdirSync7(dir, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => e.name);
|
|
2776
2785
|
}
|
|
2786
|
+
function listReviewInboxItems(cwd, sessionId) {
|
|
2787
|
+
const items = [];
|
|
2788
|
+
for (const askId of listAsks(cwd, sessionId)) {
|
|
2789
|
+
const meta = readMeta(cwd, sessionId, askId);
|
|
2790
|
+
if (!meta || meta.kind !== "review") continue;
|
|
2791
|
+
if (meta.orphaned) continue;
|
|
2792
|
+
if (meta.status !== "pending" && meta.status !== "in-progress") continue;
|
|
2793
|
+
if (existsSync11(askOutputPath(cwd, sessionId, askId))) continue;
|
|
2794
|
+
const review = readReview(cwd, sessionId, askId);
|
|
2795
|
+
items.push({
|
|
2796
|
+
dir: askEntryDir(cwd, sessionId, askId),
|
|
2797
|
+
id: askId,
|
|
2798
|
+
title: meta.title ?? (review ? `Review ${basename4(review.file)}` : "Review"),
|
|
2799
|
+
kind: "review",
|
|
2800
|
+
blockedSince: meta.askedAt
|
|
2801
|
+
});
|
|
2802
|
+
}
|
|
2803
|
+
return items;
|
|
2804
|
+
}
|
|
2777
2805
|
function buildAutoResponses(deck) {
|
|
2778
2806
|
const out = [];
|
|
2779
2807
|
for (const interaction of deck.interactions) {
|
|
@@ -3367,9 +3395,9 @@ ${instruction}`);
|
|
|
3367
3395
|
mainCmd = `codex -m ${shellQuote(model)} --dangerously-bypass-approvals-and-sandbox "$(cat '${codexPromptPath}')"`;
|
|
3368
3396
|
} else {
|
|
3369
3397
|
const config = loadConfig(cwd);
|
|
3370
|
-
const effort = agentConfig?.frontmatter.effort ?? config.agentEffort ?? "
|
|
3398
|
+
const effort = agentConfig?.frontmatter.effort ?? config.agentEffort ?? "high";
|
|
3371
3399
|
const rawModel = agentConfig?.frontmatter.model;
|
|
3372
|
-
const model = rawModel === "opus" ? "claude-opus-4-
|
|
3400
|
+
const model = rawModel === "opus" ? "claude-opus-4-8[1m]" : rawModel;
|
|
3373
3401
|
const modelFlag = model ? ` --model ${shellQuote(model)}` : "";
|
|
3374
3402
|
const permMode = agentConfig?.frontmatter.permissionMode;
|
|
3375
3403
|
const permFlag = permMode ? ` --permission-mode ${shellQuote(permMode)}` : " --dangerously-skip-permissions";
|
|
@@ -5000,7 +5028,7 @@ var init_companion = __esm({
|
|
|
5000
5028
|
});
|
|
5001
5029
|
|
|
5002
5030
|
// src/daemon/companion-commentary.ts
|
|
5003
|
-
import { basename as
|
|
5031
|
+
import { basename as basename5 } from "path";
|
|
5004
5032
|
import { z as z2 } from "zod";
|
|
5005
5033
|
function timeOfDayModifier() {
|
|
5006
5034
|
const hour = (/* @__PURE__ */ new Date()).getHours();
|
|
@@ -7144,7 +7172,7 @@ async function spawnOrchestrator(sessionId, cwd, windowId, message, forceMode) {
|
|
|
7144
7172
|
const basePrompt = loadOrchestratorPrompt(cwd, sessionId, mode);
|
|
7145
7173
|
const formattedState = formatStateForOrchestrator(session, mode);
|
|
7146
7174
|
const agentPluginPath = resolve7(import.meta.dirname, "../templates/agent-plugin");
|
|
7147
|
-
const agentTypes = discoverAgentTypes(agentPluginPath, session.cwd).filter((t2) => t2.source === "bundled");
|
|
7175
|
+
const agentTypes = discoverAgentTypes(agentPluginPath, session.cwd).filter((t2) => t2.source === "bundled" || t2.source === "project-sis");
|
|
7148
7176
|
const agentTypeLines = agentTypes.length > 0 ? agentTypes.map((t2) => {
|
|
7149
7177
|
const tag = t2.model ? `(agent, ${t2.model})` : "(agent)";
|
|
7150
7178
|
const desc = t2.description ? ` \u2014 ${t2.description}` : "";
|
|
@@ -8078,7 +8106,7 @@ var init_grove = __esm({
|
|
|
8078
8106
|
// src/cli/cloud/repo.ts
|
|
8079
8107
|
import { spawnSync as spawnSync3 } from "child_process";
|
|
8080
8108
|
import { existsSync as existsSync24 } from "fs";
|
|
8081
|
-
import { basename as
|
|
8109
|
+
import { basename as basename6, join as join18 } from "path";
|
|
8082
8110
|
function captureGit(args, cwd) {
|
|
8083
8111
|
const result = spawnSync3("git", args, {
|
|
8084
8112
|
encoding: "utf-8",
|
|
@@ -8092,8 +8120,8 @@ function captureGit(args, cwd) {
|
|
|
8092
8120
|
}
|
|
8093
8121
|
function inferRepoName(cwd) {
|
|
8094
8122
|
const { stdout, ok } = captureGit(["rev-parse", "--show-toplevel"], cwd);
|
|
8095
|
-
if (ok && stdout) return
|
|
8096
|
-
return
|
|
8123
|
+
if (ok && stdout) return basename6(stdout);
|
|
8124
|
+
return basename6(cwd ?? process.cwd());
|
|
8097
8125
|
}
|
|
8098
8126
|
function getOriginUrl(cwd) {
|
|
8099
8127
|
const { stdout, ok } = captureGit(["remote", "get-url", "origin"], cwd);
|
|
@@ -9885,7 +9913,7 @@ var init_ask_visual = __esm({
|
|
|
9885
9913
|
// src/daemon/server.ts
|
|
9886
9914
|
import { createServer } from "net";
|
|
9887
9915
|
import { unlinkSync as unlinkSync4, existsSync as existsSync28, writeFileSync as writeFileSync15, readFileSync as readFileSync26, mkdirSync as mkdirSync13, readdirSync as readdirSync12, rmSync as rmSync8, chmodSync as chmodSync2 } from "fs";
|
|
9888
|
-
import { join as join21, basename as
|
|
9916
|
+
import { join as join21, basename as basename7, dirname as dirname8 } from "path";
|
|
9889
9917
|
import { scanInbox } from "@crouton-kit/humanloop";
|
|
9890
9918
|
function setCompositor(c) {
|
|
9891
9919
|
compositor = c;
|
|
@@ -10569,9 +10597,11 @@ async function handleRequest(req) {
|
|
|
10569
10597
|
}
|
|
10570
10598
|
case "inbox-list": {
|
|
10571
10599
|
const askDirs = [];
|
|
10600
|
+
const reviewItems = [];
|
|
10572
10601
|
for (const [sessionId, tracking] of sessionTrackingMap) {
|
|
10573
10602
|
if (!tracking.cwd) continue;
|
|
10574
10603
|
askDirs.push(askDir(tracking.cwd, sessionId));
|
|
10604
|
+
reviewItems.push(...listReviewInboxItems(tracking.cwd, sessionId));
|
|
10575
10605
|
}
|
|
10576
10606
|
let items;
|
|
10577
10607
|
try {
|
|
@@ -10580,8 +10610,13 @@ async function handleRequest(req) {
|
|
|
10580
10610
|
console.warn("[sisyphus] inbox-list: scanInbox failed:", err);
|
|
10581
10611
|
items = [];
|
|
10582
10612
|
}
|
|
10613
|
+
if (reviewItems.length > 0) {
|
|
10614
|
+
items = items.concat(reviewItems).sort(
|
|
10615
|
+
(a, b) => a.blockedSince < b.blockedSince ? -1 : a.blockedSince > b.blockedSince ? 1 : 0
|
|
10616
|
+
);
|
|
10617
|
+
}
|
|
10583
10618
|
const itemsWithName = items.map((item) => {
|
|
10584
|
-
const sessionId =
|
|
10619
|
+
const sessionId = basename7(dirname8(dirname8(dirname8(item.dir))));
|
|
10585
10620
|
const tracking = sessionTrackingMap.get(sessionId);
|
|
10586
10621
|
const sessionName = tracking?.name ?? item.source?.sessionName;
|
|
10587
10622
|
return { ...item, sessionName };
|