changed to mimo model
This commit is contained in:
@@ -25,7 +25,6 @@ Panopticon is a nightly batch system that maintains up-to-date, LLM-optimized pr
|
||||
- All pi SDK sessions are created via `createSession()` in `session.ts`
|
||||
- Workers get read-only tools; orchestrator and synthesizer get no tools
|
||||
- Prompts live in `prompts/` directory as standalone markdown files
|
||||
- Models default to Anthropic (claude-sonnet-4-5 for smart, claude-haiku-4-5 for cheap)
|
||||
- Config is in `config.json` at project root
|
||||
- State persisted in `state/` directory, run reports in `runs/`
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
}
|
||||
],
|
||||
"models": {
|
||||
"orchestrator": "anthropic/claude-sonnet-4-5",
|
||||
"worker": "anthropic/claude-haiku-4-5",
|
||||
"synthesizer": "anthropic/claude-sonnet-4-5"
|
||||
"orchestrator": "opencode-go/mimo-v2-pro",
|
||||
"worker": "opencode-go/mimo-v2-pro",
|
||||
"synthesizer": "opencode-go/mimo-v2-pro"
|
||||
},
|
||||
"thinkingLevels": {
|
||||
"orchestrator": "medium",
|
||||
|
||||
@@ -17,9 +17,9 @@ const DEFAULT_METRICS: MetricsConfig = {
|
||||
};
|
||||
|
||||
const DEFAULT_MODELS: ModelsConfig = {
|
||||
orchestrator: "anthropic/claude-sonnet-4-5",
|
||||
worker: "anthropic/claude-haiku-4-5",
|
||||
synthesizer: "anthropic/claude-sonnet-4-5",
|
||||
orchestrator: "opencode-go/mimo-v2-pro",
|
||||
worker: "opencode-go/mimo-v2-pro",
|
||||
synthesizer: "opencode-go/mimo-v2-pro",
|
||||
};
|
||||
|
||||
const DEFAULT_THINKING: ThinkingConfig = {
|
||||
|
||||
36
src/git.ts
36
src/git.ts
@@ -127,6 +127,42 @@ export function getDirstat(projectPath: string, lastSha: string): string {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Stage, commit, and push changes in the skill directory for a project.
|
||||
* Returns true if a commit was made, false if there was nothing to commit.
|
||||
*/
|
||||
export function commitAndPushSkillDocs(
|
||||
projectPath: string,
|
||||
projectName: string,
|
||||
branch: string
|
||||
): boolean {
|
||||
const skillDir = ".pi/skills/panopticon";
|
||||
|
||||
// Stage all changes in the skill directory
|
||||
git(projectPath, `add ${skillDir}`);
|
||||
|
||||
// Check if there are staged changes
|
||||
try {
|
||||
git(projectPath, "diff --cached --quiet");
|
||||
// If the above succeeds (exit 0), there are no staged changes
|
||||
return false;
|
||||
} catch {
|
||||
// Exit code 1 means there are staged changes — this is expected
|
||||
}
|
||||
|
||||
const commitMessage = `docs: panopticon auto-update for ${projectName}`;
|
||||
git(projectPath, `commit -m "${commitMessage}"`);
|
||||
|
||||
// Push (non-fatal if no remote)
|
||||
try {
|
||||
git(projectPath, `push origin ${branch}`);
|
||||
} catch {
|
||||
// Local-only repo or push failed — not critical
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Simple glob matching (supports ** and *)
|
||||
function matchGlob(path: string, glob: string): boolean {
|
||||
const regex = glob
|
||||
|
||||
28
src/index.ts
28
src/index.ts
@@ -11,7 +11,7 @@
|
||||
|
||||
import { resolve } from "path";
|
||||
import { loadConfig } from "./config.js";
|
||||
import { getCurrentSha, pull, getFileTree, getDiffSince } from "./git.js";
|
||||
import { getCurrentSha, pull, getFileTree, getDiffSince, commitAndPushSkillDocs } from "./git.js";
|
||||
import { gatherStructuralContext, hashFileAtPath } from "./structural.js";
|
||||
import { loadState, saveState } from "./state.js";
|
||||
import { readAllSkillFiles, readSkillFile, writeSkillFiles, countLinesChanged, cleanSkillDir } from "./writer.js";
|
||||
@@ -274,6 +274,19 @@ async function runFullAnalysis(
|
||||
),
|
||||
});
|
||||
|
||||
// Commit and push skill doc changes
|
||||
try {
|
||||
const committed = commitAndPushSkillDocs(project.path, project.name, project.branch);
|
||||
if (committed) {
|
||||
console.log(` Committed and pushed skill doc updates`);
|
||||
} else {
|
||||
console.log(` No skill doc changes to commit`);
|
||||
}
|
||||
} catch (err: any) {
|
||||
errors.push(`Git commit/push error: ${err.message}`);
|
||||
console.log(` Warning: failed to commit/push: ${err.message}`);
|
||||
}
|
||||
|
||||
// Doc line changes
|
||||
const docLinesChanged: Record<string, number> = {};
|
||||
for (const [file, content] of Object.entries(filesToWrite)) {
|
||||
@@ -482,6 +495,19 @@ async function runIncremental(
|
||||
lastRunStatus: errors.length === 0 ? "success" : "partial",
|
||||
});
|
||||
|
||||
// Commit and push skill doc changes
|
||||
try {
|
||||
const committed = commitAndPushSkillDocs(project.path, project.name, project.branch);
|
||||
if (committed) {
|
||||
console.log(` Committed and pushed skill doc updates`);
|
||||
} else {
|
||||
console.log(` No skill doc changes to commit`);
|
||||
}
|
||||
} catch (err: any) {
|
||||
errors.push(`Git commit/push error: ${err.message}`);
|
||||
console.log(` Warning: failed to commit/push: ${err.message}`);
|
||||
}
|
||||
|
||||
// Doc line changes
|
||||
const docLinesChanged: Record<string, number> = {};
|
||||
for (const [file, content] of Object.entries(filesToWrite)) {
|
||||
|
||||
Reference in New Issue
Block a user