@gravity-rail/cli 0.15.0 → 0.16.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/gr.js +287 -21
- package/dist/gr.js.map +1 -1
- package/dist/lib.js +72 -7
- package/dist/lib.js.map +1 -1
- package/package.json +3 -3
package/dist/lib.js
CHANGED
|
@@ -1215,6 +1215,43 @@ var agentTasksDomain = {
|
|
|
1215
1215
|
|
|
1216
1216
|
// src/domains/agents.ts
|
|
1217
1217
|
var COLUMNS = [COL.id(), COL.uuid(), COL.name(), COL.status(), COL.created()];
|
|
1218
|
+
var AGENT_FIELD_REFERENCE = `
|
|
1219
|
+
Field reference for --data JSON (create/update):
|
|
1220
|
+
|
|
1221
|
+
Required on create
|
|
1222
|
+
name (string) Display name
|
|
1223
|
+
chatModelId (string) Text chat model ID (see \`gr ai-models chat\`)
|
|
1224
|
+
e.g. "aws:bedrock:claude-4-5-haiku"
|
|
1225
|
+
|
|
1226
|
+
Optional
|
|
1227
|
+
description (string) Short summary shown in listings
|
|
1228
|
+
systemPrompt (string) Base instructions / identity
|
|
1229
|
+
chatModelConfig (object|null) Chat model overrides (temperature, thinking, \u2026)
|
|
1230
|
+
realtimeModelId (string|null) Voice/realtime model (see \`gr ai-models realtime\`)
|
|
1231
|
+
e.g. "xai:realtime:voice-agent-2" (Grok Voice Think Fast 2)
|
|
1232
|
+
Native models auto-fill tts=native + default voice when
|
|
1233
|
+
realtimeModelConfig is omitted.
|
|
1234
|
+
realtimeModelConfig (object|null) Realtime config. Native example:
|
|
1235
|
+
{"ttsModel":"native","voiceModel":"xai:voice:eve"}
|
|
1236
|
+
Composable (custom:realtime:composable) needs
|
|
1237
|
+
voiceModel + ttsModel + inferenceModel.
|
|
1238
|
+
memberRoleId (number) Role id (omit to use the default Agent role)
|
|
1239
|
+
email / phone / externalId Optional contact fields
|
|
1240
|
+
labelIds (number[]) Member label ids
|
|
1241
|
+
codeInterpreterEnabled (bool)
|
|
1242
|
+
maxDailyActions (number|null)
|
|
1243
|
+
|
|
1244
|
+
Attach an agent\u2019s models/identity to a workflow (draft), then publish:
|
|
1245
|
+
gr workflows update --id <wf> -d '{"copyFromAgentId": <agentId>}'
|
|
1246
|
+
gr workflows publish --id <wf>
|
|
1247
|
+
|
|
1248
|
+
One-shot workflow voice WITHOUT creating an agent (preferred for "use Grok Voice 2"):
|
|
1249
|
+
gr workflows update --id <wf> -d '{"realtimeModelId":"xai:realtime:voice-agent-2"}'
|
|
1250
|
+
gr workflows publish --id <wf>
|
|
1251
|
+
|
|
1252
|
+
List models:
|
|
1253
|
+
gr ai-models chat | realtime | voice
|
|
1254
|
+
`;
|
|
1218
1255
|
var agentsDomain = {
|
|
1219
1256
|
name: "agents",
|
|
1220
1257
|
description: "Manage agents",
|
|
@@ -1231,9 +1268,16 @@ var agentsDomain = {
|
|
|
1231
1268
|
unarchiveMethod: "unarchiveAgent",
|
|
1232
1269
|
columns: COLUMNS,
|
|
1233
1270
|
paginationSupport: "full",
|
|
1234
|
-
|
|
1271
|
+
createHelp: `Create an agent
|
|
1272
|
+
${AGENT_FIELD_REFERENCE}`,
|
|
1273
|
+
updateHelp: `Update an agent. All fields optional.
|
|
1274
|
+
${AGENT_FIELD_REFERENCE}`,
|
|
1275
|
+
createExamples: [
|
|
1276
|
+
`gr agents create -d '{"name":"Support","chatModelId":"aws:bedrock:claude-4-5-haiku","realtimeModelId":"xai:realtime:voice-agent-2"}'`,
|
|
1277
|
+
"gr agents create --file agent.json"
|
|
1278
|
+
],
|
|
1235
1279
|
updateExamples: [
|
|
1236
|
-
`gr agents update --id 42
|
|
1280
|
+
`gr agents update --id 42 -d '{"realtimeModelId":"xai:realtime:voice-agent-2"}'`,
|
|
1237
1281
|
"gr agents update --id 42 --file agent.json"
|
|
1238
1282
|
]
|
|
1239
1283
|
})
|
|
@@ -2205,8 +2249,26 @@ Core
|
|
|
2205
2249
|
name (string) Display name
|
|
2206
2250
|
description (string, optional)
|
|
2207
2251
|
defaultPhoneNumberId (number|null) Outbound caller ID (workspace phone id)
|
|
2252
|
+
defaultInboxId (number|null) Default inbox for inbound messaging
|
|
2208
2253
|
permissions (object, optional) Workflow-level permission flags
|
|
2209
2254
|
|
|
2255
|
+
Assistant / models (live on the DRAFT revision \u2014 publish to go live)
|
|
2256
|
+
assistantName (string) Display name for the workflow assistant
|
|
2257
|
+
assistantIdentity (string) Persona / identity instructions
|
|
2258
|
+
chatModelId (string) Text chat model (see \`gr ai-models chat\`)
|
|
2259
|
+
chatModelConfig (object|null) Chat model overrides
|
|
2260
|
+
realtimeModelId (string|null) Voice/realtime model (see \`gr ai-models realtime\`)
|
|
2261
|
+
One-shot voice example:
|
|
2262
|
+
{"realtimeModelId":"xai:realtime:voice-agent-2"}
|
|
2263
|
+
Native models auto-fill tts=native + default voice
|
|
2264
|
+
(xAI \u2192 xai:voice:eve). Optional explicit config:
|
|
2265
|
+
{"realtimeModelId":"xai:realtime:voice-agent-2",
|
|
2266
|
+
"realtimeModelConfig":{"ttsModel":"native",
|
|
2267
|
+
"voiceModel":"xai:voice:ara"}}
|
|
2268
|
+
realtimeModelConfig (object|null) Realtime config; omit for provider defaults
|
|
2269
|
+
copyFromAgentId (number) Copy full assistant settings from an agent
|
|
2270
|
+
copyFromWorkflowRevisionId (number) Copy assistant settings from a revision
|
|
2271
|
+
|
|
2210
2272
|
Member role access (memberRoleAccess)
|
|
2211
2273
|
Array of objects, NOT bare role ids:
|
|
2212
2274
|
[{"memberRoleId": 6, "accessMode": 1}]
|
|
@@ -2232,6 +2294,9 @@ Use the dedicated commands:
|
|
|
2232
2294
|
workflows revisions edit Branch a published revision back into the draft
|
|
2233
2295
|
workflows revisions diff Compare two revisions
|
|
2234
2296
|
workflows revisions update Edit a revision's label / publish notes
|
|
2297
|
+
|
|
2298
|
+
After changing assistant/realtime fields, publish so live traffic picks them up:
|
|
2299
|
+
gr workflows publish --id <workflowId>
|
|
2235
2300
|
`;
|
|
2236
2301
|
|
|
2237
2302
|
// src/domains/workflows.ts
|
|
@@ -7511,7 +7576,7 @@ var COLUMNS14 = [
|
|
|
7511
7576
|
];
|
|
7512
7577
|
var aiModelsDomain = {
|
|
7513
7578
|
name: "ai-models",
|
|
7514
|
-
description:
|
|
7579
|
+
description: `List available AI models (chat, realtime/voice stacks, speaker voices). Use realtime ids as workflow/agent realtimeModelId; voice ids go in realtimeModelConfig.voiceModel. One-shot workflow voice: gr workflows update -d '{"realtimeModelId":"xai:realtime:voice-agent-2"}' then publish.`,
|
|
7515
7580
|
commands: [
|
|
7516
7581
|
{
|
|
7517
7582
|
path: ["ai-models", "list"],
|
|
@@ -7524,7 +7589,7 @@ var aiModelsDomain = {
|
|
|
7524
7589
|
},
|
|
7525
7590
|
{
|
|
7526
7591
|
path: ["ai-models", "chat"],
|
|
7527
|
-
description: "List chat models",
|
|
7592
|
+
description: "List chat models (use as chatModelId on agents/workflows)",
|
|
7528
7593
|
requiresWorkspace: false,
|
|
7529
7594
|
handler: async ({ ctx }) => {
|
|
7530
7595
|
const result2 = await requireAuth(ctx).apiClient.getChatModels();
|
|
@@ -7533,7 +7598,7 @@ var aiModelsDomain = {
|
|
|
7533
7598
|
},
|
|
7534
7599
|
{
|
|
7535
7600
|
path: ["ai-models", "realtime"],
|
|
7536
|
-
description: "List realtime
|
|
7601
|
+
description: "List realtime/voice stacks (use as realtimeModelId). e.g. xai:realtime:voice-agent-2 = Grok Voice Think Fast 2",
|
|
7537
7602
|
requiresWorkspace: false,
|
|
7538
7603
|
handler: async ({ ctx }) => {
|
|
7539
7604
|
const result2 = await requireAuth(ctx).apiClient.getRealtimeModels();
|
|
@@ -7542,7 +7607,7 @@ var aiModelsDomain = {
|
|
|
7542
7607
|
},
|
|
7543
7608
|
{
|
|
7544
7609
|
path: ["ai-models", "voice"],
|
|
7545
|
-
description: "List voice
|
|
7610
|
+
description: "List speaker voices (use as realtimeModelConfig.voiceModel). Match provider to the realtime model (xai:voice:* with xAI realtime)",
|
|
7546
7611
|
requiresWorkspace: false,
|
|
7547
7612
|
handler: async ({ ctx }) => {
|
|
7548
7613
|
const result2 = await requireAuth(ctx).apiClient.getVoiceModels();
|
|
@@ -14147,7 +14212,7 @@ var widgetDomainsDomain = {
|
|
|
14147
14212
|
}
|
|
14148
14213
|
],
|
|
14149
14214
|
examples: [
|
|
14150
|
-
"gr widget-domains enable -w $WID --domain <uuid> --widgets chat,operator --allow-write",
|
|
14215
|
+
"gr widget-domains enable -w $WID --domain <uuid> --widgets chat,operator-tools --allow-write",
|
|
14151
14216
|
"gr widget-domains enable -w $WID --domain <uuid> --widgets chat --allow-subdomains --port 4444 --allow-write"
|
|
14152
14217
|
],
|
|
14153
14218
|
handler: async ({ ctx, workspace, args }) => {
|