@getfrontline/cli 1.0.4 → 1.0.5

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.
Files changed (104) hide show
  1. package/README.md +168 -2
  2. package/dist/commands/agents/builder.d.ts +10 -0
  3. package/dist/commands/agents/builder.d.ts.map +1 -0
  4. package/dist/commands/agents/builder.js +243 -0
  5. package/dist/commands/agents/builder.js.map +1 -0
  6. package/dist/commands/agents/flows.d.ts.map +1 -1
  7. package/dist/commands/agents/flows.js +253 -25
  8. package/dist/commands/agents/flows.js.map +1 -1
  9. package/dist/commands/agents/intents.d.ts +3 -0
  10. package/dist/commands/agents/intents.d.ts.map +1 -0
  11. package/dist/commands/agents/intents.js +137 -0
  12. package/dist/commands/agents/intents.js.map +1 -0
  13. package/dist/commands/agents/use.d.ts +3 -0
  14. package/dist/commands/agents/use.d.ts.map +1 -0
  15. package/dist/commands/agents/use.js +33 -0
  16. package/dist/commands/agents/use.js.map +1 -0
  17. package/dist/commands/agents/variables.d.ts +3 -0
  18. package/dist/commands/agents/variables.d.ts.map +1 -0
  19. package/dist/commands/agents/variables.js +111 -0
  20. package/dist/commands/agents/variables.js.map +1 -0
  21. package/dist/commands/aiModels/index.d.ts +3 -0
  22. package/dist/commands/aiModels/index.d.ts.map +1 -0
  23. package/dist/commands/aiModels/index.js +60 -0
  24. package/dist/commands/aiModels/index.js.map +1 -0
  25. package/dist/commands/incomingWebhooks/index.d.ts +3 -0
  26. package/dist/commands/incomingWebhooks/index.d.ts.map +1 -0
  27. package/dist/commands/incomingWebhooks/index.js +28 -0
  28. package/dist/commands/incomingWebhooks/index.js.map +1 -0
  29. package/dist/commands/tools/index.d.ts +3 -0
  30. package/dist/commands/tools/index.d.ts.map +1 -0
  31. package/dist/commands/tools/index.js +113 -0
  32. package/dist/commands/tools/index.js.map +1 -0
  33. package/dist/commands/util/uuid.d.ts +3 -0
  34. package/dist/commands/util/uuid.d.ts.map +1 -0
  35. package/dist/commands/util/uuid.js +15 -0
  36. package/dist/commands/util/uuid.js.map +1 -0
  37. package/dist/commands/workflows/analytics.d.ts.map +1 -1
  38. package/dist/commands/workflows/analytics.js +9 -3
  39. package/dist/commands/workflows/analytics.js.map +1 -1
  40. package/dist/commands/workflows/common.d.ts +39 -0
  41. package/dist/commands/workflows/common.d.ts.map +1 -0
  42. package/dist/commands/workflows/common.js +45 -0
  43. package/dist/commands/workflows/common.js.map +1 -0
  44. package/dist/commands/workflows/create.d.ts +3 -0
  45. package/dist/commands/workflows/create.d.ts.map +1 -0
  46. package/dist/commands/workflows/create.js +41 -0
  47. package/dist/commands/workflows/create.js.map +1 -0
  48. package/dist/commands/workflows/delete.d.ts +3 -0
  49. package/dist/commands/workflows/delete.d.ts.map +1 -0
  50. package/dist/commands/workflows/delete.js +20 -0
  51. package/dist/commands/workflows/delete.js.map +1 -0
  52. package/dist/commands/workflows/describe.d.ts +3 -0
  53. package/dist/commands/workflows/describe.d.ts.map +1 -0
  54. package/dist/commands/workflows/describe.js +40 -0
  55. package/dist/commands/workflows/describe.js.map +1 -0
  56. package/dist/commands/workflows/edges.d.ts +3 -0
  57. package/dist/commands/workflows/edges.d.ts.map +1 -0
  58. package/dist/commands/workflows/edges.js +50 -0
  59. package/dist/commands/workflows/edges.js.map +1 -0
  60. package/dist/commands/workflows/graph.d.ts +3 -0
  61. package/dist/commands/workflows/graph.d.ts.map +1 -0
  62. package/dist/commands/workflows/graph.js +47 -0
  63. package/dist/commands/workflows/graph.js.map +1 -0
  64. package/dist/commands/workflows/nodes.d.ts +3 -0
  65. package/dist/commands/workflows/nodes.d.ts.map +1 -0
  66. package/dist/commands/workflows/nodes.js +68 -0
  67. package/dist/commands/workflows/nodes.js.map +1 -0
  68. package/dist/commands/workflows/update.d.ts +3 -0
  69. package/dist/commands/workflows/update.d.ts.map +1 -0
  70. package/dist/commands/workflows/update.js +42 -0
  71. package/dist/commands/workflows/update.js.map +1 -0
  72. package/dist/commands/workflows/use.d.ts +3 -0
  73. package/dist/commands/workflows/use.d.ts.map +1 -0
  74. package/dist/commands/workflows/use.js +34 -0
  75. package/dist/commands/workflows/use.js.map +1 -0
  76. package/dist/commands/workflows/variables.d.ts +3 -0
  77. package/dist/commands/workflows/variables.d.ts.map +1 -0
  78. package/dist/commands/workflows/variables.js +105 -0
  79. package/dist/commands/workflows/variables.js.map +1 -0
  80. package/dist/index.js +50 -1
  81. package/dist/index.js.map +1 -1
  82. package/dist/lib/config.d.ts +9 -0
  83. package/dist/lib/config.d.ts.map +1 -1
  84. package/dist/lib/config.js +54 -0
  85. package/dist/lib/config.js.map +1 -1
  86. package/dist/lib/httpClient.d.ts +2 -1
  87. package/dist/lib/httpClient.d.ts.map +1 -1
  88. package/dist/lib/httpClient.js +5 -2
  89. package/dist/lib/httpClient.js.map +1 -1
  90. package/dist/max.js +7 -1
  91. package/dist/max.js.map +1 -1
  92. package/dist/scripts/postinstall.d.ts.map +1 -1
  93. package/dist/scripts/postinstall.js +8 -0
  94. package/dist/scripts/postinstall.js.map +1 -1
  95. package/dist/skills/agent-builder/SKILL.md +88 -0
  96. package/dist/skills/ai-models/SKILL.md +43 -0
  97. package/dist/skills/flow-builder/SKILL.md +124 -0
  98. package/dist/skills/frontline-agents/SKILL.md +152 -3
  99. package/dist/skills/frontline-workflows/SKILL.md +170 -3
  100. package/dist/skills/incoming-webhooks/SKILL.md +36 -0
  101. package/dist/skills/tools/SKILL.md +65 -0
  102. package/dist/skills/variables/SKILL.md +82 -0
  103. package/dist/skills/workflow-builder/SKILL.md +426 -0
  104. package/package.json +1 -1
package/README.md CHANGED
@@ -55,19 +55,185 @@ frontline auth logout --profile staging
55
55
  ```bash
56
56
  frontline agents list
57
57
  frontline agents list --status active
58
+ frontline agents create --name "Support Agent"
59
+ frontline agents use <agentId>
60
+ frontline agents describe
61
+ frontline agents update --name "Support Agent v2"
62
+ frontline agents deploy --offline false
63
+ frontline agents agent-setting get
64
+ frontline agents agent-setting update --data '{"instructions":"Answer concisely.","temperature":0.2,"aiModelId":1}'
65
+ frontline ai-models list --type TEXT --table
66
+ frontline agents theme get
67
+ frontline agents theme update --data '{"title":"Support","initialMessage":"Hi! How can I help?","placeholder":"Type your message...","avatar":null,"bubbleImage":null,"bubbleColor":"#111827","userMessageColor":"#2563eb","agentMessageColor":"#f3f4f6","bubbleAlignment":"RIGHT","progressIndicator":"DYNAMIC","verticalPositionInPixels":24}'
68
+ frontline agents settings get livechat
69
+ frontline agents settings update whatsapp --data '{"splitMessages":true,"splitCharacterLimit":500,"conversationClose":"NEVER","closeAfter":null,"timeUnit":null,"sendCloseMessage":false,"closeMessageType":"STATIC","closeMessage":null,"closeInstruction":null}'
70
+ frontline agents delete
58
71
  frontline agents flows <agentId>
72
+ frontline agents flows list
73
+ frontline agents flows create --name "Order Routing"
74
+ frontline agents flows use 101
75
+ frontline agents flows describe --include-nodes
76
+ frontline agents flows graph --table
59
77
  frontline agents flows <agentId> --status active
78
+ frontline agents variables list --table
79
+ frontline agents variables create --name customer_name --description "Captured customer name"
80
+ frontline agents variables check-name customer_name
81
+ frontline agents intents list --table
82
+ frontline agents intents create --name cancellation --phrases '["cancel order","stop subscription"]'
60
83
  frontline agents analytics <agentId> --start-date 2025-01-01 --end-date 2025-12-31
61
84
  ```
62
85
 
86
+ Agent-scoped commands use the active agent saved in the current CLI profile.
87
+ `create` selects the new agent automatically and `use <agentId>` switches context.
88
+ `--agent-id` overrides saved context for scripts and CI. Flow commands additionally
89
+ use the active flow; `--flow-id` overrides that context.
90
+ `agents agent-setting update` validates referenced IDs in the same command before
91
+ mutating when the Public API exposes the referenced resource, including
92
+ `aiModelId`, `customToolIds`, and `selectedTables[].id`. The backend still
93
+ performs the final validation for all references and ownership checks.
94
+
95
+ Discover available AI models before setting `aiModelId`:
96
+
97
+ ```bash
98
+ frontline ai-models list --type TEXT --table
99
+ frontline ai-models default --type TEXT
100
+ frontline ai-models describe 1
101
+ ```
102
+
103
+ Build agent flow graphs without the UI:
104
+
105
+ ```bash
106
+ frontline agents flows nodes create --data '{"nodeId":"start_1","type":"START","position":{"positionX":0,"positionY":0}}'
107
+ frontline agents flows nodes create --data '{"nodeId":"say_1","type":"SAY_AI","position":{"positionX":320,"positionY":0},"data":{"type":"SAY_AI","sayWithAi":false,"message":"Hello!"}}'
108
+ frontline agents flows edges add --source start_1 --source-handle default --target say_1 --target-handle default
109
+ frontline agents flows nodes update say_1 --data '{"alias":"Greeting"}'
110
+ frontline agents flows nodes delete say_1
111
+ ```
112
+
113
+ Manage agent variables and intents:
114
+
115
+ ```bash
116
+ frontline agents variables list
117
+ frontline agents variables all
118
+ frontline agents variables create --name customer_name --description "Customer name"
119
+ frontline agents variables describe 123
120
+ frontline agents variables update 123 --name customer_name --pattern "^[A-Za-z ]+$"
121
+ frontline agents variables delete 123
122
+ frontline agents variables check-name customer_name
123
+
124
+ frontline agents intents list
125
+ frontline agents intents all
126
+ frontline agents intents create --name cancellation --phrases '["cancel order","stop subscription"]'
127
+ frontline agents intents describe 10
128
+ frontline agents intents update 10 --name cancellation --phrases '[{"id":1,"phrase":"cancel order"},{"phrase":"stop order"}]'
129
+ frontline agents intents delete 10
130
+ frontline agents intents generate-phrases --name cancellation --samples '["cancel order"]' --amount 5
131
+ ```
132
+
133
+ Variables are referenced in text fields as `{VARIABLE_NAME}`. The name must match
134
+ the variable exactly, including case. Agent flow text fields that support
135
+ replacement include API `url`, `headers[].value`, `parameters[].value`, `body`;
136
+ Say AI `message` and `prompt`; Response AI `instructions`; Tools AI
137
+ `instructions`; Conditional Routing AI `conditions[].expression`; and Dynamic
138
+ Tables `rowId`, `search`, and `rowData` values.
139
+
140
+ ### Tools
141
+
142
+ ```bash
143
+ frontline tools list
144
+ frontline tools list --status ACTIVE --filter-text contact
145
+ frontline tools create --name "Fetch contact" --description "Fetches a CRM contact" --method GET --url "https://api.example.com/contacts/{{contactId}}" --arguments '[{"name":"contactId","dataType":"STRING"}]'
146
+ frontline tools describe 123
147
+ frontline tools update 123 --status PAUSED
148
+ frontline tools update 123 --headers '[{"key":"Authorization","value":"Bearer {{apiKey}}"}]'
149
+ frontline tools delete 123
150
+ ```
151
+
152
+ Public tools currently support API call tools only. WhatsApp template tools are
153
+ not exposed in this Public API/CLI surface yet. Complex fields like `arguments`,
154
+ `headers`, and `queryParams` are JSON arrays.
155
+
156
+ ### AI Models
157
+
158
+ ```bash
159
+ frontline ai-models list
160
+ frontline ai-models list --type TEXT --table
161
+ frontline ai-models list --type TRANSCRIPTION
162
+ frontline ai-models default --type TEXT
163
+ frontline ai-models describe 1
164
+ ```
165
+
166
+ Use TEXT model IDs as `aiModelId` in `frontline agents agent-setting update`.
167
+ The update command validates `aiModelId` before sending the mutation.
168
+
169
+ ### Incoming Webhooks
170
+
171
+ ```bash
172
+ frontline incoming-webhooks create --name "CRM payload"
173
+ frontline incoming-webhooks create --name "CRM payload" --description "Receives contacts"
174
+ frontline incoming-webhooks create --name "Open endpoint" --no-authentication
175
+ ```
176
+
177
+ The create response includes `url` and, when authentication is enabled,
178
+ `accessToken`. Store the token when you create it; existing webhook tokens are
179
+ not exposed by list/detail commands in this CLI surface.
180
+
63
181
  ### Workflows
64
182
 
65
183
  ```bash
66
184
  frontline workflows list
67
185
  frontline workflows list --status active
68
- frontline workflows analytics <workflowId> --start-date 2025-01-01 --end-date 2025-12-31
186
+ frontline workflows create --name "Daily CRM Sync"
187
+ frontline workflows use 42
188
+ frontline workflows describe --include-nodes
189
+ frontline workflows update --name "Daily CRM Sync" --status ACTIVE
190
+ frontline workflows graph --table
191
+ frontline workflows variables list --table
192
+ frontline workflows variables create --name order_id --description "Order ID"
193
+ frontline workflows variables check-name order_id
194
+ frontline workflows analytics --start-date 2025-01-01 --end-date 2025-12-31
195
+ frontline workflows delete
69
196
  ```
70
197
 
198
+ Workflow commands use the active workflow saved in the current CLI profile. `create`
199
+ selects the new workflow automatically and `use <workflowId>` switches context.
200
+ Every workflow-scoped command also accepts `--workflow-id <id>` for scripts and CI.
201
+
202
+ Build graphs without the UI:
203
+
204
+ ```bash
205
+ frontline workflows nodes create --data '{"nodeId":"trigger_1","type":"TRIGGER","position":{"positionX":0,"positionY":0},"data":{"type":"TRIGGER","triggerType":"CONTACT_CREATED"}}'
206
+ frontline workflows nodes create --data '{"nodeId":"api_1","type":"API","position":{"positionX":320,"positionY":0},"data":{"type":"API","url":"https://example.com","method":"GET","headers":[]}}'
207
+ frontline workflows edges add --source trigger_1 --source-handle default --target api_1 --target-handle default
208
+ frontline workflows nodes update api_1 --data '{"alias":"Fetch external data"}'
209
+ frontline workflows nodes delete api_1
210
+ frontline workflows edges remove --source trigger_1 --source-handle default --target api_1 --target-handle default
211
+ ```
212
+
213
+ Manage workflow variables:
214
+
215
+ ```bash
216
+ frontline workflows variables list
217
+ frontline workflows variables all
218
+ frontline workflows variables create --name order_id --description "Order ID"
219
+ frontline workflows variables describe 123
220
+ frontline workflows variables update 123 --name order_id --pattern "^[0-9]+$"
221
+ frontline workflows variables delete 123
222
+ frontline workflows variables check-name order_id
223
+ ```
224
+
225
+ Workflow variables use the same `{VARIABLE_NAME}` interpolation syntax. Automation
226
+ workflows also expose one runtime variable per node, with `name = nodeId`; for
227
+ example, a node with `nodeId` `api_1` can be referenced later as `{api_1}`.
228
+ Interpolable automation fields include API `url`, `headers[].value`,
229
+ `parameters[].value`, `body`; Send Message / Say AI `message` and `prompt`;
230
+ Response AI `instructions`; Tools AI `instructions` and `prompt`; AI Capture
231
+ `prompt` and `instructions`; Data Transformer `prompt`; Conditional Routing AI
232
+ `conditions[].expression`; Dynamic Tables `rowId`, `search`, `rowData` values;
233
+ Transcription `audioUrl`; and WhatsApp template variables in
234
+ `templateVariables.header`, `templateVariables.body`, and
235
+ `templateVariables.buttons`.
236
+
71
237
  ### Billing
72
238
 
73
239
  ```bash
@@ -146,7 +312,7 @@ frontline setup --claude-skills --force # overwrite existing
146
312
 
147
313
  Skills currently shipped:
148
314
 
149
- - **Public API:** `frontline-agents`, `frontline-workflows`, `frontline-billing`, `frontline-api`
315
+ - **Public API:** `frontline-agents`, `agent-builder`, `ai-models`, `tools`, `incoming-webhooks`, `variables`, `flow-builder`, `frontline-workflows`, `workflow-builder`, `frontline-billing`, `frontline-api`
150
316
  - **Max:** `max-chat`, `max-auth`
151
317
  - **Table / Object CRUD:** `auth-and-profiles`, `crm-setup`, `crud-operations`, `pipeline-setup`, `schema-design`, `resource-creation`, `record-type-management`, `relations`, `filter-and-query`, `files`, `notes-and-tasks`, `export-and-delete`, `aggregations`
152
318
 
@@ -0,0 +1,10 @@
1
+ import { Command } from "commander";
2
+ export declare const agentsCreateCommand: Command;
3
+ export declare const agentsDescribeCommand: Command;
4
+ export declare const agentsUpdateCommand: Command;
5
+ export declare const agentsDeleteCommand: Command;
6
+ export declare const agentsDeployCommand: Command;
7
+ export declare const agentsAgentSettingCommand: Command;
8
+ export declare const agentsThemeCommand: Command;
9
+ export declare const agentsSettingsCommand: Command;
10
+ //# sourceMappingURL=builder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../../src/commands/agents/builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA6LpC,eAAO,MAAM,mBAAmB,SAc9B,CAAC;AAEH,eAAO,MAAM,qBAAqB,SAUhC,CAAC;AAEH,eAAO,MAAM,mBAAmB,SAY9B,CAAC;AAEH,eAAO,MAAM,mBAAmB,SAS9B,CAAC;AAEH,eAAO,MAAM,mBAAmB,SAe9B,CAAC;AAEH,eAAO,MAAM,yBAAyB,SAErC,CAAC;AAoCF,eAAO,MAAM,kBAAkB,SAE9B,CAAC;AAiCF,eAAO,MAAM,qBAAqB,SAEjC,CAAC"}
@@ -0,0 +1,243 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.agentsSettingsCommand = exports.agentsThemeCommand = exports.agentsAgentSettingCommand = exports.agentsDeployCommand = exports.agentsDeleteCommand = exports.agentsUpdateCommand = exports.agentsDescribeCommand = exports.agentsCreateCommand = void 0;
4
+ const commander_1 = require("commander");
5
+ const globalOpts_1 = require("../../lib/globalOpts");
6
+ const config_1 = require("../../lib/config");
7
+ const output_1 = require("../../lib/output");
8
+ function parseJsonOption(value, optionName) {
9
+ if (!value) {
10
+ (0, output_1.error)("missing_json", `${optionName} is required`, output_1.EXIT_CODES.BAD_INPUT);
11
+ }
12
+ try {
13
+ return JSON.parse(value);
14
+ }
15
+ catch (err) {
16
+ const message = err instanceof Error ? err.message : String(err);
17
+ (0, output_1.error)("invalid_json", `${optionName} must be valid JSON: ${message}`, output_1.EXIT_CODES.BAD_INPUT);
18
+ }
19
+ }
20
+ function parseBooleanOption(value, optionName) {
21
+ if (value !== "true" && value !== "false") {
22
+ (0, output_1.error)("invalid_boolean", `${optionName} must be either "true" or "false"`, output_1.EXIT_CODES.BAD_INPUT);
23
+ }
24
+ return value === "true";
25
+ }
26
+ function saveActiveAgentId(agentId, opts) {
27
+ try {
28
+ (0, config_1.setActiveAgentId)(agentId, opts.profile);
29
+ }
30
+ catch (err) {
31
+ const message = err instanceof Error ? err.message : String(err);
32
+ (0, output_1.error)("agent_context_error", message, output_1.EXIT_CODES.GENERAL_ERROR);
33
+ }
34
+ }
35
+ function resolveAgentId(opts, positionalAgentId) {
36
+ const agentId = opts.agentId || positionalAgentId || (0, config_1.getActiveAgentId)(opts.profile);
37
+ if (!agentId) {
38
+ (0, output_1.error)("agent_not_selected", "No active agent selected", output_1.EXIT_CODES.BAD_INPUT, {
39
+ suggestion: "Run 'frontline agents use <agent-id>' or pass --agent-id.",
40
+ });
41
+ }
42
+ return agentId;
43
+ }
44
+ function assertChannel(channel) {
45
+ if (!["livechat", "whatsapp", "instagram", "messenger"].includes(channel)) {
46
+ (0, output_1.error)("invalid_channel", "Channel must be one of: livechat, whatsapp, instagram, messenger", output_1.EXIT_CODES.BAD_INPUT);
47
+ }
48
+ }
49
+ function asPositiveInteger(value, fieldName) {
50
+ if (!Number.isInteger(value) || Number(value) <= 0) {
51
+ (0, output_1.error)("invalid_reference_id", `${fieldName} must be a positive integer`, output_1.EXIT_CODES.BAD_INPUT);
52
+ }
53
+ return Number(value);
54
+ }
55
+ function extractIds(values, fieldName) {
56
+ if (values === undefined)
57
+ return [];
58
+ if (!Array.isArray(values)) {
59
+ (0, output_1.error)("invalid_reference_ids", `${fieldName} must be an array`, output_1.EXIT_CODES.BAD_INPUT);
60
+ }
61
+ return values.map((value, index) => asPositiveInteger(value, `${fieldName}[${index}]`));
62
+ }
63
+ function extractSelectedTableIds(values) {
64
+ if (values === undefined)
65
+ return [];
66
+ if (!Array.isArray(values)) {
67
+ (0, output_1.error)("invalid_selected_tables", "selectedTables must be an array", output_1.EXIT_CODES.BAD_INPUT);
68
+ }
69
+ return values.map((value, index) => {
70
+ if (!value || typeof value !== "object" || !("id" in value)) {
71
+ (0, output_1.error)("invalid_selected_table", `selectedTables[${index}] must include an id`, output_1.EXIT_CODES.BAD_INPUT);
72
+ }
73
+ return asPositiveInteger(value.id, `selectedTables[${index}].id`);
74
+ });
75
+ }
76
+ function collectionItems(payload) {
77
+ if (Array.isArray(payload))
78
+ return payload;
79
+ if (payload &&
80
+ typeof payload === "object" &&
81
+ Array.isArray(payload.results)) {
82
+ return payload.results;
83
+ }
84
+ return [];
85
+ }
86
+ async function validateSelectedTableIds(client, tableIds) {
87
+ if (tableIds.length === 0)
88
+ return;
89
+ const [tables, objects] = await Promise.all([
90
+ client.get("tables"),
91
+ client.get("objects"),
92
+ ]);
93
+ const availableIds = new Set([...collectionItems(tables), ...collectionItems(objects)]
94
+ .map((item) => item.id)
95
+ .filter((id) => Number.isInteger(id)));
96
+ const missingIds = tableIds.filter((id) => !availableIds.has(id));
97
+ if (missingIds.length > 0) {
98
+ (0, output_1.error)("referenced_table_not_found", `Referenced table/object IDs were not found: ${missingIds.join(", ")}`, output_1.EXIT_CODES.NOT_FOUND);
99
+ }
100
+ }
101
+ async function validateAgentSettingReferences(client, payload) {
102
+ if (payload.aiModelId !== undefined) {
103
+ const aiModelId = asPositiveInteger(payload.aiModelId, "aiModelId");
104
+ const model = await client.get(`ai-models/${aiModelId}`);
105
+ if (model.type !== "TEXT" || model.isDeleted === true) {
106
+ (0, output_1.error)("invalid_ai_model", "aiModelId must reference an available TEXT AI model", output_1.EXIT_CODES.BAD_INPUT);
107
+ }
108
+ }
109
+ const customToolIds = extractIds(payload.customToolIds, "customToolIds");
110
+ await Promise.all(customToolIds.map((toolId) => client.get(`tools/${toolId}`)));
111
+ await validateSelectedTableIds(client, extractSelectedTableIds(payload.selectedTables));
112
+ }
113
+ exports.agentsCreateCommand = (0, globalOpts_1.globalOpts)(new commander_1.Command("create")
114
+ .description("Create an agent and select it as active")
115
+ .requiredOption("--name <name>", "Agent name")
116
+ .option("--no-use", "Do not set the created agent as active")).action(async (options) => {
117
+ const client = (0, globalOpts_1.requireClient)(options);
118
+ const agent = await client.post("agents", { name: options.name });
119
+ if (options.noUse !== true) {
120
+ saveActiveAgentId(agent.id, options);
121
+ }
122
+ (0, output_1.success)({ ...agent, activeAgent: options.noUse !== true });
123
+ });
124
+ exports.agentsDescribeCommand = (0, globalOpts_1.globalOpts)(new commander_1.Command("describe")
125
+ .description("Describe the active agent or --agent-id")
126
+ .argument("[agentId]", "Agent ID. Defaults to the active agent")
127
+ .option("--agent-id <id>", "Agent ID. Defaults to the active agent")).action(async (agentIdArg, options) => {
128
+ const agentId = resolveAgentId(options, agentIdArg);
129
+ const client = (0, globalOpts_1.requireClient)(options);
130
+ const agent = await client.get(`agents/${encodeURIComponent(agentId)}`);
131
+ (0, output_1.success)(agent);
132
+ });
133
+ exports.agentsUpdateCommand = (0, globalOpts_1.globalOpts)(new commander_1.Command("update")
134
+ .description("Update the active agent or --agent-id")
135
+ .option("--agent-id <id>", "Agent ID. Defaults to the active agent")
136
+ .requiredOption("--name <name>", "Agent name")).action(async (options) => {
137
+ const agentId = resolveAgentId(options);
138
+ const client = (0, globalOpts_1.requireClient)(options);
139
+ const agent = await client.put(`agents/${encodeURIComponent(agentId)}`, {
140
+ name: options.name,
141
+ });
142
+ (0, output_1.success)(agent);
143
+ });
144
+ exports.agentsDeleteCommand = (0, globalOpts_1.globalOpts)(new commander_1.Command("delete")
145
+ .description("Delete the active agent or --agent-id")
146
+ .option("--agent-id <id>", "Agent ID. Defaults to the active agent")).action(async (options) => {
147
+ const agentId = resolveAgentId(options);
148
+ const client = (0, globalOpts_1.requireClient)(options);
149
+ await client.delete(`agents/${encodeURIComponent(agentId)}`);
150
+ (0, output_1.success)({ deleted: true, agentId });
151
+ });
152
+ exports.agentsDeployCommand = (0, globalOpts_1.globalOpts)(new commander_1.Command("deploy")
153
+ .description("Publish or pause the active agent")
154
+ .option("--agent-id <id>", "Agent ID. Defaults to the active agent")
155
+ .requiredOption("--offline <true|false>", "Set true to pause, false to publish")).action(async (options) => {
156
+ const agentId = resolveAgentId(options);
157
+ const client = (0, globalOpts_1.requireClient)(options);
158
+ const agent = await client.put(`agents/${encodeURIComponent(agentId)}/deployment-status`, {
159
+ isOffline: parseBooleanOption(options.offline, "--offline"),
160
+ });
161
+ (0, output_1.success)(agent);
162
+ });
163
+ exports.agentsAgentSettingCommand = (0, globalOpts_1.globalOpts)(new commander_1.Command("agent-setting")).description("Manage agent model, instructions, tools, and connected accounts");
164
+ exports.agentsAgentSettingCommand.addCommand((0, globalOpts_1.globalOpts)(new commander_1.Command("get")
165
+ .description("Get agent setting")
166
+ .option("--agent-id <id>", "Agent ID. Defaults to the active agent")).action(async (options) => {
167
+ const agentId = resolveAgentId(options);
168
+ const client = (0, globalOpts_1.requireClient)(options);
169
+ const setting = await client.get(`agents/${encodeURIComponent(agentId)}/agent-setting`);
170
+ (0, output_1.success)(setting);
171
+ }));
172
+ exports.agentsAgentSettingCommand.addCommand((0, globalOpts_1.globalOpts)(new commander_1.Command("update")
173
+ .description("Update agent setting from JSON")
174
+ .option("--agent-id <id>", "Agent ID. Defaults to the active agent")
175
+ .requiredOption("--data <json>", "Agent setting payload JSON")).action(async (options) => {
176
+ const agentId = resolveAgentId(options);
177
+ const client = (0, globalOpts_1.requireClient)(options);
178
+ const payload = parseJsonOption(options.data, "--data");
179
+ await validateAgentSettingReferences(client, payload);
180
+ const setting = await client.put(`agents/${encodeURIComponent(agentId)}/agent-setting`, payload);
181
+ (0, output_1.success)(setting);
182
+ }));
183
+ exports.agentsThemeCommand = (0, globalOpts_1.globalOpts)(new commander_1.Command("theme")).description("Manage agent theme");
184
+ exports.agentsThemeCommand.addCommand((0, globalOpts_1.globalOpts)(new commander_1.Command("get")
185
+ .description("Get agent theme")
186
+ .option("--agent-id <id>", "Agent ID. Defaults to the active agent")).action(async (options) => {
187
+ const agentId = resolveAgentId(options);
188
+ const client = (0, globalOpts_1.requireClient)(options);
189
+ const theme = await client.get(`agents/${encodeURIComponent(agentId)}/theme`);
190
+ (0, output_1.success)(theme);
191
+ }));
192
+ exports.agentsThemeCommand.addCommand((0, globalOpts_1.globalOpts)(new commander_1.Command("update")
193
+ .description("Update agent theme from JSON")
194
+ .option("--agent-id <id>", "Agent ID. Defaults to the active agent")
195
+ .requiredOption("--data <json>", "Theme payload JSON")).action(async (options) => {
196
+ const agentId = resolveAgentId(options);
197
+ const client = (0, globalOpts_1.requireClient)(options);
198
+ const payload = parseJsonOption(options.data, "--data");
199
+ const theme = await client.put(`agents/${encodeURIComponent(agentId)}/theme`, payload);
200
+ (0, output_1.success)(theme);
201
+ }));
202
+ exports.agentsSettingsCommand = (0, globalOpts_1.globalOpts)(new commander_1.Command("settings")).description("Manage channel settings");
203
+ exports.agentsSettingsCommand.addCommand((0, globalOpts_1.globalOpts)(new commander_1.Command("get")
204
+ .description("Get all channel settings or one channel")
205
+ .argument("[channel]", "livechat, whatsapp, instagram, or messenger")
206
+ .option("--agent-id <id>", "Agent ID. Defaults to the active agent")).action(async (channelArg, options) => {
207
+ const agentId = resolveAgentId(options);
208
+ const client = (0, globalOpts_1.requireClient)(options);
209
+ if (channelArg) {
210
+ assertChannel(channelArg);
211
+ }
212
+ const path = channelArg
213
+ ? `agents/${encodeURIComponent(agentId)}/settings/${channelArg}`
214
+ : `agents/${encodeURIComponent(agentId)}/settings`;
215
+ const settings = await client.get(path);
216
+ (0, output_1.success)(settings);
217
+ }));
218
+ exports.agentsSettingsCommand.addCommand((0, globalOpts_1.globalOpts)(new commander_1.Command("update")
219
+ .description("Update channel settings from JSON")
220
+ .argument("<channel>", "livechat, whatsapp, instagram, or messenger")
221
+ .option("--agent-id <id>", "Agent ID. Defaults to the active agent")
222
+ .requiredOption("--data <json>", "Channel settings payload JSON")).action(async (channelArg, options) => {
223
+ assertChannel(channelArg);
224
+ const agentId = resolveAgentId(options);
225
+ const client = (0, globalOpts_1.requireClient)(options);
226
+ const payload = parseJsonOption(options.data, "--data");
227
+ const settings = await client.put(`agents/${encodeURIComponent(agentId)}/settings/${channelArg}`, payload);
228
+ (0, output_1.success)(settings);
229
+ }));
230
+ exports.agentsSettingsCommand.addCommand((0, globalOpts_1.globalOpts)(new commander_1.Command("list-channels").description("List configurable channel names")).action(async (options) => {
231
+ const channels = [
232
+ { channel: "livechat" },
233
+ { channel: "whatsapp" },
234
+ { channel: "instagram" },
235
+ { channel: "messenger" },
236
+ ];
237
+ if (options.pretty || options.table) {
238
+ (0, output_1.printTable)(channels, ["channel"]);
239
+ return;
240
+ }
241
+ (0, output_1.success)({ results: channels });
242
+ }));
243
+ //# sourceMappingURL=builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builder.js","sourceRoot":"","sources":["../../../src/commands/agents/builder.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,qDAA0E;AAC1E,6CAAsE;AACtE,6CAA0E;AAmC1E,SAAS,eAAe,CAAI,KAAyB,EAAE,UAAkB;IACrE,IAAI,CAAC,KAAK,EAAE,CAAC;QACT,IAAA,cAAK,EAAC,cAAc,EAAE,GAAG,UAAU,cAAc,EAAE,mBAAU,CAAC,SAAS,CAAC,CAAC;IAC7E,CAAC;IAED,IAAI,CAAC;QACD,OAAO,IAAI,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C,CAAC;AACtB,CAAC,CAAC,CACL,CAAC;AAEF,6BAAqB,CAAC,UAAU,CAC5B,IAAA,uBAAU,EAAC,IAAI,mBAAO,CAAC,eAAe,CAAC,CAAC,WAAW,CAAC,iCAAiC,CAAC,CAAC,CAAC,MAAM,CAC1F,KAAK,EAAE,OAAqB,EAAE,EAAE;IAC5B,MAAM,QAAQ,GAAG;QACb,EAAE,OAAO,EAAE,UAAU,EAAE;QACvB,EAAE,OAAO,EAAE,UAAU,EAAE;QACvB,EAAE,OAAO,EAAE,WAAW,EAAE;QACxB,EAAE,OAAO,EAAE,WAAW,EAAE;KAC3B,CAAC;IACF,IAAI,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QAClC,IAAA,mBAAU,EAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;QAClC,OAAO;IACX,CAAC;IACD,IAAA,gBAAO,EAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;AACnC,CAAC,CACJ,CACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"flows.d.ts","sourceRoot":"","sources":["../../../src/commands/agents/flows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiCpC,eAAO,MAAM,kBAAkB,SAuCzB,CAAC"}
1
+ {"version":3,"file":"flows.d.ts","sourceRoot":"","sources":["../../../src/commands/agents/flows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAwIpC,eAAO,MAAM,kBAAkB,SAgBzB,CAAC"}