Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/studio/src/agentToolsExport.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { expect, it } from "vitest";
import { buildStudioTools, collectStudioLookScene } from "@hyperframes/studio";

it("exports Studio's agent tools for a host's own edit session", () => {
const names = buildStudioTools({ current: {} as never }).map((tool) => tool.name);
expect(names).toEqual(expect.arrayContaining(["studio_look", "studio_seek"]));
expect(typeof collectStudioLookScene).toBe("function");
});
7 changes: 7 additions & 0 deletions packages/studio/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,3 +240,10 @@ export type { MarqueeGestures, MarqueeGesturesDeps } from "./components/editor/m
export { MarqueeOverlay } from "./components/editor/MarqueeOverlay";
export type { MarqueeOverlayProps } from "./components/editor/MarqueeOverlay";
export type { Rect as MarqueeRect } from "./utils/marqueeGeometry";

export { buildStudioTools } from "./webmcp/useStudioAgentTools";
export type { StudioAgentToolsDeps } from "./webmcp/useStudioAgentTools";
export { collectStudioLookScene } from "./webmcp/tools/lookTools";
export type { StudioLookSnapshot } from "./webmcp/tools/lookTools";
export type { ModelContextTool } from "./webmcp/types";
export type { ToolResult } from "./webmcp/toolResult";
4 changes: 3 additions & 1 deletion packages/studio/src/webmcp/useStudioAgentTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ export interface StudioAgentToolsDeps
* a snapshot, which is what lets the list be built once and still see live
* state. That is the whole point of the ref: see the registration note below.
*/
function buildStudioTools(depsRef: { readonly current: StudioAgentToolsDeps }): ModelContextTool[] {
export function buildStudioTools(depsRef: {
readonly current: StudioAgentToolsDeps;
}): ModelContextTool[] {
/**
* `execute` for a tool whose handler takes the caller's abort signal.
*
Expand Down
Loading