chore: include pre-built dist for github install
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
export { createUnstableAgentBabysitterHook } from "./unstable-agent-babysitter-hook";
|
||||
export { buildReminder, extractMessages, getMessageInfo, getMessageParts, isUnstableTask, THINKING_SUMMARY_MAX_CHARS, } from "./task-message-analyzer";
|
||||
@@ -0,0 +1,24 @@
|
||||
import type { BackgroundTask } from "../../features/background-agent";
|
||||
export declare const THINKING_SUMMARY_MAX_CHARS: 500;
|
||||
type MessageInfo = {
|
||||
role?: string;
|
||||
agent?: string;
|
||||
model?: {
|
||||
providerID: string;
|
||||
modelID: string;
|
||||
};
|
||||
providerID?: string;
|
||||
modelID?: string;
|
||||
tools?: Record<string, boolean | "allow" | "deny" | "ask">;
|
||||
};
|
||||
type MessagePart = {
|
||||
type?: string;
|
||||
text?: string;
|
||||
thinking?: string;
|
||||
};
|
||||
export declare function getMessageInfo(value: unknown): MessageInfo | undefined;
|
||||
export declare function getMessageParts(value: unknown): MessagePart[];
|
||||
export declare function extractMessages(value: unknown): unknown[];
|
||||
export declare function isUnstableTask(task: BackgroundTask): boolean;
|
||||
export declare function buildReminder(task: BackgroundTask, summary: string | null, idleMs: number): string;
|
||||
export {};
|
||||
@@ -0,0 +1,71 @@
|
||||
import type { BackgroundManager } from "../../features/background-agent";
|
||||
type BabysittingConfig = {
|
||||
timeout_ms?: number;
|
||||
};
|
||||
type BabysitterContext = {
|
||||
directory: string;
|
||||
client: {
|
||||
session: {
|
||||
messages: (args: {
|
||||
path: {
|
||||
id: string;
|
||||
};
|
||||
}) => Promise<{
|
||||
data?: unknown;
|
||||
} | unknown[]>;
|
||||
prompt: (args: {
|
||||
path: {
|
||||
id: string;
|
||||
};
|
||||
body: {
|
||||
parts: Array<{
|
||||
type: "text";
|
||||
text: string;
|
||||
}>;
|
||||
agent?: string;
|
||||
model?: {
|
||||
providerID: string;
|
||||
modelID: string;
|
||||
};
|
||||
tools?: Record<string, boolean>;
|
||||
};
|
||||
query?: {
|
||||
directory?: string;
|
||||
};
|
||||
}) => Promise<unknown>;
|
||||
promptAsync: (args: {
|
||||
path: {
|
||||
id: string;
|
||||
};
|
||||
body: {
|
||||
parts: Array<{
|
||||
type: "text";
|
||||
text: string;
|
||||
}>;
|
||||
agent?: string;
|
||||
model?: {
|
||||
providerID: string;
|
||||
modelID: string;
|
||||
};
|
||||
tools?: Record<string, boolean>;
|
||||
};
|
||||
query?: {
|
||||
directory?: string;
|
||||
};
|
||||
}) => Promise<unknown>;
|
||||
};
|
||||
};
|
||||
};
|
||||
type BabysitterOptions = {
|
||||
backgroundManager: Pick<BackgroundManager, "getTasksByParentSession">;
|
||||
config?: BabysittingConfig;
|
||||
};
|
||||
export declare function createUnstableAgentBabysitterHook(ctx: BabysitterContext, options: BabysitterOptions): {
|
||||
event: ({ event }: {
|
||||
event: {
|
||||
type: string;
|
||||
properties?: unknown;
|
||||
};
|
||||
}) => Promise<void>;
|
||||
};
|
||||
export {};
|
||||
Reference in New Issue
Block a user