@mu-agent/mu 0.1.1 → 0.2.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/README.md +27 -0
- package/dist/index.js +849 -192
- package/dist/mu.js +988 -306
- package/dist/types/ai/types.d.ts +4 -0
- package/dist/types/core/index.d.ts +3 -3
- package/dist/types/core/permission.d.ts +12 -0
- package/dist/types/core/profile.d.ts +7 -0
- package/dist/types/core/tools.d.ts +4 -0
- package/dist/types/index.d.ts +8 -4
- package/dist/types/profile-browser/actions/classify.d.ts +19 -0
- package/dist/types/profile-browser/actions/click.d.ts +48 -0
- package/dist/types/profile-browser/actions/dates.d.ts +11 -0
- package/dist/types/profile-browser/actions/files.d.ts +9 -0
- package/dist/types/profile-browser/actions/filetype.d.ts +8 -0
- package/dist/types/profile-browser/actions/input.d.ts +17 -0
- package/dist/types/profile-browser/actions/keyboard.d.ts +16 -0
- package/dist/types/profile-browser/actions/navigate.d.ts +11 -0
- package/dist/types/profile-browser/actions/page.d.ts +8 -0
- package/dist/types/profile-browser/actions/pointer.d.ts +39 -0
- package/dist/types/profile-browser/actions/scroll.d.ts +8 -0
- package/dist/types/profile-browser/actions/submission.d.ts +7 -0
- package/dist/types/profile-browser/actions/types.d.ts +38 -0
- package/dist/types/profile-browser/agent/dataflow.d.ts +18 -0
- package/dist/types/profile-browser/agent/handoff.d.ts +15 -0
- package/dist/types/profile-browser/agent/ledger.d.ts +4 -0
- package/dist/types/profile-browser/agent/notes.d.ts +6 -0
- package/dist/types/profile-browser/agent/permissions.d.ts +18 -0
- package/dist/types/profile-browser/agent/prompts.d.ts +4 -0
- package/dist/types/profile-browser/agent/state.d.ts +48 -0
- package/dist/types/profile-browser/browser/connect.d.ts +44 -0
- package/dist/types/profile-browser/browser/discover.d.ts +31 -0
- package/dist/types/profile-browser/browser/downloads.d.ts +24 -0
- package/dist/types/profile-browser/browser/frames.d.ts +34 -0
- package/dist/types/profile-browser/browser/launch.d.ts +42 -0
- package/dist/types/profile-browser/browser/manager.d.ts +135 -0
- package/dist/types/profile-browser/browser/tabs.d.ts +52 -0
- package/dist/types/profile-browser/cdp/connection.d.ts +53 -0
- package/dist/types/profile-browser/cdp/session.d.ts +23 -0
- package/dist/types/profile-browser/cdp/types.d.ts +10 -0
- package/dist/types/profile-browser/commands.d.ts +5 -0
- package/dist/types/profile-browser/config.d.ts +73 -0
- package/dist/types/profile-browser/evals/live.d.ts +64 -0
- package/dist/types/profile-browser/index.d.ts +21 -0
- package/dist/types/profile-browser/page/capture-script.d.ts +1 -0
- package/dist/types/profile-browser/page/injection.d.ts +2 -0
- package/dist/types/profile-browser/page/model.d.ts +67 -0
- package/dist/types/profile-browser/page/network.d.ts +12 -0
- package/dist/types/profile-browser/page/observe.d.ts +39 -0
- package/dist/types/profile-browser/page/refs.d.ts +38 -0
- package/dist/types/profile-browser/page/render.d.ts +27 -0
- package/dist/types/profile-browser/page/resolve.d.ts +15 -0
- package/dist/types/profile-browser/page/screenshot.d.ts +25 -0
- package/dist/types/profile-browser/page/secrets.d.ts +7 -0
- package/dist/types/profile-browser/page/settle.d.ts +13 -0
- package/dist/types/profile-browser/page/snapshot.d.ts +9 -0
- package/dist/types/profile-browser/page/text.d.ts +22 -0
- package/dist/types/profile-browser/testing/agent-scenarios.d.ts +27 -0
- package/dist/types/profile-browser/testing/bench.d.ts +19 -0
- package/dist/types/profile-browser/testing/chrome.d.ts +12 -0
- package/dist/types/profile-browser/testing/fixture-site.d.ts +14 -0
- package/dist/types/profile-browser/testing/pdf.d.ts +1 -0
- package/dist/types/profile-browser/testing/wait.d.ts +1 -0
- package/dist/types/profile-browser/tools/delegate.d.ts +23 -0
- package/dist/types/profile-browser/tools/files.d.ts +3 -0
- package/dist/types/profile-browser/tools/gate.d.ts +8 -0
- package/dist/types/profile-browser/tools/interact.d.ts +86 -0
- package/dist/types/profile-browser/tools/navigate.d.ts +5 -0
- package/dist/types/profile-browser/tools/observe.d.ts +18 -0
- package/dist/types/profile-browser/tools/shared.d.ts +23 -0
- package/dist/types/profile-browser/tools/tabs.d.ts +8 -0
- package/dist/types/profile-coding/index.d.ts +3 -3
- package/dist/types/sdk/agent.d.ts +1 -0
- package/dist/types/sdk/index.d.ts +2 -0
- package/dist/types/sdk/subagents.d.ts +1 -0
- package/dist/types/{profile-coding/tools → sdk}/todo.d.ts +2 -2
- package/package.json +2 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Tab } from "../browser/tabs.js";
|
|
2
|
+
import type { CdpSession } from "../cdp/session.js";
|
|
3
|
+
import type { Ref } from "./refs.js";
|
|
4
|
+
export declare class StaleRefError extends Error {
|
|
5
|
+
readonly ref: Ref;
|
|
6
|
+
constructor(ref: Ref, reason: string);
|
|
7
|
+
}
|
|
8
|
+
export interface ResolvedRef {
|
|
9
|
+
ref: Ref;
|
|
10
|
+
frameId: string;
|
|
11
|
+
backendNodeId: number;
|
|
12
|
+
session: CdpSession;
|
|
13
|
+
objectId: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function resolveRef(tab: Tab, ref: Ref, signal?: AbortSignal): Promise<ResolvedRef>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Tab } from "../browser/tabs.js";
|
|
2
|
+
export declare const MAX_SCREENSHOT_WIDTH = 1280;
|
|
3
|
+
export interface Screenshot {
|
|
4
|
+
data: string;
|
|
5
|
+
mimeType: "image/jpeg";
|
|
6
|
+
cssWidth: number;
|
|
7
|
+
cssHeight: number;
|
|
8
|
+
scale: number;
|
|
9
|
+
originX: number;
|
|
10
|
+
originY: number;
|
|
11
|
+
}
|
|
12
|
+
export type VisionMode = "auto" | "on" | "off";
|
|
13
|
+
export declare function visionEnabled(mode: VisionMode, modelRef: string | undefined): boolean;
|
|
14
|
+
export declare function screenshotHeader(shot: Screenshot): string;
|
|
15
|
+
export declare function captureScreenshot(tab: Tab, options?: {
|
|
16
|
+
signal?: AbortSignal | undefined;
|
|
17
|
+
box?: {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
w: number;
|
|
21
|
+
h: number;
|
|
22
|
+
} | undefined;
|
|
23
|
+
fullPage?: boolean | undefined;
|
|
24
|
+
quality?: number | undefined;
|
|
25
|
+
}): Promise<Screenshot>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Tab } from "../browser/tabs.js";
|
|
2
|
+
export type SettleMode = "in-page" | "typing" | "navigation";
|
|
3
|
+
export interface SettleResult {
|
|
4
|
+
ms: number;
|
|
5
|
+
reason: string;
|
|
6
|
+
navigated: boolean;
|
|
7
|
+
changed: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface SettleWatcher {
|
|
10
|
+
settle(signal?: AbortSignal): Promise<SettleResult>;
|
|
11
|
+
dispose(): void;
|
|
12
|
+
}
|
|
13
|
+
export declare function watchSettle(tab: Tab, mode?: SettleMode): SettleWatcher;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Tab } from "../browser/tabs.js";
|
|
2
|
+
import type { PageModel } from "./model.js";
|
|
3
|
+
export interface CaptureOptions {
|
|
4
|
+
scope?: "viewport" | "full";
|
|
5
|
+
signal?: AbortSignal | undefined;
|
|
6
|
+
margin?: number;
|
|
7
|
+
maxText?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function capturePage(tab: Tab, options?: CaptureOptions): Promise<PageModel>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { PageModel, PageNode } from "./model.js";
|
|
2
|
+
export declare const READ_PAGE_CHARS = 12000;
|
|
3
|
+
export declare function pageMarkdown(model: PageModel): {
|
|
4
|
+
markdown: string;
|
|
5
|
+
scope: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function filterSections(markdown: string, query: string): string;
|
|
8
|
+
export declare function paginate(text: string, offset: number, size?: number): {
|
|
9
|
+
chunk: string;
|
|
10
|
+
start: number;
|
|
11
|
+
end: number;
|
|
12
|
+
total: number;
|
|
13
|
+
};
|
|
14
|
+
export interface FindMatch {
|
|
15
|
+
node: PageNode;
|
|
16
|
+
context: string;
|
|
17
|
+
position: "in view" | "above" | "below";
|
|
18
|
+
}
|
|
19
|
+
export declare function findNodes(model: PageModel, matcher: (text: string) => boolean, limit: number): {
|
|
20
|
+
matches: FindMatch[];
|
|
21
|
+
total: number;
|
|
22
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type Credential, type Provider } from "../../ai/index.js";
|
|
2
|
+
import type { PermissionRequest } from "../../core/index.js";
|
|
3
|
+
import { Agent } from "../../sdk/index.js";
|
|
4
|
+
import type { BrowserProfile } from "../index.js";
|
|
5
|
+
import { type FixtureSite } from "./fixture-site.js";
|
|
6
|
+
export interface Scenario {
|
|
7
|
+
name: string;
|
|
8
|
+
prompt: (site: FixtureSite) => string;
|
|
9
|
+
mode: "default" | "autonomous";
|
|
10
|
+
approve: "allow" | "deny" | ((request: PermissionRequest) => "allow" | "deny");
|
|
11
|
+
}
|
|
12
|
+
export declare const SCENARIOS: Scenario[];
|
|
13
|
+
export declare function withFetch(base: Provider, fetchImpl: typeof fetch): Provider;
|
|
14
|
+
export interface ScenarioRun {
|
|
15
|
+
text: string;
|
|
16
|
+
asks: PermissionRequest[];
|
|
17
|
+
agent: Agent;
|
|
18
|
+
}
|
|
19
|
+
export declare function runScenario(scenario: Scenario, profile: BrowserProfile, site: FixtureSite, provider: Provider, modelRef: string, extra?: {
|
|
20
|
+
getCredentials?: (provider: string) => Promise<Credential | undefined>;
|
|
21
|
+
}): Promise<ScenarioRun>;
|
|
22
|
+
export declare function replayProvider(name: string, site: FixtureSite): {
|
|
23
|
+
provider: Provider;
|
|
24
|
+
model: string;
|
|
25
|
+
assertExhausted: () => void;
|
|
26
|
+
};
|
|
27
|
+
export declare const replayCredentials: () => Promise<Credential>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { BrowserManager } from "../browser/manager.js";
|
|
2
|
+
export interface BenchResult {
|
|
3
|
+
page: string;
|
|
4
|
+
p50: number;
|
|
5
|
+
p95: number;
|
|
6
|
+
max: number;
|
|
7
|
+
tokens: number;
|
|
8
|
+
title: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function benchSnapshots(manager: BrowserManager, urls: Record<string, string>, iterations?: number): Promise<BenchResult[]>;
|
|
11
|
+
export declare function formatBench(results: BenchResult[]): string;
|
|
12
|
+
export interface ActionBench {
|
|
13
|
+
action: string;
|
|
14
|
+
p50: number;
|
|
15
|
+
p95: number;
|
|
16
|
+
settleP50: number;
|
|
17
|
+
}
|
|
18
|
+
export declare function benchActions(home: string, iterations?: number): Promise<ActionBench[]>;
|
|
19
|
+
export declare function formatActionBench(results: ActionBench[]): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CdpConnection } from "../cdp/connection.js";
|
|
2
|
+
export declare const testBrowserPath: string | undefined;
|
|
3
|
+
export declare function describeWithBrowser(name: string, body: () => void): void;
|
|
4
|
+
export declare function tempUserDataDir(): string;
|
|
5
|
+
export interface TestBrowser {
|
|
6
|
+
connection: CdpConnection;
|
|
7
|
+
userDataDir: string;
|
|
8
|
+
pid: number | undefined;
|
|
9
|
+
wsUrl: string;
|
|
10
|
+
close: () => Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
export declare function launchTestBrowser(userDataDir?: string): Promise<TestBrowser>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const FIXTURE_DIR: string;
|
|
2
|
+
export interface FixtureSite {
|
|
3
|
+
origin: string;
|
|
4
|
+
crossOrigin: string;
|
|
5
|
+
url: (page: string) => string;
|
|
6
|
+
submissions: Record<string, unknown>[];
|
|
7
|
+
signups: {
|
|
8
|
+
email: string;
|
|
9
|
+
code: string;
|
|
10
|
+
verified: boolean;
|
|
11
|
+
}[];
|
|
12
|
+
stop: () => void;
|
|
13
|
+
}
|
|
14
|
+
export declare function startFixtureSite(): FixtureSite;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function minimalPdf(lines: string[]): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function until(condition: () => boolean | Promise<boolean>, timeoutMs?: number, label?: string): Promise<void>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface CodingRun {
|
|
2
|
+
exitCode: number;
|
|
3
|
+
stdout: string;
|
|
4
|
+
stderr: string;
|
|
5
|
+
}
|
|
6
|
+
export type CodingRunner = (argv: string[], options: {
|
|
7
|
+
cwd: string;
|
|
8
|
+
signal: AbortSignal;
|
|
9
|
+
onLine?: (line: string) => void;
|
|
10
|
+
}) => Promise<CodingRun>;
|
|
11
|
+
export declare const spawnCodingAgent: CodingRunner;
|
|
12
|
+
export interface DelegateDeps {
|
|
13
|
+
command: string[];
|
|
14
|
+
workspace: string;
|
|
15
|
+
model: () => string | undefined;
|
|
16
|
+
pageText?: (text: string) => string | undefined;
|
|
17
|
+
run?: CodingRunner;
|
|
18
|
+
}
|
|
19
|
+
export declare function delegateTool(deps: DelegateDeps): import("../../sdk/index.js").Tool<{
|
|
20
|
+
task: string;
|
|
21
|
+
access?: "read" | "edit" | "full" | undefined;
|
|
22
|
+
directory?: string | undefined;
|
|
23
|
+
}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ToolPermissionDetails } from "../../core/index.js";
|
|
2
|
+
import type { BrowserToolDeps } from "./shared.js";
|
|
3
|
+
export declare function navigationLeak(deps: BrowserToolDeps, url: string): string | undefined;
|
|
4
|
+
export declare function shareDetails(url: string, leak: string): ToolPermissionDetails;
|
|
5
|
+
export declare function scopeFor(deps: BrowserToolDeps, tool: string, args: Record<string, unknown>): string;
|
|
6
|
+
export declare function activatedRef(args: Record<string, unknown>): string | undefined;
|
|
7
|
+
export declare function retryKey(tool: string, args: Record<string, unknown>): string;
|
|
8
|
+
export declare function detailsFor(deps: BrowserToolDeps, tool: string, args: Record<string, unknown>): Promise<ToolPermissionDetails>;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { type BrowserToolDeps } from "./shared.js";
|
|
2
|
+
export declare function interactionTools(deps: BrowserToolDeps): {
|
|
3
|
+
click: import("../../sdk/index.js").Tool<{
|
|
4
|
+
ref: string;
|
|
5
|
+
button?: "left" | "right" | "middle" | undefined;
|
|
6
|
+
double?: boolean | undefined;
|
|
7
|
+
modifiers?: ("Alt" | "Control" | "Meta" | "Shift")[] | undefined;
|
|
8
|
+
commit?: boolean | undefined;
|
|
9
|
+
reason?: string | undefined;
|
|
10
|
+
}>;
|
|
11
|
+
type: import("../../sdk/index.js").Tool<{
|
|
12
|
+
ref: string;
|
|
13
|
+
text: string;
|
|
14
|
+
clear?: boolean | undefined;
|
|
15
|
+
submit?: boolean | undefined;
|
|
16
|
+
keystrokes?: boolean | undefined;
|
|
17
|
+
commit?: boolean | undefined;
|
|
18
|
+
reason?: string | undefined;
|
|
19
|
+
}>;
|
|
20
|
+
fill: import("../../sdk/index.js").Tool<{
|
|
21
|
+
fields: {
|
|
22
|
+
ref: string;
|
|
23
|
+
value: string | boolean | string[];
|
|
24
|
+
}[];
|
|
25
|
+
submitRef?: string | undefined;
|
|
26
|
+
commit?: boolean | undefined;
|
|
27
|
+
reason?: string | undefined;
|
|
28
|
+
}>;
|
|
29
|
+
select: import("../../sdk/index.js").Tool<{
|
|
30
|
+
ref: string;
|
|
31
|
+
options: string[];
|
|
32
|
+
commit?: boolean | undefined;
|
|
33
|
+
reason?: string | undefined;
|
|
34
|
+
}>;
|
|
35
|
+
press: import("../../sdk/index.js").Tool<{
|
|
36
|
+
keys: string;
|
|
37
|
+
ref?: string | undefined;
|
|
38
|
+
commit?: boolean | undefined;
|
|
39
|
+
reason?: string | undefined;
|
|
40
|
+
}>;
|
|
41
|
+
scroll: import("../../sdk/index.js").Tool<{
|
|
42
|
+
direction?: "left" | "right" | "up" | "down" | undefined;
|
|
43
|
+
to?: "top" | "bottom" | undefined;
|
|
44
|
+
amount?: number | "page" | "half" | undefined;
|
|
45
|
+
ref?: string | undefined;
|
|
46
|
+
}>;
|
|
47
|
+
hover: import("../../sdk/index.js").Tool<{
|
|
48
|
+
ref: string;
|
|
49
|
+
}>;
|
|
50
|
+
drag: import("../../sdk/index.js").Tool<{
|
|
51
|
+
from: string | {
|
|
52
|
+
x: number;
|
|
53
|
+
y: number;
|
|
54
|
+
};
|
|
55
|
+
to: string | {
|
|
56
|
+
x: number;
|
|
57
|
+
y: number;
|
|
58
|
+
};
|
|
59
|
+
}>;
|
|
60
|
+
upload: import("../../sdk/index.js").Tool<{
|
|
61
|
+
ref: string;
|
|
62
|
+
paths: string[];
|
|
63
|
+
}>;
|
|
64
|
+
dialog: import("../../sdk/index.js").Tool<{
|
|
65
|
+
action: "accept" | "dismiss";
|
|
66
|
+
text?: string | undefined;
|
|
67
|
+
}>;
|
|
68
|
+
wait: import("../../sdk/index.js").Tool<{
|
|
69
|
+
text?: string | undefined;
|
|
70
|
+
gone?: boolean | undefined;
|
|
71
|
+
seconds?: number | undefined;
|
|
72
|
+
}>;
|
|
73
|
+
evaluate: import("../../sdk/index.js").Tool<{
|
|
74
|
+
function: string;
|
|
75
|
+
ref?: string | undefined;
|
|
76
|
+
}>;
|
|
77
|
+
clickXy: import("../../sdk/index.js").Tool<{
|
|
78
|
+
x: number;
|
|
79
|
+
y: number;
|
|
80
|
+
button?: "left" | "right" | "middle" | undefined;
|
|
81
|
+
double?: boolean | undefined;
|
|
82
|
+
commit?: boolean | undefined;
|
|
83
|
+
reason?: string | undefined;
|
|
84
|
+
}>;
|
|
85
|
+
downloads: import("../../sdk/index.js").Tool<Record<string, never>>;
|
|
86
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type BrowserToolDeps } from "./shared.js";
|
|
2
|
+
export declare function snapshotTool(deps: BrowserToolDeps): import("../../sdk/index.js").Tool<{
|
|
3
|
+
scope?: "viewport" | "full" | undefined;
|
|
4
|
+
ref?: string | undefined;
|
|
5
|
+
}>;
|
|
6
|
+
export declare function screenshotTool(deps: BrowserToolDeps): import("../../sdk/index.js").Tool<{
|
|
7
|
+
ref?: string | undefined;
|
|
8
|
+
fullPage?: boolean | undefined;
|
|
9
|
+
}>;
|
|
10
|
+
export declare function readPageTool(deps: BrowserToolDeps): import("../../sdk/index.js").Tool<{
|
|
11
|
+
query?: string | undefined;
|
|
12
|
+
offset?: number | undefined;
|
|
13
|
+
}>;
|
|
14
|
+
export declare function findTool(deps: BrowserToolDeps): import("../../sdk/index.js").Tool<{
|
|
15
|
+
text?: string | undefined;
|
|
16
|
+
regex?: string | undefined;
|
|
17
|
+
limit?: number | undefined;
|
|
18
|
+
}>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ToolResult } from "../../core/index.js";
|
|
2
|
+
import type { ActionResult } from "../actions/click.js";
|
|
3
|
+
import { Stopwatch } from "../actions/types.js";
|
|
4
|
+
import type { BrowserManager } from "../browser/manager.js";
|
|
5
|
+
import type { Tab } from "../browser/tabs.js";
|
|
6
|
+
import type { ResolvedBrowserOptions } from "../config.js";
|
|
7
|
+
export interface BrowserToolDeps {
|
|
8
|
+
browser: BrowserManager;
|
|
9
|
+
config: ResolvedBrowserOptions;
|
|
10
|
+
vision: () => boolean;
|
|
11
|
+
notes?: () => string;
|
|
12
|
+
}
|
|
13
|
+
export declare const observationKey: (slot: number) => string;
|
|
14
|
+
export type ActResult = ActionResult;
|
|
15
|
+
export interface PageActionOptions {
|
|
16
|
+
blockedByDialog?: boolean;
|
|
17
|
+
screenshot?: boolean;
|
|
18
|
+
scope?: "viewport" | "full";
|
|
19
|
+
subtreeRef?: string;
|
|
20
|
+
detectChange?: boolean;
|
|
21
|
+
tabSwitch?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare function pageAction(deps: BrowserToolDeps, toolSignal: AbortSignal, act: (tab: Tab, stopwatch: Stopwatch, signal: AbortSignal) => Promise<ActResult>, options?: PageActionOptions): Promise<ToolResult>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TabInfo } from "../browser/tabs.js";
|
|
2
|
+
import { type BrowserToolDeps } from "./shared.js";
|
|
3
|
+
export declare function formatTabs(tabs: TabInfo[]): string;
|
|
4
|
+
export declare function tabsTool(deps: BrowserToolDeps): import("../../sdk/index.js").Tool<{
|
|
5
|
+
action: "close" | "open" | "list" | "switch";
|
|
6
|
+
url?: string | undefined;
|
|
7
|
+
tabId?: string | undefined;
|
|
8
|
+
}>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ProcessManager, type Profile } from "../core/index.js";
|
|
2
|
+
import { TodoStore } from "../sdk/index.js";
|
|
2
3
|
import { InstructionLoader, type InstructionSettings } from "./context.js";
|
|
3
4
|
import { FileState } from "./state.js";
|
|
4
5
|
import { bashTool } from "./tools/bash.js";
|
|
5
|
-
import { TodoStore } from "./tools/todo.js";
|
|
6
6
|
export interface CodingProfileOptions {
|
|
7
7
|
root?: string;
|
|
8
8
|
spawn?: Parameters<typeof bashTool>[0]["spawn"];
|
|
@@ -19,6 +19,8 @@ export interface CodingProfile extends Profile {
|
|
|
19
19
|
instructions: InstructionLoader;
|
|
20
20
|
}
|
|
21
21
|
export declare function codingProfile(options?: CodingProfileOptions): Promise<CodingProfile>;
|
|
22
|
+
export type { TodoItem } from "../sdk/index.js";
|
|
23
|
+
export { renderTodos, TodoStore, todoTool } from "../sdk/index.js";
|
|
22
24
|
export type { GitRunner, ShadowCheckpointOptions } from "./checkpoint.js";
|
|
23
25
|
export { gitConfigNullDevice, ShadowCheckpointProvider } from "./checkpoint.js";
|
|
24
26
|
export { codingEnvironment, contextMessages, DEFAULT_INSTRUCTION_FALLBACKS, DEFAULT_PROJECT_ROOT_MARKERS, discoverContextFiles, environmentMessage, type InstructionDiagnostic, InstructionLoader, type InstructionLoaderOptions, type InstructionSettings, type InstructionSnapshot, type InstructionSource, } from "./context.js";
|
|
@@ -30,6 +32,4 @@ export { FileState } from "./state.js";
|
|
|
30
32
|
export { bashTool } from "./tools/bash.js";
|
|
31
33
|
export { editTool, lsTool, readTool, resolveInRoot, writeTool } from "./tools/files.js";
|
|
32
34
|
export { shellSpawner, taskTools } from "./tools/tasks.js";
|
|
33
|
-
export type { TodoItem } from "./tools/todo.js";
|
|
34
|
-
export { renderTodos, TodoStore, todoTool } from "./tools/todo.js";
|
|
35
35
|
export { MAX_OUTPUT_CHARS, truncateOutput, withNotice } from "./truncate.js";
|
|
@@ -31,6 +31,8 @@ export { defaultSkillRoots, discoverSkills, loadSkill, skillListing, skillsExten
|
|
|
31
31
|
export { STRUCTURED_OUTPUT_TOOL, structuredOutputPrompt, structuredOutputTool, } from "./structured-output.js";
|
|
32
32
|
export type { SubagentDetails, SubagentExtensionOptions, SubagentKind, SubagentProgressUpdate, } from "./subagents.js";
|
|
33
33
|
export { subagentsExtension } from "./subagents.js";
|
|
34
|
+
export type { TodoItem } from "./todo.js";
|
|
35
|
+
export { renderTodos, TodoStore, todoTool } from "./todo.js";
|
|
34
36
|
export type { ToolDefinition, ToolResult } from "./tool.js";
|
|
35
37
|
export { tool } from "./tool.js";
|
|
36
38
|
export type { MarkdownTranscript, TranscriptMarkdownOptions, } from "./transcript-markdown.js";
|
|
@@ -31,6 +31,7 @@ export interface SubagentProgressUpdate {
|
|
|
31
31
|
}
|
|
32
32
|
interface SubagentExtensionBaseOptions {
|
|
33
33
|
parent: () => Agent;
|
|
34
|
+
taskSession?: ProfileSubagents["taskSession"];
|
|
34
35
|
excludeTools?: readonly string[];
|
|
35
36
|
searchModel?: (parent: Agent) => ModelInfo | undefined;
|
|
36
37
|
counselModel?: (parent: Agent) => ModelInfo | undefined;
|
|
@@ -8,9 +8,9 @@ export declare class TodoStore {
|
|
|
8
8
|
all(): TodoItem[];
|
|
9
9
|
}
|
|
10
10
|
export declare function renderTodos(items: TodoItem[]): string;
|
|
11
|
-
export declare function todoTool(store: TodoStore): import("
|
|
11
|
+
export declare function todoTool(store: TodoStore): import("../core/index.js").Tool<{
|
|
12
12
|
items: {
|
|
13
13
|
content: string;
|
|
14
|
-
status: "
|
|
14
|
+
status: "completed" | "pending" | "in_progress";
|
|
15
15
|
}[];
|
|
16
16
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mu-agent/mu",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Mu, a general-purpose extensible AI agent platform for the terminal and TypeScript",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
"registry": "https://registry.npmjs.org/"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
+
"@mu/profile-browser": "workspace:*",
|
|
67
68
|
"@mu/profile-coding": "workspace:*",
|
|
68
69
|
"@mu/tui": "workspace:*",
|
|
69
70
|
"mu": "workspace:*",
|