panopticon-cli 0.5.0 → 0.5.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/dist/{agents-E43Y3HNU.js → agents-5OPQKM5K.js} +4 -3
- package/dist/{chunk-OMNXYPXC.js → chunk-2V4NF7J2.js} +14 -1
- package/dist/chunk-2V4NF7J2.js.map +1 -0
- package/dist/{chunk-WQG2TYCB.js → chunk-4YSYJ4HM.js} +2 -2
- package/dist/{chunk-NTO3EDB3.js → chunk-76F6DSVS.js} +47 -8
- package/dist/chunk-76F6DSVS.js.map +1 -0
- package/dist/{chunk-GR6ZZMCX.js → chunk-F5555J3A.js} +18 -1
- package/dist/chunk-F5555J3A.js.map +1 -0
- package/dist/{chunk-PPRFKTVC.js → chunk-NLQRED36.js} +2 -2
- package/dist/{chunk-AAFQANKW.js → chunk-OWHXCGVO.js} +29 -29
- package/dist/chunk-OWHXCGVO.js.map +1 -0
- package/dist/{chunk-HZT2AOPN.js → chunk-VHKSS7QX.js} +28 -5
- package/dist/chunk-VHKSS7QX.js.map +1 -0
- package/dist/{chunk-GFP3PIPB.js → chunk-YGJ54GW2.js} +1 -1
- package/dist/chunk-YGJ54GW2.js.map +1 -0
- package/dist/cli/index.js +401 -318
- package/dist/cli/index.js.map +1 -1
- package/dist/dashboard/public/assets/{index-DQHkwvvJ.js → index-Ce6q21Fm.js} +135 -135
- package/dist/dashboard/public/assets/{index-BxpjweAL.css → index-NzpI0ItZ.css} +1 -1
- package/dist/dashboard/public/index.html +2 -2
- package/dist/dashboard/server.js +1420 -1007
- package/dist/{feedback-writer-LVZ5TFYZ.js → feedback-writer-VRMMWWTW.js} +2 -2
- package/dist/git-utils-I2UDKNZH.js +131 -0
- package/dist/git-utils-I2UDKNZH.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -2
- package/dist/{projects-JEIVIYC6.js → projects-CFX3RTDL.js} +4 -2
- package/dist/{remote-workspace-AHVHQEES.js → remote-workspace-7FPGF2RM.js} +2 -2
- package/dist/{review-status-EPFG4XM7.js → review-status-TDPSOU5J.js} +2 -2
- package/dist/{specialist-context-ZC6A4M3I.js → specialist-context-WGUUYDWY.js} +3 -3
- package/dist/{specialist-logs-KLGJCEUL.js → specialist-logs-XJB5TCKJ.js} +3 -3
- package/dist/{specialists-O4HWDJL5.js → specialists-5LBRHYFA.js} +3 -3
- package/dist/{traefik-QN7R5I6V.js → traefik-WFMQX2LY.js} +3 -3
- package/dist/{workspace-manager-IE4JL2JP.js → workspace-manager-E434Z45T.js} +2 -2
- package/package.json +1 -1
- package/scripts/record-cost-event.js +5 -5
- package/skills/pan-new-project/SKILL.md +304 -0
- package/dist/chunk-AAFQANKW.js.map +0 -1
- package/dist/chunk-GFP3PIPB.js.map +0 -1
- package/dist/chunk-GR6ZZMCX.js.map +0 -1
- package/dist/chunk-HZT2AOPN.js.map +0 -1
- package/dist/chunk-NTO3EDB3.js.map +0 -1
- package/dist/chunk-OMNXYPXC.js.map +0 -1
- /package/dist/{agents-E43Y3HNU.js.map → agents-5OPQKM5K.js.map} +0 -0
- /package/dist/{chunk-WQG2TYCB.js.map → chunk-4YSYJ4HM.js.map} +0 -0
- /package/dist/{chunk-PPRFKTVC.js.map → chunk-NLQRED36.js.map} +0 -0
- /package/dist/{feedback-writer-LVZ5TFYZ.js.map → feedback-writer-VRMMWWTW.js.map} +0 -0
- /package/dist/{projects-JEIVIYC6.js.map → projects-CFX3RTDL.js.map} +0 -0
- /package/dist/{remote-workspace-AHVHQEES.js.map → remote-workspace-7FPGF2RM.js.map} +0 -0
- /package/dist/{review-status-EPFG4XM7.js.map → review-status-TDPSOU5J.js.map} +0 -0
- /package/dist/{specialist-context-ZC6A4M3I.js.map → specialist-context-WGUUYDWY.js.map} +0 -0
- /package/dist/{specialist-logs-KLGJCEUL.js.map → specialist-logs-XJB5TCKJ.js.map} +0 -0
- /package/dist/{specialists-O4HWDJL5.js.map → specialists-5LBRHYFA.js.map} +0 -0
- /package/dist/{traefik-QN7R5I6V.js.map → traefik-WFMQX2LY.js.map} +0 -0
- /package/dist/{workspace-manager-IE4JL2JP.js.map → workspace-manager-E434Z45T.js.map} +0 -0
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
import {
|
|
28
28
|
init_projects,
|
|
29
29
|
projects_exports
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-2V4NF7J2.js";
|
|
31
31
|
import {
|
|
32
32
|
COSTS_DIR,
|
|
33
33
|
PANOPTICON_HOME,
|
|
@@ -48,7 +48,7 @@ function calculateCost(usage, pricing) {
|
|
|
48
48
|
let inputMultiplier = 1;
|
|
49
49
|
let outputMultiplier = 1;
|
|
50
50
|
const totalInputTokens = usage.inputTokens + (usage.cacheReadTokens || 0) + (usage.cacheWriteTokens || 0);
|
|
51
|
-
if ((pricing.model === "claude-sonnet-4" || pricing.model === "claude-sonnet-4
|
|
51
|
+
if ((pricing.model === "claude-sonnet-4" || pricing.model === "claude-sonnet-4-6") && totalInputTokens > 2e5) {
|
|
52
52
|
inputMultiplier = 2;
|
|
53
53
|
outputMultiplier = 1.5;
|
|
54
54
|
}
|
|
@@ -84,10 +84,10 @@ var init_cost = __esm({
|
|
|
84
84
|
init_esm_shims();
|
|
85
85
|
init_paths();
|
|
86
86
|
DEFAULT_PRICING = [
|
|
87
|
-
// Anthropic - 4.6 series
|
|
88
|
-
{ provider: "anthropic", model: "claude-opus-4
|
|
89
|
-
{ provider: "anthropic", model: "claude-sonnet-4
|
|
90
|
-
{ provider: "anthropic", model: "claude-haiku-4
|
|
87
|
+
// Anthropic - 4.6 series (API IDs use dashes: claude-opus-4-6, claude-sonnet-4-6, claude-haiku-4-5)
|
|
88
|
+
{ provider: "anthropic", model: "claude-opus-4-6", inputPer1k: 5e-3, outputPer1k: 0.025, cacheReadPer1k: 5e-4, cacheWrite5mPer1k: 625e-5, cacheWrite1hPer1k: 0.01, currency: "USD" },
|
|
89
|
+
{ provider: "anthropic", model: "claude-sonnet-4-6", inputPer1k: 3e-3, outputPer1k: 0.015, cacheReadPer1k: 3e-4, cacheWrite5mPer1k: 375e-5, cacheWrite1hPer1k: 6e-3, currency: "USD" },
|
|
90
|
+
{ provider: "anthropic", model: "claude-haiku-4-5", inputPer1k: 1e-3, outputPer1k: 5e-3, cacheReadPer1k: 1e-4, cacheWrite5mPer1k: 125e-5, cacheWrite1hPer1k: 2e-3, currency: "USD" },
|
|
91
91
|
// Anthropic - 4.x series
|
|
92
92
|
{ provider: "anthropic", model: "claude-opus-4-1", inputPer1k: 0.015, outputPer1k: 0.075, cacheReadPer1k: 15e-4, cacheWrite5mPer1k: 0.01875, cacheWrite1hPer1k: 0.03, currency: "USD" },
|
|
93
93
|
{ provider: "anthropic", model: "claude-opus-4", inputPer1k: 0.015, outputPer1k: 0.075, cacheReadPer1k: 15e-4, cacheWrite5mPer1k: 0.01875, cacheWrite1hPer1k: 0.03, currency: "USD" },
|
|
@@ -154,23 +154,23 @@ function normalizeModelName(model) {
|
|
|
154
154
|
if (model.includes("claude")) {
|
|
155
155
|
let normalizedModel = model;
|
|
156
156
|
if (model.includes("opus-4-6") || model.includes("opus-4.6")) {
|
|
157
|
-
normalizedModel = "claude-opus-4
|
|
157
|
+
normalizedModel = "claude-opus-4-6";
|
|
158
158
|
} else if (model.includes("opus-4-1") || model.includes("opus-4.1")) {
|
|
159
159
|
normalizedModel = "claude-opus-4-1";
|
|
160
160
|
} else if (model.includes("opus-4") || model.includes("opus")) {
|
|
161
161
|
normalizedModel = "claude-opus-4";
|
|
162
162
|
}
|
|
163
163
|
if (model.includes("sonnet-4-5") || model.includes("sonnet-4.5")) {
|
|
164
|
-
normalizedModel = "claude-sonnet-4
|
|
164
|
+
normalizedModel = "claude-sonnet-4-6";
|
|
165
165
|
} else if (model.includes("sonnet-4") || model.includes("sonnet")) {
|
|
166
166
|
normalizedModel = "claude-sonnet-4";
|
|
167
167
|
}
|
|
168
168
|
if (model.includes("haiku-4-5") || model.includes("haiku-4.5")) {
|
|
169
|
-
normalizedModel = "claude-haiku-4
|
|
169
|
+
normalizedModel = "claude-haiku-4-5";
|
|
170
170
|
} else if (model.includes("haiku-3")) {
|
|
171
171
|
normalizedModel = "claude-haiku-3";
|
|
172
172
|
} else if (model.includes("haiku")) {
|
|
173
|
-
normalizedModel = "claude-haiku-4
|
|
173
|
+
normalizedModel = "claude-haiku-4-5";
|
|
174
174
|
}
|
|
175
175
|
return { provider: "anthropic", model: normalizedModel };
|
|
176
176
|
}
|
|
@@ -622,9 +622,9 @@ function recordWake(name, sessionId) {
|
|
|
622
622
|
}
|
|
623
623
|
async function spawnEphemeralSpecialist(projectKey, specialistType, task) {
|
|
624
624
|
ensureProjectSpecialistDir(projectKey, specialistType);
|
|
625
|
-
const { loadContextDigest } = await import("./specialist-context-
|
|
625
|
+
const { loadContextDigest } = await import("./specialist-context-WGUUYDWY.js");
|
|
626
626
|
const contextDigest = loadContextDigest(projectKey, specialistType);
|
|
627
|
-
const { createRunLog: createRunLog2 } = await import("./specialist-logs-
|
|
627
|
+
const { createRunLog: createRunLog2 } = await import("./specialist-logs-XJB5TCKJ.js");
|
|
628
628
|
const { runId, filePath: logFilePath } = createRunLog2(
|
|
629
629
|
projectKey,
|
|
630
630
|
specialistType,
|
|
@@ -673,7 +673,7 @@ echo "## Specialist completed task"
|
|
|
673
673
|
`tmux new-session -d -s "${tmuxSession}"${envFlags} "bash '${launcherScript}'"`,
|
|
674
674
|
{ encoding: "utf-8" }
|
|
675
675
|
);
|
|
676
|
-
const { saveAgentRuntimeState } = await import("./agents-
|
|
676
|
+
const { saveAgentRuntimeState } = await import("./agents-5OPQKM5K.js");
|
|
677
677
|
saveAgentRuntimeState(tmuxSession, {
|
|
678
678
|
state: "active",
|
|
679
679
|
lastActivity: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -697,7 +697,7 @@ echo "## Specialist completed task"
|
|
|
697
697
|
}
|
|
698
698
|
}
|
|
699
699
|
async function buildTaskPrompt(projectKey, specialistType, task, contextDigest) {
|
|
700
|
-
const { getSpecialistPromptOverride } = await import("./projects-
|
|
700
|
+
const { getSpecialistPromptOverride } = await import("./projects-CFX3RTDL.js");
|
|
701
701
|
const customPrompt = getSpecialistPromptOverride(projectKey, specialistType);
|
|
702
702
|
let prompt = `# ${specialistType} Task - ${task.issueId}
|
|
703
703
|
|
|
@@ -867,7 +867,7 @@ async function terminateSpecialist(projectKey, specialistType) {
|
|
|
867
867
|
console.error(`[specialist] Failed to kill tmux session ${tmuxSession}:`, error);
|
|
868
868
|
}
|
|
869
869
|
if (metadata.currentRun) {
|
|
870
|
-
const { finalizeRunLog: finalizeRunLog2 } = await import("./specialist-logs-
|
|
870
|
+
const { finalizeRunLog: finalizeRunLog2 } = await import("./specialist-logs-XJB5TCKJ.js");
|
|
871
871
|
try {
|
|
872
872
|
finalizeRunLog2(projectKey, specialistType, metadata.currentRun, {
|
|
873
873
|
status: metadata.lastRunStatus || "incomplete",
|
|
@@ -880,20 +880,20 @@ async function terminateSpecialist(projectKey, specialistType) {
|
|
|
880
880
|
}
|
|
881
881
|
const key = `${projectKey}-${specialistType}`;
|
|
882
882
|
gracePeriodStates.delete(key);
|
|
883
|
-
const { saveAgentRuntimeState } = await import("./agents-
|
|
883
|
+
const { saveAgentRuntimeState } = await import("./agents-5OPQKM5K.js");
|
|
884
884
|
saveAgentRuntimeState(tmuxSession, {
|
|
885
885
|
state: "suspended",
|
|
886
886
|
lastActivity: (/* @__PURE__ */ new Date()).toISOString()
|
|
887
887
|
});
|
|
888
|
-
const { scheduleDigestGeneration } = await import("./specialist-context-
|
|
888
|
+
const { scheduleDigestGeneration } = await import("./specialist-context-WGUUYDWY.js");
|
|
889
889
|
scheduleDigestGeneration(projectKey, specialistType);
|
|
890
890
|
scheduleLogCleanup(projectKey, specialistType);
|
|
891
891
|
}
|
|
892
892
|
function scheduleLogCleanup(projectKey, specialistType) {
|
|
893
893
|
Promise.resolve().then(async () => {
|
|
894
894
|
try {
|
|
895
|
-
const { cleanupOldLogs: cleanupOldLogs2 } = await import("./specialist-logs-
|
|
896
|
-
const { getSpecialistRetention } = await import("./projects-
|
|
895
|
+
const { cleanupOldLogs: cleanupOldLogs2 } = await import("./specialist-logs-XJB5TCKJ.js");
|
|
896
|
+
const { getSpecialistRetention } = await import("./projects-CFX3RTDL.js");
|
|
897
897
|
const retention = getSpecialistRetention(projectKey);
|
|
898
898
|
const deleted = cleanupOldLogs2(projectKey, specialistType, { maxDays: retention.max_days, maxRuns: retention.max_runs });
|
|
899
899
|
if (deleted > 0) {
|
|
@@ -1071,7 +1071,7 @@ async function getSpecialistStatus(name, projectKey) {
|
|
|
1071
1071
|
const sessionId = getSessionId(name);
|
|
1072
1072
|
const running = await isRunning(name, projectKey);
|
|
1073
1073
|
const contextTokens = countContextTokens(name);
|
|
1074
|
-
const { getAgentRuntimeState } = await import("./agents-
|
|
1074
|
+
const { getAgentRuntimeState } = await import("./agents-5OPQKM5K.js");
|
|
1075
1075
|
const tmuxSession = getTmuxSessionName(name, projectKey);
|
|
1076
1076
|
const runtimeState = getAgentRuntimeState(tmuxSession);
|
|
1077
1077
|
let state;
|
|
@@ -1318,7 +1318,7 @@ async function wakeSpecialist(name, taskPrompt, options = {}) {
|
|
|
1318
1318
|
}
|
|
1319
1319
|
}
|
|
1320
1320
|
recordWake(name, sessionId || void 0);
|
|
1321
|
-
const { saveAgentRuntimeState } = await import("./agents-
|
|
1321
|
+
const { saveAgentRuntimeState } = await import("./agents-5OPQKM5K.js");
|
|
1322
1322
|
saveAgentRuntimeState(tmuxSession, {
|
|
1323
1323
|
state: "active",
|
|
1324
1324
|
lastActivity: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -1420,14 +1420,14 @@ CRITICAL: Do NOT delete the feature branch.`;
|
|
|
1420
1420
|
if (totalChangedFiles === 0) {
|
|
1421
1421
|
staleBranch = true;
|
|
1422
1422
|
console.log(`[specialist] review-agent: stale branch detected for ${task.issueId} \u2014 0 files changed vs main`);
|
|
1423
|
-
const { setReviewStatus } = await import("./review-status-
|
|
1423
|
+
const { setReviewStatus } = await import("./review-status-TDPSOU5J.js");
|
|
1424
1424
|
setReviewStatus(task.issueId.toUpperCase(), {
|
|
1425
1425
|
reviewStatus: "passed",
|
|
1426
1426
|
reviewNotes: "No changes to review \u2014 branch identical to main (already merged or stale)"
|
|
1427
1427
|
});
|
|
1428
1428
|
console.log(`[specialist] review-agent: auto-passed ${task.issueId} (stale branch)`);
|
|
1429
1429
|
const tmuxSession = getTmuxSessionName("review-agent");
|
|
1430
|
-
const { saveAgentRuntimeState } = await import("./agents-
|
|
1430
|
+
const { saveAgentRuntimeState } = await import("./agents-5OPQKM5K.js");
|
|
1431
1431
|
saveAgentRuntimeState(tmuxSession, {
|
|
1432
1432
|
state: "idle",
|
|
1433
1433
|
lastActivity: (/* @__PURE__ */ new Date()).toISOString()
|
|
@@ -1532,7 +1532,7 @@ curl -s -X POST ${apiUrl}/api/specialists/test-agent/queue -H "Content-Type: app
|
|
|
1532
1532
|
const testWorkspace = task.workspace || "unknown";
|
|
1533
1533
|
const testGitInfo = await resolveWorkspaceGitInfo(task.workspace, task.branch);
|
|
1534
1534
|
const testIsPolyrepo = testGitInfo.isPolyrepo;
|
|
1535
|
-
const { extractTeamPrefix, findProjectByTeam } = await import("./projects-
|
|
1535
|
+
const { extractTeamPrefix, findProjectByTeam } = await import("./projects-CFX3RTDL.js");
|
|
1536
1536
|
const testTeamPrefix = extractTeamPrefix(task.issueId);
|
|
1537
1537
|
const testProjectConfig = testTeamPrefix ? findProjectByTeam(testTeamPrefix) : null;
|
|
1538
1538
|
const testConfigs = testProjectConfig?.tests;
|
|
@@ -1671,7 +1671,7 @@ IMPORTANT: Do NOT hand off to merge-agent. Human clicks Merge button when ready.
|
|
|
1671
1671
|
async function wakeSpecialistOrQueue(name, task, options = {}) {
|
|
1672
1672
|
const { priority = "normal", source = "handoff" } = options;
|
|
1673
1673
|
const running = await isRunning(name);
|
|
1674
|
-
const { getAgentRuntimeState } = await import("./agents-
|
|
1674
|
+
const { getAgentRuntimeState } = await import("./agents-5OPQKM5K.js");
|
|
1675
1675
|
const tmuxSession = getTmuxSessionName(name);
|
|
1676
1676
|
const runtimeState = getAgentRuntimeState(tmuxSession);
|
|
1677
1677
|
const idle = runtimeState?.state === "idle" || runtimeState?.state === "suspended";
|
|
@@ -1702,7 +1702,7 @@ async function wakeSpecialistOrQueue(name, task, options = {}) {
|
|
|
1702
1702
|
};
|
|
1703
1703
|
}
|
|
1704
1704
|
}
|
|
1705
|
-
const { saveAgentRuntimeState } = await import("./agents-
|
|
1705
|
+
const { saveAgentRuntimeState } = await import("./agents-5OPQKM5K.js");
|
|
1706
1706
|
saveAgentRuntimeState(tmuxSession, {
|
|
1707
1707
|
state: "active",
|
|
1708
1708
|
lastActivity: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -1802,7 +1802,7 @@ async function sendFeedbackToAgent(feedback) {
|
|
|
1802
1802
|
}
|
|
1803
1803
|
const agentSession = `agent-${toIssueId.toLowerCase()}`;
|
|
1804
1804
|
const feedbackMessage = formatFeedbackForAgent(fullFeedback);
|
|
1805
|
-
const { writeFeedbackFile } = await import("./feedback-writer-
|
|
1805
|
+
const { writeFeedbackFile } = await import("./feedback-writer-VRMMWWTW.js");
|
|
1806
1806
|
const specialistMap = {
|
|
1807
1807
|
"review-agent": "review-agent",
|
|
1808
1808
|
"test-agent": "test-agent",
|
|
@@ -1822,7 +1822,7 @@ async function sendFeedbackToAgent(feedback) {
|
|
|
1822
1822
|
return false;
|
|
1823
1823
|
}
|
|
1824
1824
|
try {
|
|
1825
|
-
const { messageAgent } = await import("./agents-
|
|
1825
|
+
const { messageAgent } = await import("./agents-5OPQKM5K.js");
|
|
1826
1826
|
const msg = `SPECIALIST FEEDBACK: ${fromSpecialist} reported ${feedback.feedbackType.toUpperCase()} for ${toIssueId}.
|
|
1827
1827
|
Read and address: ${fileResult.relativePath}`;
|
|
1828
1828
|
await messageAgent(agentSession, msg);
|
|
@@ -2316,4 +2316,4 @@ export {
|
|
|
2316
2316
|
getFeedbackStats,
|
|
2317
2317
|
init_specialists
|
|
2318
2318
|
};
|
|
2319
|
-
//# sourceMappingURL=chunk-
|
|
2319
|
+
//# sourceMappingURL=chunk-OWHXCGVO.js.map
|