@xnetjs/plugins 0.2.0 → 0.4.0

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.
@@ -320,6 +320,13 @@ declare class AiSurfaceService {
320
320
  private readonly rollbackSnapshots;
321
321
  /** Contributed tools by name (exploration 0196), de-duped at construction. */
322
322
  private readonly extraTools;
323
+ /**
324
+ * The narrow surface handed to built-in tool handlers and resource routes
325
+ * (`tools/`, `resources/`): closures over the private methods, so the class
326
+ * stays the facade and its public type is unchanged. The closures are lazy —
327
+ * nothing here runs until a tool call or resource read arrives.
328
+ */
329
+ private readonly host;
323
330
  constructor(config: AiSurfaceServiceConfig);
324
331
  /** The contributed (non-built-in) tools, with built-in name collisions removed. */
325
332
  private getExtraTools;
@@ -327,6 +334,11 @@ declare class AiSurfaceService {
327
334
  /** The full tool surface: built-in `xnet_*` tools plus contributed extras. */
328
335
  getTools(): AiToolDefinition[];
329
336
  private builtInTools;
337
+ /**
338
+ * Dispatch a tool call: the built-in registry first (a built-in `xnet_*`
339
+ * name always wins), then contributed tools (plugin/connector `agentTools`,
340
+ * exploration 0196).
341
+ */
330
342
  callTool(name: string, args?: Record<string, unknown>): Promise<unknown>;
331
343
  readResource(uri: string): Promise<AiResourceContent>;
332
344
  toJsonText(value: unknown, format?: 'concise' | 'detailed'): string;