@loomcycle/client 0.13.0 → 0.14.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.
@@ -492,6 +492,21 @@ class LoomcycleClient {
492
492
  async a2aAgentDef(input, opts) {
493
493
  return (0, fetch_helpers_js_1.postJSON)(this.ctx, "/v1/_a2aagentdef", input, opts);
494
494
  }
495
+ /** Invoke the v1.x RFC H WebhookDef substrate tool over HTTP.
496
+ * Author + fork + retire inbound webhook definitions at runtime.
497
+ * Mirror of {@link LoomcycleClient.a2aAgentDef} for inbound webhooks.
498
+ *
499
+ * Operator-admin-only: this endpoint requires the bearer token.
500
+ *
501
+ * Op-discriminated input: `{op: "create" | "fork" | "get" |
502
+ * "list" | "retire", ...}`.
503
+ *
504
+ * Raises {@link SubstrateToolRefusedError} on tool-level refusals;
505
+ * {@link InvalidArgumentError} on 400 (malformed JSON);
506
+ * {@link AuthError} on 401. */
507
+ async webhookDef(input, opts) {
508
+ return (0, fetch_helpers_js_1.postJSON)(this.ctx, "/v1/_webhookdef", input, opts);
509
+ }
495
510
  // ---- v0.10.3 Library v2 enumeration (read-only, merged yaml+substrate) ----
496
511
  /** List every agent the runtime knows about — yaml-static + dynamic
497
512
  * AgentDefs merged into one envelope per name. Each entry carries
package/dist/client.d.ts CHANGED
@@ -351,6 +351,21 @@ export declare class LoomcycleClient {
351
351
  a2aAgentDef(input: SubstrateToolInput, opts?: {
352
352
  signal?: AbortSignal;
353
353
  }): Promise<SubstrateToolResponse>;
354
+ /** Invoke the v1.x RFC H WebhookDef substrate tool over HTTP.
355
+ * Author + fork + retire inbound webhook definitions at runtime.
356
+ * Mirror of {@link LoomcycleClient.a2aAgentDef} for inbound webhooks.
357
+ *
358
+ * Operator-admin-only: this endpoint requires the bearer token.
359
+ *
360
+ * Op-discriminated input: `{op: "create" | "fork" | "get" |
361
+ * "list" | "retire", ...}`.
362
+ *
363
+ * Raises {@link SubstrateToolRefusedError} on tool-level refusals;
364
+ * {@link InvalidArgumentError} on 400 (malformed JSON);
365
+ * {@link AuthError} on 401. */
366
+ webhookDef(input: SubstrateToolInput, opts?: {
367
+ signal?: AbortSignal;
368
+ }): Promise<SubstrateToolResponse>;
354
369
  /** List every agent the runtime knows about — yaml-static + dynamic
355
370
  * AgentDefs merged into one envelope per name. Each entry carries
356
371
  * `source: "static-only" | "dynamic-only" | "both"` so callers can
package/dist/client.js CHANGED
@@ -489,6 +489,21 @@ export class LoomcycleClient {
489
489
  async a2aAgentDef(input, opts) {
490
490
  return postJSON(this.ctx, "/v1/_a2aagentdef", input, opts);
491
491
  }
492
+ /** Invoke the v1.x RFC H WebhookDef substrate tool over HTTP.
493
+ * Author + fork + retire inbound webhook definitions at runtime.
494
+ * Mirror of {@link LoomcycleClient.a2aAgentDef} for inbound webhooks.
495
+ *
496
+ * Operator-admin-only: this endpoint requires the bearer token.
497
+ *
498
+ * Op-discriminated input: `{op: "create" | "fork" | "get" |
499
+ * "list" | "retire", ...}`.
500
+ *
501
+ * Raises {@link SubstrateToolRefusedError} on tool-level refusals;
502
+ * {@link InvalidArgumentError} on 400 (malformed JSON);
503
+ * {@link AuthError} on 401. */
504
+ async webhookDef(input, opts) {
505
+ return postJSON(this.ctx, "/v1/_webhookdef", input, opts);
506
+ }
492
507
  // ---- v0.10.3 Library v2 enumeration (read-only, merged yaml+substrate) ----
493
508
  /** List every agent the runtime knows about — yaml-static + dynamic
494
509
  * AgentDefs merged into one envelope per name. Each entry carries
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loomcycle/client",
3
- "version": "0.13.0",
3
+ "version": "0.14.1",
4
4
  "description": "TypeScript client for the loomcycle sidecar (HTTP+SSE). 46 methods covering run streaming, agent metadata, pause/resume/state, snapshot lifecycle, memory admin (incl. v0.9.0 Vector Memory embed_stats + reembed AND v0.11.5 setMemoryEntry + deleteMemoryEntry), interruption resolve, hook management, v0.8.22 substrate admin (agentDef + skillDef), v0.9.x n8n Phase 0 (listChannels + streamUserRunStates), v0.9.x Channel CRUD (publishChannel + subscribeChannel + peekChannel + ackChannel), v0.11.5 Channel admin CRUD (createChannel + updateChannel + deleteChannel — runtime substrate; yaml channels refuse mutation with HTTP 409), v0.9.x content_sha256 verify, v0.9.1 transcript first-cycle, v0.9.x dynamic MCP server registration (mcpServerDef + MCPServerDefVerifyResult), v0.10.3 Library v2 enumeration (listLibraryAgents + listLibrarySkills + listLibraryMcpServers), and v0.11.0 LLM Gateway (llmChat + llmStream — direct provider routing without agent overhead; primary target is n8n's LoomCycleChatModel AI Agent sub-node and any LangChain-compatible consumer). v0.10.1 — dual ESM + CommonJS distribution (additive — ESM consumers unchanged; CJS consumers like n8n's community-node loader now work).",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",