Documentation
¶
Index ¶
- Constants
- func ListWorkspaceResources(ctx context.Context) ([]mcpschema.Resource, error)
- func LoadWorkspaceForgeWindow(ctx context.Context, windowKey string) (*forgeTypes.Window, error)
- func ReadWorkspaceResource(ctx context.Context, uri string) (*mcpschema.ReadResourceResult, error)
- func ReadWorkspaceViewResource(ctx context.Context, uri, windowKey string) (*mcpschema.ReadResourceResult, error)
- func WorkspaceForgeRendererURL(windowKey, resourceURI, contentHash string) string
- func WorkspaceViewURI(windowKey string) string
Constants ¶
const WorkspaceForgeRendererPath = "/mcp-ui/forge-window"
WorkspaceForgeRendererPath is the canonical same-origin SPA route the MCP UI host loads inside the bubble iframe when a workspace view resource opts in to richer Forge-backed rendering. The page receives the workspace window key via the `windowKey` query parameter and bootstraps the canonical Forge `WindowContent` renderer through normal authenticated workspace fetches.
const WorkspaceForgeSandbox = "allow-scripts allow-same-origin"
WorkspaceForgeSandbox is the per-resource sandbox opt-in published with workspace view resources. It narrowly adds `allow-same-origin` to the host default so the renderer page can perform authenticated same-origin workspace metadata and datasource fetches; no other relaxations are granted.
const WorkspaceServerScope = "agently.wk_default"
WorkspaceServerScope is the canonical server-scope used to publish workspace-backed forge windows as MCP UI resources. It identifies the default Agently workspace, follows the reserved `agently.*` module prefix, and uses a deterministic suffix so identical effective workspace inputs always yield the same URI across process restarts.
Variables ¶
This section is empty.
Functions ¶
func ListWorkspaceResources ¶
ListWorkspaceResources enumerates workspace-backed Forge windows with view content and exposes them as generic MCP UI resources keyed by windowKey. This stays generic: it publishes what the active workspace declares and does not hardcode any business-specific window identities.
func LoadWorkspaceForgeWindow ¶
LoadWorkspaceForgeWindow loads the workspace-owned forge window for the supplied key by reusing the same canonical workspace fallback the HTTP /window handler uses. It returns (nil, nil) when no window with view content exists under the workspace.
func ReadWorkspaceResource ¶
ReadWorkspaceResource resolves `ui://agently.wk_default/view/<windowKey>` URIs against the canonical workspace forge window loader. The HTML payload is server-assembled from the loaded forge window so the surface flows through MCP UI without inventing a parallel app-specific tool or rendering path.
func ReadWorkspaceViewResource ¶
func ReadWorkspaceViewResource(ctx context.Context, uri, windowKey string) (*mcpschema.ReadResourceResult, error)
ReadWorkspaceViewResource loads the workspace-owned forge window identified by windowKey and assembles a workspace-backed MCP UI HTML resource for the exact uri supplied by the caller.
This helper is intentionally additive: it does not mutate ui/view behavior or rely on hosted-region open semantics. Callers provide the exact `ui://...` identity they want to publish, while the backing window truth still comes from the canonical workspace forge window loader.
func WorkspaceForgeRendererURL ¶
WorkspaceForgeRendererURL returns the canonical same-origin renderer URL for the workspace forge window identified by windowKey and resource URI. The URL includes the exact `resourceUri` plus a deterministic content-hash query argument so embedded bubbles do not reuse a stale renderer page after the published workspace UI resource changes.
func WorkspaceViewURI ¶
WorkspaceViewURI returns the canonical `ui://...` resource URI for the workspace-owned forge window identified by windowKey.
Types ¶
This section is empty.