chore: include pre-built dist for github install
This commit is contained in:
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
import type { PluginInput } from "@opencode-ai/plugin";
|
||||
import type { AtlasHookOptions } from "./types";
|
||||
export declare function createAtlasHook(ctx: PluginInput, options?: AtlasHookOptions): {
|
||||
handler: (arg: {
|
||||
event: {
|
||||
type: string;
|
||||
properties?: unknown;
|
||||
};
|
||||
}) => Promise<void>;
|
||||
"tool.execute.before": (toolInput: {
|
||||
tool: string;
|
||||
sessionID?: string;
|
||||
callID?: string;
|
||||
}, toolOutput: {
|
||||
args: Record<string, unknown>;
|
||||
message?: string;
|
||||
}) => Promise<void>;
|
||||
"tool.execute.after": (toolInput: import("./types").ToolExecuteAfterInput, toolOutput: import("./types").ToolExecuteAfterOutput) => Promise<void>;
|
||||
};
|
||||
@@ -0,0 +1,14 @@
|
||||
import type { PluginInput } from "@opencode-ai/plugin";
|
||||
import type { BackgroundManager } from "../../features/background-agent";
|
||||
import type { SessionState } from "./types";
|
||||
export declare function injectBoulderContinuation(input: {
|
||||
ctx: PluginInput;
|
||||
sessionID: string;
|
||||
planName: string;
|
||||
remaining: number;
|
||||
total: number;
|
||||
agent?: string;
|
||||
worktreePath?: string;
|
||||
backgroundManager?: BackgroundManager;
|
||||
sessionState: SessionState;
|
||||
}): Promise<void>;
|
||||
@@ -0,0 +1,6 @@
|
||||
import type { PluginInput } from "@opencode-ai/plugin";
|
||||
export declare function isSessionInBoulderLineage(input: {
|
||||
client: PluginInput["client"];
|
||||
sessionID: string;
|
||||
boulderSessionIDs: string[];
|
||||
}): Promise<boolean>;
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
import type { PluginInput } from "@opencode-ai/plugin";
|
||||
import type { AtlasHookOptions, SessionState } from "./types";
|
||||
export declare function createAtlasEventHandler(input: {
|
||||
ctx: PluginInput;
|
||||
options?: AtlasHookOptions;
|
||||
sessions: Map<string, SessionState>;
|
||||
getState: (sessionID: string) => SessionState;
|
||||
}): (arg: {
|
||||
event: {
|
||||
type: string;
|
||||
properties?: unknown;
|
||||
};
|
||||
}) => Promise<void>;
|
||||
@@ -0,0 +1,4 @@
|
||||
export declare function shouldPauseForFinalWaveApproval(input: {
|
||||
planPath: string;
|
||||
taskOutput: string;
|
||||
}): boolean;
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
export declare const HOOK_NAME = "atlas";
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
import type { PluginInput } from "@opencode-ai/plugin";
|
||||
import type { AtlasHookOptions, SessionState } from "./types";
|
||||
export declare function handleAtlasSessionIdle(input: {
|
||||
ctx: PluginInput;
|
||||
options?: AtlasHookOptions;
|
||||
getState: (sessionID: string) => SessionState;
|
||||
sessionID: string;
|
||||
}): Promise<void>;
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
export { HOOK_NAME } from "./hook-name";
|
||||
export { createAtlasHook } from "./atlas-hook";
|
||||
export type { AtlasHookOptions } from "./types";
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
export declare function isAbortError(error: unknown): boolean;
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
import type { PluginInput } from "@opencode-ai/plugin";
|
||||
import type { ModelInfo } from "./types";
|
||||
type PromptContext = {
|
||||
model?: ModelInfo;
|
||||
tools?: Record<string, boolean>;
|
||||
};
|
||||
export declare function resolveRecentPromptContextForSession(ctx: PluginInput, sessionID: string): Promise<PromptContext>;
|
||||
export declare function resolveRecentModelForSession(ctx: PluginInput, sessionID: string): Promise<ModelInfo | undefined>;
|
||||
export {};
|
||||
@@ -0,0 +1,11 @@
|
||||
import type { PluginInput } from "@opencode-ai/plugin";
|
||||
import type { BoulderState, PlanProgress } from "../../features/boulder-state";
|
||||
export declare function resolveActiveBoulderSession(input: {
|
||||
client: PluginInput["client"];
|
||||
directory: string;
|
||||
sessionID: string;
|
||||
}): Promise<{
|
||||
boulderState: BoulderState;
|
||||
progress: PlanProgress;
|
||||
appendedSession: boolean;
|
||||
} | null>;
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
type SessionMessagesClient = {
|
||||
session: {
|
||||
messages: (input: {
|
||||
path: {
|
||||
id: string;
|
||||
};
|
||||
}) => Promise<unknown>;
|
||||
};
|
||||
};
|
||||
export declare function getLastAgentFromSession(sessionID: string, client?: SessionMessagesClient): Promise<string | null>;
|
||||
export {};
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Cross-platform check if a path is inside .sisyphus/ directory.
|
||||
* Handles both forward slashes (Unix) and backslashes (Windows).
|
||||
* Uses path segment matching (not substring) to avoid false positives like "not-sisyphus/file.txt"
|
||||
*/
|
||||
export declare function isSisyphusPath(filePath: string): boolean;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export declare function extractSessionIdFromOutput(output: string): string;
|
||||
@@ -0,0 +1,6 @@
|
||||
export declare const DIRECT_WORK_REMINDER: string;
|
||||
export declare const BOULDER_CONTINUATION_PROMPT: string;
|
||||
export declare const VERIFICATION_REMINDER = "**THE SUBAGENT JUST CLAIMED THIS TASK IS DONE. THEY ARE PROBABLY LYING.**\n\nSubagents say \"done\" when code has errors, tests pass trivially, logic is wrong,\nor they quietly added features nobody asked for. This happens EVERY TIME.\nAssume the work is broken until YOU prove otherwise.\n\n---\n\n**PHASE 1: READ THE CODE FIRST (before running anything)**\n\nDo NOT run tests yet. Read the code FIRST so you know what you're testing.\n\n1. `Bash(\"git diff --stat\")` \u2014 see exactly which files changed. Any file outside expected scope = scope creep.\n2. `Read` EVERY changed file \u2014 no exceptions, no skimming.\n3. For EACH file, critically ask:\n - Does this code ACTUALLY do what the task required? (Re-read the task, compare line by line)\n - Any stubs, TODOs, placeholders, hardcoded values? (`Grep` for TODO, FIXME, HACK, xxx)\n - Logic errors? Trace the happy path AND the error path in your head.\n - Anti-patterns? (`Grep` for `as any`, `@ts-ignore`, empty catch, console.log in changed files)\n - Scope creep? Did the subagent touch things or add features NOT in the task spec?\n4. Cross-check every claim:\n - Said \"Updated X\" \u2014 READ X. Actually updated, or just superficially touched?\n - Said \"Added tests\" \u2014 READ the tests. Do they test REAL behavior or just `expect(true).toBe(true)`?\n - Said \"Follows patterns\" \u2014 OPEN a reference file. Does it ACTUALLY match?\n\n**If you cannot explain what every changed line does, you have NOT reviewed it.**\n\n**PHASE 2: RUN AUTOMATED CHECKS (targeted, then broad)**\n\nNow that you understand the code, verify mechanically:\n1. `lsp_diagnostics` on EACH changed file \u2014 ZERO new errors\n2. Run tests for changed modules FIRST, then full suite\n3. Build/typecheck \u2014 exit 0\n\nIf Phase 1 found issues but Phase 2 passes: Phase 2 is WRONG. The code has bugs that tests don't cover. Fix the code.\n\n**PHASE 3: HANDS-ON QA \u2014 ACTUALLY RUN IT (MANDATORY for user-facing changes)**\n\nTests and linters CANNOT catch: visual bugs, wrong CLI output, broken user flows, API response shape issues.\n\n**If this task produced anything a user would SEE or INTERACT with, you MUST launch it and verify yourself.**\n\n- **Frontend/UI**: `/playwright` skill \u2014 load the page, click through the flow, check console. Verify: page loads, interactions work, console clean, responsive.\n- **TUI/CLI**: `interactive_bash` \u2014 run the command, try good input, try bad input, try --help. Verify: command runs, output correct, error messages helpful, edge inputs handled.\n- **API/Backend**: `Bash` with curl \u2014 hit the endpoint, check response body, send malformed input. Verify: returns 200, body correct, error cases return proper errors.\n- **Config/Build**: Actually start the service or import the config. Verify: loads without error, backward compatible.\n\nThis is NOT optional \"if applicable\". If the deliverable is user-facing and you did not run it, you are shipping untested work.\n\n**PHASE 4: GATE DECISION \u2014 Should you proceed to the next task?**\n\nAnswer honestly:\n1. Can I explain what EVERY changed line does? (If no \u2014 back to Phase 1)\n2. Did I SEE it work with my own eyes? (If user-facing and no \u2014 back to Phase 3)\n3. Am I confident nothing existing is broken? (If no \u2014 run broader tests)\n\nALL three must be YES. \"Probably\" = NO. \"I think so\" = NO. Investigate until CERTAIN.\n\n- **All 3 YES** \u2014 Proceed: mark task complete, move to next.\n- **Any NO** \u2014 Reject: resume session with `session_id`, fix the specific issue.\n- **Unsure** \u2014 Reject: \"unsure\" = \"no\". Investigate until you have a definitive answer.\n\n**DO NOT proceed to the next task until all 4 phases are complete and the gate passes.**";
|
||||
export declare const VERIFICATION_REMINDER_GEMINI = "**THE SUBAGENT HAS FINISHED. THEIR WORK IS EXTREMELY SUSPICIOUS.**\n\nThe subagent CLAIMS this task is done. Based on thousands of executions, subagent claims are FALSE more often than true.\nThey ROUTINELY:\n- Ship code with syntax errors they didn't bother to check\n- Create stub implementations with TODOs and call it \"done\"\n- Write tests that pass trivially (testing nothing meaningful)\n- Implement logic that does NOT match what was requested\n- Add features nobody asked for and call it \"improvement\"\n- Report \"all tests pass\" when they didn't run any tests\n\n**This is NOT a theoretical warning. This WILL happen on this task. Assume the work is BROKEN.**\n\n**YOU MUST VERIFY WITH ACTUAL TOOL CALLS. NOT REASONING. TOOL CALLS.**\nThinking \"it looks correct\" is NOT verification. Running `lsp_diagnostics` IS.\n\n---\n\n**PHASE 1: READ THE CODE FIRST (DO NOT SKIP \u2014 DO NOT RUN TESTS YET)**\n\nRead the code FIRST so you know what you're testing.\n\n1. `Bash(\"git diff --stat\")` \u2014 see exactly which files changed.\n2. `Read` EVERY changed file \u2014 no exceptions, no skimming.\n3. For EACH file:\n - Does this code ACTUALLY do what the task required? RE-READ the task spec.\n - Any stubs, TODOs, placeholders? `Grep` for TODO, FIXME, HACK, xxx\n - Anti-patterns? `Grep` for `as any`, `@ts-ignore`, empty catch\n - Scope creep? Did the subagent add things NOT in the task spec?\n4. Cross-check EVERY claim against actual code.\n\n**If you cannot explain what every changed line does, GO BACK AND READ AGAIN.**\n\n**PHASE 2: RUN AUTOMATED CHECKS**\n\n1. `lsp_diagnostics` on EACH changed file \u2014 ZERO new errors. ACTUALLY RUN THIS.\n2. Run tests for changed modules, then full suite. ACTUALLY RUN THESE.\n3. Build/typecheck \u2014 exit 0.\n\nIf Phase 1 found issues but Phase 2 passes: Phase 2 is WRONG. Fix the code.\n\n**PHASE 3: HANDS-ON QA (MANDATORY for user-facing changes)**\n\n- **Frontend/UI**: `/playwright`\n- **TUI/CLI**: `interactive_bash`\n- **API/Backend**: `Bash` with curl\n\n**If user-facing and you did not run it, you are shipping UNTESTED BROKEN work.**\n\n**PHASE 4: GATE DECISION**\n\n1. Can I explain what EVERY changed line does? (If no \u2192 Phase 1)\n2. Did I SEE it work via tool calls? (If user-facing and no \u2192 Phase 3)\n3. Am I confident nothing is broken? (If no \u2192 broader tests)\n\nALL three must be YES. \"Probably\" = NO. \"I think so\" = NO.\n\n**DO NOT proceed to the next task until all 4 phases are complete.**";
|
||||
export declare const ORCHESTRATOR_DELEGATION_REQUIRED: string;
|
||||
export declare const SINGLE_TASK_DIRECTIVE: string;
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
import type { PluginInput } from "@opencode-ai/plugin";
|
||||
import type { SessionState } from "./types";
|
||||
import type { ToolExecuteAfterInput, ToolExecuteAfterOutput } from "./types";
|
||||
export declare function createToolExecuteAfterHandler(input: {
|
||||
ctx: PluginInput;
|
||||
pendingFilePaths: Map<string, string>;
|
||||
autoCommit: boolean;
|
||||
getState: (sessionID: string) => SessionState;
|
||||
}): (toolInput: ToolExecuteAfterInput, toolOutput: ToolExecuteAfterOutput) => Promise<void>;
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
import type { PluginInput } from "@opencode-ai/plugin";
|
||||
export declare function createToolExecuteBeforeHandler(input: {
|
||||
ctx: PluginInput;
|
||||
pendingFilePaths: Map<string, string>;
|
||||
}): (toolInput: {
|
||||
tool: string;
|
||||
sessionID?: string;
|
||||
callID?: string;
|
||||
}, toolOutput: {
|
||||
args: Record<string, unknown>;
|
||||
message?: string;
|
||||
}) => Promise<void>;
|
||||
Vendored
+33
@@ -0,0 +1,33 @@
|
||||
import type { AgentOverrides } from "../../config";
|
||||
import type { BackgroundManager } from "../../features/background-agent";
|
||||
export type ModelInfo = {
|
||||
providerID: string;
|
||||
modelID: string;
|
||||
};
|
||||
export interface AtlasHookOptions {
|
||||
directory: string;
|
||||
backgroundManager?: BackgroundManager;
|
||||
isContinuationStopped?: (sessionID: string) => boolean;
|
||||
shouldSkipContinuation?: (sessionID: string) => boolean;
|
||||
agentOverrides?: AgentOverrides;
|
||||
/** Enable auto-commit after each atomic task completion (default: true) */
|
||||
autoCommit?: boolean;
|
||||
}
|
||||
export interface ToolExecuteAfterInput {
|
||||
tool: string;
|
||||
sessionID?: string;
|
||||
callID?: string;
|
||||
}
|
||||
export interface ToolExecuteAfterOutput {
|
||||
title: string;
|
||||
output: string;
|
||||
metadata: Record<string, unknown>;
|
||||
}
|
||||
export interface SessionState {
|
||||
lastEventWasAbortError?: boolean;
|
||||
lastContinuationInjectedAt?: number;
|
||||
promptFailureCount: number;
|
||||
lastFailureAt?: number;
|
||||
pendingRetryTimer?: ReturnType<typeof setTimeout>;
|
||||
waitingForFinalWaveApproval?: boolean;
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
export declare function buildCompletionGate(planName: string, sessionId: string): string;
|
||||
export declare function buildOrchestratorReminder(planName: string, progress: {
|
||||
total: number;
|
||||
completed: number;
|
||||
}, sessionId: string, autoCommit?: boolean, includeCompletionGate?: boolean): string;
|
||||
export declare function buildFinalWaveApprovalReminder(planName: string, progress: {
|
||||
total: number;
|
||||
completed: number;
|
||||
}, sessionId: string): string;
|
||||
export declare function buildStandaloneVerificationReminder(sessionId: string): string;
|
||||
@@ -0,0 +1 @@
|
||||
export declare function isWriteOrEditToolName(toolName: string): boolean;
|
||||
Reference in New Issue
Block a user