@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/README.md +2 -1
- package/dist/cli.js +65 -2
- package/dist/index.cjs +21 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +108 -4
- package/dist/index.d.ts +108 -4
- package/dist/index.js +21 -2
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +21 -2
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +71 -4
- package/dist/react.d.ts +71 -4
- package/dist/react.js +21 -2
- package/dist/react.js.map +1 -1
- package/package.json +1 -1
- package/skills/lunnoa-client/SKILL.md +20 -4
- package/skills/lunnoa-solution-design/SKILL.md +20 -7
package/dist/react.d.cts
CHANGED
|
@@ -107,7 +107,10 @@ declare class HttpClient {
|
|
|
107
107
|
|
|
108
108
|
type ChatMode = 'builder' | 'preview';
|
|
109
109
|
interface StreamMessageOptions {
|
|
110
|
-
/**
|
|
110
|
+
/**
|
|
111
|
+
* Agent chat mode. Defaults to `preview` (10 model rounds, a normal agent run).
|
|
112
|
+
* `builder` is the agent-editor interview and stops after 4 rounds.
|
|
113
|
+
*/
|
|
111
114
|
chatMode?: ChatMode;
|
|
112
115
|
/** Optional image attachment forwarded with this turn. */
|
|
113
116
|
data?: {
|
|
@@ -937,7 +940,7 @@ interface components {
|
|
|
937
940
|
description?: string;
|
|
938
941
|
/** @description System instructions / prompt for the agent. */
|
|
939
942
|
instructions: string;
|
|
940
|
-
/** @description
|
|
943
|
+
/** @description Catalogue model id enabled on the AI connection. Example: `deepseek-ai/DeepSeek-V4-Pro`. Discover ids with GET /api/ai-connections. */
|
|
941
944
|
model: string;
|
|
942
945
|
/** @description AiProviderConnection UUID. When omitted, platform AI defaults apply. */
|
|
943
946
|
aiConnectionId?: string;
|
|
@@ -2074,6 +2077,32 @@ interface components {
|
|
|
2074
2077
|
/** Format: date-time */
|
|
2075
2078
|
updatedAt: string;
|
|
2076
2079
|
};
|
|
2080
|
+
PublicAiModelResponseDto: {
|
|
2081
|
+
/** @description Catalogue model id passed to agent deploy as `model`. Example: `deepseek-ai/DeepSeek-V4-Pro`. */
|
|
2082
|
+
id: string;
|
|
2083
|
+
/** @description Display name. */
|
|
2084
|
+
name: string;
|
|
2085
|
+
/** @description True when this is the model used if an agent deploy omits `model` on this connection. */
|
|
2086
|
+
isDefault: boolean;
|
|
2087
|
+
/** @description Whether the model can call tools. */
|
|
2088
|
+
supportsTools: boolean;
|
|
2089
|
+
/** @description Whether the model accepts image input. */
|
|
2090
|
+
supportsVision: boolean;
|
|
2091
|
+
/** @description Whether the model exposes a reasoning mode. */
|
|
2092
|
+
supportsReasoning: boolean;
|
|
2093
|
+
};
|
|
2094
|
+
PublicAiConnectionResponseDto: {
|
|
2095
|
+
/** @description AiProviderConnection UUID. Pass as `aiConnectionId` / `defineAiConnection({ id })` when this connection is not the default. */
|
|
2096
|
+
id: string;
|
|
2097
|
+
/** @description Connection display name. Example: `Lunnoa LLMs`. */
|
|
2098
|
+
name: string;
|
|
2099
|
+
/** @description Provider slug. Example: `featherless` or `openai`. */
|
|
2100
|
+
provider: string;
|
|
2101
|
+
/** @description True for the connection used when an agent deploy omits `aiConnectionId`. */
|
|
2102
|
+
isDefault: boolean;
|
|
2103
|
+
/** @description Models this connection accepts. Inactive models are omitted. */
|
|
2104
|
+
models: components["schemas"]["PublicAiModelResponseDto"][];
|
|
2105
|
+
};
|
|
2077
2106
|
ConnectionWorkspaceDto: {
|
|
2078
2107
|
/** @description Workspace ID. */
|
|
2079
2108
|
id: string;
|
|
@@ -2682,7 +2711,10 @@ interface AgentDefinition {
|
|
|
2682
2711
|
slug: string;
|
|
2683
2712
|
name?: string;
|
|
2684
2713
|
description?: string;
|
|
2685
|
-
/**
|
|
2714
|
+
/**
|
|
2715
|
+
* Catalogue model id from `ai-connections list` (`models[].id`).
|
|
2716
|
+
* Example on Lunnoa LLMs: `deepseek-ai/DeepSeek-V4-Pro`.
|
|
2717
|
+
*/
|
|
2686
2718
|
model: string;
|
|
2687
2719
|
instructions: string;
|
|
2688
2720
|
aiConnection?: AiConnectionDefinition;
|
|
@@ -2885,6 +2917,36 @@ declare class SsoAuthResource {
|
|
|
2885
2917
|
getLoginUrl(providerId: string): string;
|
|
2886
2918
|
}
|
|
2887
2919
|
|
|
2920
|
+
interface AiConnectionModel {
|
|
2921
|
+
/** Catalogue id for `defineAgent({ model })`. */
|
|
2922
|
+
id: string;
|
|
2923
|
+
name: string;
|
|
2924
|
+
isDefault: boolean;
|
|
2925
|
+
supportsTools: boolean;
|
|
2926
|
+
supportsVision: boolean;
|
|
2927
|
+
supportsReasoning: boolean;
|
|
2928
|
+
}
|
|
2929
|
+
interface AiConnection {
|
|
2930
|
+
/** AiProviderConnection UUID for `defineAiConnection({ id })`. */
|
|
2931
|
+
id: string;
|
|
2932
|
+
name: string;
|
|
2933
|
+
/** Provider slug, for example `featherless` or `openai`. */
|
|
2934
|
+
provider: string;
|
|
2935
|
+
/** True when agent deploy uses this connection if `aiConnection` is omitted. */
|
|
2936
|
+
isDefault: boolean;
|
|
2937
|
+
models: AiConnectionModel[];
|
|
2938
|
+
}
|
|
2939
|
+
declare class AiConnectionsResource {
|
|
2940
|
+
private readonly http;
|
|
2941
|
+
constructor(http: HttpClient);
|
|
2942
|
+
/**
|
|
2943
|
+
* Lists AI connections the caller can assign to an agent, with the model
|
|
2944
|
+
* ids each connection accepts. Credentials are never included.
|
|
2945
|
+
* Requires `agents:create` (the same permission as agent deploy).
|
|
2946
|
+
*/
|
|
2947
|
+
list(): Promise<AiConnection[]>;
|
|
2948
|
+
}
|
|
2949
|
+
|
|
2888
2950
|
declare class ConnectionsResource {
|
|
2889
2951
|
private readonly http;
|
|
2890
2952
|
constructor(http: HttpClient);
|
|
@@ -3494,6 +3556,8 @@ declare class LunnoaClient {
|
|
|
3494
3556
|
readonly variables: VariablesResource;
|
|
3495
3557
|
readonly scorecards: ScorecardsResource;
|
|
3496
3558
|
readonly connections: ConnectionsResource;
|
|
3559
|
+
/** AI provider connections and the model ids each one accepts. */
|
|
3560
|
+
readonly aiConnections: AiConnectionsResource;
|
|
3497
3561
|
readonly workflowApps: WorkflowAppsResource;
|
|
3498
3562
|
readonly discovery: DiscoveryResource;
|
|
3499
3563
|
constructor(options: LunnoaClientOptions);
|
|
@@ -3645,7 +3709,10 @@ interface UseNeedsInputResult {
|
|
|
3645
3709
|
declare function useNeedsInput(source: NeedsInputSource, options?: UseNeedsInputOptions): UseNeedsInputResult;
|
|
3646
3710
|
|
|
3647
3711
|
interface UseAgentChatOptions {
|
|
3648
|
-
/**
|
|
3712
|
+
/**
|
|
3713
|
+
* Agent chat mode forwarded in the request body.
|
|
3714
|
+
* Defaults to `preview` (10 model rounds). `builder` stops after 4 rounds.
|
|
3715
|
+
*/
|
|
3649
3716
|
chatMode?: 'builder' | 'preview';
|
|
3650
3717
|
}
|
|
3651
3718
|
interface UseAgentChatResult {
|
package/dist/react.d.ts
CHANGED
|
@@ -107,7 +107,10 @@ declare class HttpClient {
|
|
|
107
107
|
|
|
108
108
|
type ChatMode = 'builder' | 'preview';
|
|
109
109
|
interface StreamMessageOptions {
|
|
110
|
-
/**
|
|
110
|
+
/**
|
|
111
|
+
* Agent chat mode. Defaults to `preview` (10 model rounds, a normal agent run).
|
|
112
|
+
* `builder` is the agent-editor interview and stops after 4 rounds.
|
|
113
|
+
*/
|
|
111
114
|
chatMode?: ChatMode;
|
|
112
115
|
/** Optional image attachment forwarded with this turn. */
|
|
113
116
|
data?: {
|
|
@@ -937,7 +940,7 @@ interface components {
|
|
|
937
940
|
description?: string;
|
|
938
941
|
/** @description System instructions / prompt for the agent. */
|
|
939
942
|
instructions: string;
|
|
940
|
-
/** @description
|
|
943
|
+
/** @description Catalogue model id enabled on the AI connection. Example: `deepseek-ai/DeepSeek-V4-Pro`. Discover ids with GET /api/ai-connections. */
|
|
941
944
|
model: string;
|
|
942
945
|
/** @description AiProviderConnection UUID. When omitted, platform AI defaults apply. */
|
|
943
946
|
aiConnectionId?: string;
|
|
@@ -2074,6 +2077,32 @@ interface components {
|
|
|
2074
2077
|
/** Format: date-time */
|
|
2075
2078
|
updatedAt: string;
|
|
2076
2079
|
};
|
|
2080
|
+
PublicAiModelResponseDto: {
|
|
2081
|
+
/** @description Catalogue model id passed to agent deploy as `model`. Example: `deepseek-ai/DeepSeek-V4-Pro`. */
|
|
2082
|
+
id: string;
|
|
2083
|
+
/** @description Display name. */
|
|
2084
|
+
name: string;
|
|
2085
|
+
/** @description True when this is the model used if an agent deploy omits `model` on this connection. */
|
|
2086
|
+
isDefault: boolean;
|
|
2087
|
+
/** @description Whether the model can call tools. */
|
|
2088
|
+
supportsTools: boolean;
|
|
2089
|
+
/** @description Whether the model accepts image input. */
|
|
2090
|
+
supportsVision: boolean;
|
|
2091
|
+
/** @description Whether the model exposes a reasoning mode. */
|
|
2092
|
+
supportsReasoning: boolean;
|
|
2093
|
+
};
|
|
2094
|
+
PublicAiConnectionResponseDto: {
|
|
2095
|
+
/** @description AiProviderConnection UUID. Pass as `aiConnectionId` / `defineAiConnection({ id })` when this connection is not the default. */
|
|
2096
|
+
id: string;
|
|
2097
|
+
/** @description Connection display name. Example: `Lunnoa LLMs`. */
|
|
2098
|
+
name: string;
|
|
2099
|
+
/** @description Provider slug. Example: `featherless` or `openai`. */
|
|
2100
|
+
provider: string;
|
|
2101
|
+
/** @description True for the connection used when an agent deploy omits `aiConnectionId`. */
|
|
2102
|
+
isDefault: boolean;
|
|
2103
|
+
/** @description Models this connection accepts. Inactive models are omitted. */
|
|
2104
|
+
models: components["schemas"]["PublicAiModelResponseDto"][];
|
|
2105
|
+
};
|
|
2077
2106
|
ConnectionWorkspaceDto: {
|
|
2078
2107
|
/** @description Workspace ID. */
|
|
2079
2108
|
id: string;
|
|
@@ -2682,7 +2711,10 @@ interface AgentDefinition {
|
|
|
2682
2711
|
slug: string;
|
|
2683
2712
|
name?: string;
|
|
2684
2713
|
description?: string;
|
|
2685
|
-
/**
|
|
2714
|
+
/**
|
|
2715
|
+
* Catalogue model id from `ai-connections list` (`models[].id`).
|
|
2716
|
+
* Example on Lunnoa LLMs: `deepseek-ai/DeepSeek-V4-Pro`.
|
|
2717
|
+
*/
|
|
2686
2718
|
model: string;
|
|
2687
2719
|
instructions: string;
|
|
2688
2720
|
aiConnection?: AiConnectionDefinition;
|
|
@@ -2885,6 +2917,36 @@ declare class SsoAuthResource {
|
|
|
2885
2917
|
getLoginUrl(providerId: string): string;
|
|
2886
2918
|
}
|
|
2887
2919
|
|
|
2920
|
+
interface AiConnectionModel {
|
|
2921
|
+
/** Catalogue id for `defineAgent({ model })`. */
|
|
2922
|
+
id: string;
|
|
2923
|
+
name: string;
|
|
2924
|
+
isDefault: boolean;
|
|
2925
|
+
supportsTools: boolean;
|
|
2926
|
+
supportsVision: boolean;
|
|
2927
|
+
supportsReasoning: boolean;
|
|
2928
|
+
}
|
|
2929
|
+
interface AiConnection {
|
|
2930
|
+
/** AiProviderConnection UUID for `defineAiConnection({ id })`. */
|
|
2931
|
+
id: string;
|
|
2932
|
+
name: string;
|
|
2933
|
+
/** Provider slug, for example `featherless` or `openai`. */
|
|
2934
|
+
provider: string;
|
|
2935
|
+
/** True when agent deploy uses this connection if `aiConnection` is omitted. */
|
|
2936
|
+
isDefault: boolean;
|
|
2937
|
+
models: AiConnectionModel[];
|
|
2938
|
+
}
|
|
2939
|
+
declare class AiConnectionsResource {
|
|
2940
|
+
private readonly http;
|
|
2941
|
+
constructor(http: HttpClient);
|
|
2942
|
+
/**
|
|
2943
|
+
* Lists AI connections the caller can assign to an agent, with the model
|
|
2944
|
+
* ids each connection accepts. Credentials are never included.
|
|
2945
|
+
* Requires `agents:create` (the same permission as agent deploy).
|
|
2946
|
+
*/
|
|
2947
|
+
list(): Promise<AiConnection[]>;
|
|
2948
|
+
}
|
|
2949
|
+
|
|
2888
2950
|
declare class ConnectionsResource {
|
|
2889
2951
|
private readonly http;
|
|
2890
2952
|
constructor(http: HttpClient);
|
|
@@ -3494,6 +3556,8 @@ declare class LunnoaClient {
|
|
|
3494
3556
|
readonly variables: VariablesResource;
|
|
3495
3557
|
readonly scorecards: ScorecardsResource;
|
|
3496
3558
|
readonly connections: ConnectionsResource;
|
|
3559
|
+
/** AI provider connections and the model ids each one accepts. */
|
|
3560
|
+
readonly aiConnections: AiConnectionsResource;
|
|
3497
3561
|
readonly workflowApps: WorkflowAppsResource;
|
|
3498
3562
|
readonly discovery: DiscoveryResource;
|
|
3499
3563
|
constructor(options: LunnoaClientOptions);
|
|
@@ -3645,7 +3709,10 @@ interface UseNeedsInputResult {
|
|
|
3645
3709
|
declare function useNeedsInput(source: NeedsInputSource, options?: UseNeedsInputOptions): UseNeedsInputResult;
|
|
3646
3710
|
|
|
3647
3711
|
interface UseAgentChatOptions {
|
|
3648
|
-
/**
|
|
3712
|
+
/**
|
|
3713
|
+
* Agent chat mode forwarded in the request body.
|
|
3714
|
+
* Defaults to `preview` (10 model rounds). `builder` stops after 4 rounds.
|
|
3715
|
+
*/
|
|
3649
3716
|
chatMode?: 'builder' | 'preview';
|
|
3650
3717
|
}
|
|
3651
3718
|
interface UseAgentChatResult {
|
package/dist/react.js
CHANGED
|
@@ -516,7 +516,7 @@ var AgentChatClient = class {
|
|
|
516
516
|
function messageTaskBody(message, options = {}) {
|
|
517
517
|
return {
|
|
518
518
|
messages: [message],
|
|
519
|
-
|
|
519
|
+
chatMode: options.chatMode ?? "preview",
|
|
520
520
|
...options.data ? { data: options.data } : {},
|
|
521
521
|
...options.piiResolution ? { piiResolution: options.piiResolution } : {}
|
|
522
522
|
};
|
|
@@ -891,6 +891,22 @@ var SsoAuthResource = class {
|
|
|
891
891
|
}
|
|
892
892
|
};
|
|
893
893
|
|
|
894
|
+
// src/resources/ai-connections.ts
|
|
895
|
+
var AiConnectionsResource = class {
|
|
896
|
+
constructor(http) {
|
|
897
|
+
this.http = http;
|
|
898
|
+
}
|
|
899
|
+
http;
|
|
900
|
+
/**
|
|
901
|
+
* Lists AI connections the caller can assign to an agent, with the model
|
|
902
|
+
* ids each connection accepts. Credentials are never included.
|
|
903
|
+
* Requires `agents:create` (the same permission as agent deploy).
|
|
904
|
+
*/
|
|
905
|
+
list() {
|
|
906
|
+
return this.http.get("/api/ai-connections");
|
|
907
|
+
}
|
|
908
|
+
};
|
|
909
|
+
|
|
894
910
|
// src/resources/connections.ts
|
|
895
911
|
var ConnectionsResource = class {
|
|
896
912
|
constructor(http) {
|
|
@@ -2116,6 +2132,8 @@ var LunnoaClient = class {
|
|
|
2116
2132
|
variables;
|
|
2117
2133
|
scorecards;
|
|
2118
2134
|
connections;
|
|
2135
|
+
/** AI provider connections and the model ids each one accepts. */
|
|
2136
|
+
aiConnections;
|
|
2119
2137
|
workflowApps;
|
|
2120
2138
|
discovery;
|
|
2121
2139
|
constructor(options) {
|
|
@@ -2139,6 +2157,7 @@ var LunnoaClient = class {
|
|
|
2139
2157
|
this.variables = new VariablesResource(this.http);
|
|
2140
2158
|
this.scorecards = new ScorecardsResource(this.http);
|
|
2141
2159
|
this.connections = new ConnectionsResource(this.http);
|
|
2160
|
+
this.aiConnections = new AiConnectionsResource(this.http);
|
|
2142
2161
|
this.discovery = new DiscoveryResource(this.http);
|
|
2143
2162
|
}
|
|
2144
2163
|
};
|
|
@@ -2540,7 +2559,7 @@ function useAgentChat(agentId, taskId, options = {}) {
|
|
|
2540
2559
|
if (!token) return {};
|
|
2541
2560
|
return { Authorization: `Bearer ${token}` };
|
|
2542
2561
|
},
|
|
2543
|
-
body:
|
|
2562
|
+
body: { chatMode: chatMode ?? "preview" },
|
|
2544
2563
|
prepareReconnectToStreamRequest: ({ headers, credentials }) => ({
|
|
2545
2564
|
api,
|
|
2546
2565
|
headers,
|