@lunnoa/client 2.1.0 → 2.2.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.
package/dist/react.cjs CHANGED
@@ -518,7 +518,7 @@ var AgentChatClient = class {
518
518
  function messageTaskBody(message, options = {}) {
519
519
  return {
520
520
  messages: [message],
521
- ...options.chatMode ? { chatMode: options.chatMode } : {},
521
+ chatMode: options.chatMode ?? "preview",
522
522
  ...options.data ? { data: options.data } : {},
523
523
  ...options.piiResolution ? { piiResolution: options.piiResolution } : {}
524
524
  };
@@ -893,6 +893,22 @@ var SsoAuthResource = class {
893
893
  }
894
894
  };
895
895
 
896
+ // src/resources/ai-connections.ts
897
+ var AiConnectionsResource = class {
898
+ constructor(http) {
899
+ this.http = http;
900
+ }
901
+ http;
902
+ /**
903
+ * Lists AI connections the caller can assign to an agent, with the model
904
+ * ids each connection accepts. Credentials are never included.
905
+ * Requires `agents:create` (the same permission as agent deploy).
906
+ */
907
+ list() {
908
+ return this.http.get("/api/ai-connections");
909
+ }
910
+ };
911
+
896
912
  // src/resources/connections.ts
897
913
  var ConnectionsResource = class {
898
914
  constructor(http) {
@@ -2118,6 +2134,8 @@ var LunnoaClient = class {
2118
2134
  variables;
2119
2135
  scorecards;
2120
2136
  connections;
2137
+ /** AI provider connections and the model ids each one accepts. */
2138
+ aiConnections;
2121
2139
  workflowApps;
2122
2140
  discovery;
2123
2141
  constructor(options) {
@@ -2141,6 +2159,7 @@ var LunnoaClient = class {
2141
2159
  this.variables = new VariablesResource(this.http);
2142
2160
  this.scorecards = new ScorecardsResource(this.http);
2143
2161
  this.connections = new ConnectionsResource(this.http);
2162
+ this.aiConnections = new AiConnectionsResource(this.http);
2144
2163
  this.discovery = new DiscoveryResource(this.http);
2145
2164
  }
2146
2165
  };
@@ -2542,7 +2561,7 @@ function useAgentChat(agentId, taskId, options = {}) {
2542
2561
  if (!token) return {};
2543
2562
  return { Authorization: `Bearer ${token}` };
2544
2563
  },
2545
- body: chatMode ? { chatMode } : void 0,
2564
+ body: { chatMode: chatMode ?? "preview" },
2546
2565
  prepareReconnectToStreamRequest: ({ headers, credentials }) => ({
2547
2566
  api,
2548
2567
  headers,