@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.
- package/README.md +168 -2
- package/dist/commands/agents/builder.d.ts +10 -0
- package/dist/commands/agents/builder.d.ts.map +1 -0
- package/dist/commands/agents/builder.js +243 -0
- package/dist/commands/agents/builder.js.map +1 -0
- package/dist/commands/agents/flows.d.ts.map +1 -1
- package/dist/commands/agents/flows.js +253 -25
- package/dist/commands/agents/flows.js.map +1 -1
- package/dist/commands/agents/intents.d.ts +3 -0
- package/dist/commands/agents/intents.d.ts.map +1 -0
- package/dist/commands/agents/intents.js +137 -0
- package/dist/commands/agents/intents.js.map +1 -0
- package/dist/commands/agents/use.d.ts +3 -0
- package/dist/commands/agents/use.d.ts.map +1 -0
- package/dist/commands/agents/use.js +33 -0
- package/dist/commands/agents/use.js.map +1 -0
- package/dist/commands/agents/variables.d.ts +3 -0
- package/dist/commands/agents/variables.d.ts.map +1 -0
- package/dist/commands/agents/variables.js +111 -0
- package/dist/commands/agents/variables.js.map +1 -0
- package/dist/commands/aiModels/index.d.ts +3 -0
- package/dist/commands/aiModels/index.d.ts.map +1 -0
- package/dist/commands/aiModels/index.js +60 -0
- package/dist/commands/aiModels/index.js.map +1 -0
- package/dist/commands/incomingWebhooks/index.d.ts +3 -0
- package/dist/commands/incomingWebhooks/index.d.ts.map +1 -0
- package/dist/commands/incomingWebhooks/index.js +28 -0
- package/dist/commands/incomingWebhooks/index.js.map +1 -0
- package/dist/commands/tools/index.d.ts +3 -0
- package/dist/commands/tools/index.d.ts.map +1 -0
- package/dist/commands/tools/index.js +113 -0
- package/dist/commands/tools/index.js.map +1 -0
- package/dist/commands/util/uuid.d.ts +3 -0
- package/dist/commands/util/uuid.d.ts.map +1 -0
- package/dist/commands/util/uuid.js +15 -0
- package/dist/commands/util/uuid.js.map +1 -0
- package/dist/commands/workflows/analytics.d.ts.map +1 -1
- package/dist/commands/workflows/analytics.js +9 -3
- package/dist/commands/workflows/analytics.js.map +1 -1
- package/dist/commands/workflows/common.d.ts +39 -0
- package/dist/commands/workflows/common.d.ts.map +1 -0
- package/dist/commands/workflows/common.js +45 -0
- package/dist/commands/workflows/common.js.map +1 -0
- package/dist/commands/workflows/create.d.ts +3 -0
- package/dist/commands/workflows/create.d.ts.map +1 -0
- package/dist/commands/workflows/create.js +41 -0
- package/dist/commands/workflows/create.js.map +1 -0
- package/dist/commands/workflows/delete.d.ts +3 -0
- package/dist/commands/workflows/delete.d.ts.map +1 -0
- package/dist/commands/workflows/delete.js +20 -0
- package/dist/commands/workflows/delete.js.map +1 -0
- package/dist/commands/workflows/describe.d.ts +3 -0
- package/dist/commands/workflows/describe.d.ts.map +1 -0
- package/dist/commands/workflows/describe.js +40 -0
- package/dist/commands/workflows/describe.js.map +1 -0
- package/dist/commands/workflows/edges.d.ts +3 -0
- package/dist/commands/workflows/edges.d.ts.map +1 -0
- package/dist/commands/workflows/edges.js +50 -0
- package/dist/commands/workflows/edges.js.map +1 -0
- package/dist/commands/workflows/graph.d.ts +3 -0
- package/dist/commands/workflows/graph.d.ts.map +1 -0
- package/dist/commands/workflows/graph.js +47 -0
- package/dist/commands/workflows/graph.js.map +1 -0
- package/dist/commands/workflows/nodes.d.ts +3 -0
- package/dist/commands/workflows/nodes.d.ts.map +1 -0
- package/dist/commands/workflows/nodes.js +68 -0
- package/dist/commands/workflows/nodes.js.map +1 -0
- package/dist/commands/workflows/update.d.ts +3 -0
- package/dist/commands/workflows/update.d.ts.map +1 -0
- package/dist/commands/workflows/update.js +42 -0
- package/dist/commands/workflows/update.js.map +1 -0
- package/dist/commands/workflows/use.d.ts +3 -0
- package/dist/commands/workflows/use.d.ts.map +1 -0
- package/dist/commands/workflows/use.js +34 -0
- package/dist/commands/workflows/use.js.map +1 -0
- package/dist/commands/workflows/variables.d.ts +3 -0
- package/dist/commands/workflows/variables.d.ts.map +1 -0
- package/dist/commands/workflows/variables.js +105 -0
- package/dist/commands/workflows/variables.js.map +1 -0
- package/dist/index.js +50 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/config.d.ts +9 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +54 -0
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/httpClient.d.ts +2 -1
- package/dist/lib/httpClient.d.ts.map +1 -1
- package/dist/lib/httpClient.js +5 -2
- package/dist/lib/httpClient.js.map +1 -1
- package/dist/max.js +7 -1
- package/dist/max.js.map +1 -1
- package/dist/scripts/postinstall.d.ts.map +1 -1
- package/dist/scripts/postinstall.js +8 -0
- package/dist/scripts/postinstall.js.map +1 -1
- package/dist/skills/agent-builder/SKILL.md +88 -0
- package/dist/skills/ai-models/SKILL.md +43 -0
- package/dist/skills/flow-builder/SKILL.md +124 -0
- package/dist/skills/frontline-agents/SKILL.md +152 -3
- package/dist/skills/frontline-workflows/SKILL.md +170 -3
- package/dist/skills/incoming-webhooks/SKILL.md +36 -0
- package/dist/skills/tools/SKILL.md +65 -0
- package/dist/skills/variables/SKILL.md +82 -0
- package/dist/skills/workflow-builder/SKILL.md +426 -0
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.workflowsDeleteCommand = void 0;
|
|
4
|
+
const commander_1 = require("commander");
|
|
5
|
+
const globalOpts_1 = require("../../lib/globalOpts");
|
|
6
|
+
const output_1 = require("../../lib/output");
|
|
7
|
+
const common_1 = require("./common");
|
|
8
|
+
exports.workflowsDeleteCommand = (0, globalOpts_1.globalOpts)(new commander_1.Command("delete")
|
|
9
|
+
.description("Delete the active workflow or the workflow passed with --workflow-id")
|
|
10
|
+
.option("--workflow-id <id>", "Workflow ID. Defaults to the active workflow")
|
|
11
|
+
.addHelpText("after", `
|
|
12
|
+
Examples:
|
|
13
|
+
$ frontline workflows delete
|
|
14
|
+
$ frontline workflows delete --workflow-id 42`)).action(async (opts) => {
|
|
15
|
+
const workflowId = (0, common_1.resolveWorkflowId)(opts);
|
|
16
|
+
const client = (0, globalOpts_1.requireClient)(opts);
|
|
17
|
+
await client.delete(`workflows/${workflowId}`);
|
|
18
|
+
(0, output_1.success)({ deleted: true, workflowId });
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=delete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../src/commands/workflows/delete.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,qDAAiE;AACjE,6CAA2C;AAC3C,qCAAoE;AAEvD,QAAA,sBAAsB,GAAG,IAAA,uBAAU,EAC5C,IAAI,mBAAO,CAAC,QAAQ,CAAC;KAChB,WAAW,CAAC,sEAAsE,CAAC;KACnF,MAAM,CAAC,oBAAoB,EAAE,8CAA8C,CAAC;KAC5E,WAAW,CACR,OAAO,EACP;;;gDAGoC,CACvC,CACR,CAAC,MAAM,CAAC,KAAK,EAAE,IAA2B,EAAE,EAAE;IAC3C,MAAM,UAAU,GAAG,IAAA,0BAAiB,EAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,MAAM,GAAG,IAAA,0BAAa,EAAC,IAAI,CAAC,CAAC;IACnC,MAAM,MAAM,CAAC,MAAM,CAAO,aAAa,UAAU,EAAE,CAAC,CAAC;IACrD,IAAA,gBAAO,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;AAC3C,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"describe.d.ts","sourceRoot":"","sources":["../../../src/commands/workflows/describe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,eAAO,MAAM,wBAAwB,SAwCnC,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.workflowsDescribeCommand = void 0;
|
|
4
|
+
const commander_1 = require("commander");
|
|
5
|
+
const globalOpts_1 = require("../../lib/globalOpts");
|
|
6
|
+
const output_1 = require("../../lib/output");
|
|
7
|
+
const common_1 = require("./common");
|
|
8
|
+
exports.workflowsDescribeCommand = (0, globalOpts_1.globalOpts)(new commander_1.Command("describe")
|
|
9
|
+
.description("Describe a workflow. Uses the active workflow unless --workflow-id is passed")
|
|
10
|
+
.option("--workflow-id <id>", "Workflow ID. Defaults to the active workflow")
|
|
11
|
+
.option("--include-nodes", "Include workflow nodes")
|
|
12
|
+
.addHelpText("after", `
|
|
13
|
+
Examples:
|
|
14
|
+
$ frontline workflows describe
|
|
15
|
+
$ frontline workflows describe --workflow-id 42 --include-nodes`)).action(async (opts) => {
|
|
16
|
+
const workflowId = (0, common_1.resolveWorkflowId)(opts);
|
|
17
|
+
const client = (0, globalOpts_1.requireClient)(opts);
|
|
18
|
+
const workflow = await client.get(`workflows/${workflowId}${opts.includeNodes ? "?includeNodes=true" : ""}`);
|
|
19
|
+
if (opts.pretty || opts.table) {
|
|
20
|
+
(0, output_1.printKeyValue)({
|
|
21
|
+
id: workflow.id,
|
|
22
|
+
name: workflow.name,
|
|
23
|
+
status: workflow.status,
|
|
24
|
+
triggerType: workflow.triggerType,
|
|
25
|
+
liveSnapshotId: workflow.liveSnapshotId,
|
|
26
|
+
draftSnapshotId: workflow.draftSnapshotId,
|
|
27
|
+
});
|
|
28
|
+
if (workflow.nodes?.length) {
|
|
29
|
+
(0, output_1.printTable)(workflow.nodes, [
|
|
30
|
+
"nodeId",
|
|
31
|
+
"type",
|
|
32
|
+
"alias",
|
|
33
|
+
"name",
|
|
34
|
+
]);
|
|
35
|
+
}
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
(0, output_1.success)(workflow);
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=describe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"describe.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,OAAO;IACX,CAAC;IAED,IAAA,gBAAO,EAAC,QAAQ,CAAC,CAAC;AACtB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edges.d.ts","sourceRoot":"","sources":["../../../src/commands/workflows/edges.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA6DpC,eAAO,MAAM,qBAAqB,SAA4D,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.workflowsEdgesCommand = void 0;
|
|
4
|
+
const commander_1 = require("commander");
|
|
5
|
+
const globalOpts_1 = require("../../lib/globalOpts");
|
|
6
|
+
const output_1 = require("../../lib/output");
|
|
7
|
+
const common_1 = require("./common");
|
|
8
|
+
function edgeFromOptions(opts) {
|
|
9
|
+
return {
|
|
10
|
+
source: opts.source,
|
|
11
|
+
sourceHandle: opts.sourceHandle,
|
|
12
|
+
target: opts.target,
|
|
13
|
+
targetHandle: opts.targetHandle,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
const addCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("add")
|
|
17
|
+
.description("Add or replace the outgoing edge for a node")
|
|
18
|
+
.option("--workflow-id <id>", "Workflow ID. Defaults to the active workflow")
|
|
19
|
+
.requiredOption("--source <nodeId>", "Source node ID")
|
|
20
|
+
.requiredOption("--source-handle <handleId>", "Source handle ID")
|
|
21
|
+
.requiredOption("--target <nodeId>", "Target node ID")
|
|
22
|
+
.requiredOption("--target-handle <handleId>", "Target handle ID")
|
|
23
|
+
.addHelpText("after", `
|
|
24
|
+
Examples:
|
|
25
|
+
$ frontline workflows edges add --source trigger_1 --source-handle default --target api_1 --target-handle default`)).action(async (opts) => {
|
|
26
|
+
const workflowId = (0, common_1.resolveWorkflowId)(opts);
|
|
27
|
+
const client = (0, globalOpts_1.requireClient)(opts);
|
|
28
|
+
const graph = await client.post(`workflows/${workflowId}/edges`, {
|
|
29
|
+
edge: edgeFromOptions(opts),
|
|
30
|
+
});
|
|
31
|
+
(0, output_1.success)(graph);
|
|
32
|
+
});
|
|
33
|
+
const removeCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("remove")
|
|
34
|
+
.description("Remove an edge")
|
|
35
|
+
.option("--workflow-id <id>", "Workflow ID. Defaults to the active workflow")
|
|
36
|
+
.requiredOption("--source <nodeId>", "Source node ID")
|
|
37
|
+
.requiredOption("--source-handle <handleId>", "Source handle ID")
|
|
38
|
+
.requiredOption("--target <nodeId>", "Target node ID")
|
|
39
|
+
.requiredOption("--target-handle <handleId>", "Target handle ID")).action(async (opts) => {
|
|
40
|
+
const workflowId = (0, common_1.resolveWorkflowId)(opts);
|
|
41
|
+
const client = (0, globalOpts_1.requireClient)(opts);
|
|
42
|
+
const graph = await client.delete(`workflows/${workflowId}/edges`, {
|
|
43
|
+
edge: edgeFromOptions(opts),
|
|
44
|
+
});
|
|
45
|
+
(0, output_1.success)(graph);
|
|
46
|
+
});
|
|
47
|
+
exports.workflowsEdgesCommand = new commander_1.Command("edges").description("Manage workflow edges");
|
|
48
|
+
exports.workflowsEdgesCommand.addCommand(addCmd);
|
|
49
|
+
exports.workflowsEdgesCommand.addCommand(removeCmd);
|
|
50
|
+
//# sourceMappingURL=edges.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edges.js","sourceRoot":"","sources":["../../../src/commands/workflows/edges.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,qDAAiE;AACjE,6CAA2C;AAC3C,qCAAmF;AASnF,SAAS,eAAe,CAAC,IAAwB;IAC7C,OAAO;QACH,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,YAAY,EAAE,IAAI,CAAC,YAAY;QAC/B,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,YAAY,EAAE,IAAI,CAAC,YAAY;KAClC,CAAC;AACN,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CAAC,CAAC;IAC3C,MAAM,MAAM,GAAG,IAAA,0BAAa,EAAC,IAAI,CAAC,CAAC;IACnC,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,MAAM,CAAgB,aAAa,UAAU,QAAQ,EAAE;QAC9E,IAAI,EAAE,eAAe,CAAC,IAAI,CAAC;KAC9B,CAAC,CAAC;IACH,IAAA,gBAAO,EAAC,KAAK,CAAC,CAAC;AACnB,CAAC,CAAC,CAAC;AAEU,QAAA,qBAAqB,GAAG,IAAI,mBAAO,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,uBAAuB,CAAC,CAAC;AAC/F,6BAAqB,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AACzC,6BAAqB,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../src/commands/workflows/graph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,eAAO,MAAM,qBAAqB,SAqDhC,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.workflowsGraphCommand = void 0;
|
|
4
|
+
const commander_1 = require("commander");
|
|
5
|
+
const globalOpts_1 = require("../../lib/globalOpts");
|
|
6
|
+
const output_1 = require("../../lib/output");
|
|
7
|
+
const common_1 = require("./common");
|
|
8
|
+
exports.workflowsGraphCommand = (0, globalOpts_1.globalOpts)(new commander_1.Command("graph")
|
|
9
|
+
.description("Get the graph for the active workflow or --workflow-id")
|
|
10
|
+
.option("--workflow-id <id>", "Workflow ID. Defaults to the active workflow")
|
|
11
|
+
.addHelpText("after", `
|
|
12
|
+
Examples:
|
|
13
|
+
$ frontline workflows graph
|
|
14
|
+
$ frontline workflows graph --workflow-id 42 --table`)).action(async (opts) => {
|
|
15
|
+
const workflowId = (0, common_1.resolveWorkflowId)(opts);
|
|
16
|
+
const client = (0, globalOpts_1.requireClient)(opts);
|
|
17
|
+
const graph = await client.get(`workflows/${workflowId}/graph`);
|
|
18
|
+
if (opts.pretty || opts.table) {
|
|
19
|
+
(0, output_1.printTable)(graph.nodes, [
|
|
20
|
+
"nodeId",
|
|
21
|
+
"type",
|
|
22
|
+
"alias",
|
|
23
|
+
"name",
|
|
24
|
+
]);
|
|
25
|
+
const edges = graph.nodes.flatMap((node) => (node.handles ?? [])
|
|
26
|
+
.filter((h) => h.sourceEdge)
|
|
27
|
+
.map((h) => ({
|
|
28
|
+
source: h.sourceEdge.from,
|
|
29
|
+
sourceHandle: h.sourceEdge.fromHandleId,
|
|
30
|
+
target: h.sourceEdge.to,
|
|
31
|
+
targetHandle: h.sourceEdge.toHandleId,
|
|
32
|
+
})));
|
|
33
|
+
if (edges.length > 0) {
|
|
34
|
+
console.log("");
|
|
35
|
+
(0, output_1.printSectionTitle)("Edges");
|
|
36
|
+
(0, output_1.printTable)(edges, [
|
|
37
|
+
"source",
|
|
38
|
+
"sourceHandle",
|
|
39
|
+
"target",
|
|
40
|
+
"targetHandle",
|
|
41
|
+
]);
|
|
42
|
+
}
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
(0, output_1.success)(graph);
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=graph.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph.js","sourceRoot":"","sources":["../../../src/commands/workflows/graph.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,qDAAiE;AACjE,6CAA0E;AAC1E,qCAAmF;AAEtE,QAAA,qBAAqB,GAAG,IAAA,uBAAU,EAC3C,IAAI,mBAAO,CAAC,OAAO,CAAC;KACf,WAAW,CAAC,wDAAwD,CAAC;KACrE,MAAM,CAAC,oBAAoB,EAAE,8CAA8C,CAAC;KAC5E,WAAW,CACR,OAAO,EACP;;;uDAG2C,CAC9C,CACR,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O,EAAC,KAAK,CAAC,CAAC;AACnB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../../src/commands/workflows/nodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA0FpC,eAAO,MAAM,qBAAqB,SAA4D,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.workflowsNodesCommand = void 0;
|
|
4
|
+
const commander_1 = require("commander");
|
|
5
|
+
const globalOpts_1 = require("../../lib/globalOpts");
|
|
6
|
+
const output_1 = require("../../lib/output");
|
|
7
|
+
const common_1 = require("./common");
|
|
8
|
+
const listCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("list")
|
|
9
|
+
.description("List nodes for the active workflow or --workflow-id")
|
|
10
|
+
.option("--workflow-id <id>", "Workflow ID. Defaults to the active workflow")).action(async (opts) => {
|
|
11
|
+
const workflowId = (0, common_1.resolveWorkflowId)(opts);
|
|
12
|
+
const client = (0, globalOpts_1.requireClient)(opts);
|
|
13
|
+
const graph = await client.get(`workflows/${workflowId}/graph`);
|
|
14
|
+
if (opts.pretty || opts.table) {
|
|
15
|
+
(0, output_1.printTable)(graph.nodes, [
|
|
16
|
+
"nodeId",
|
|
17
|
+
"type",
|
|
18
|
+
"alias",
|
|
19
|
+
"name",
|
|
20
|
+
]);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
(0, output_1.success)({ results: graph.nodes });
|
|
24
|
+
});
|
|
25
|
+
const createCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("create")
|
|
26
|
+
.description("Create a node in the active workflow or --workflow-id")
|
|
27
|
+
.option("--workflow-id <id>", "Workflow ID. Defaults to the active workflow")
|
|
28
|
+
.requiredOption("--data <json>", "Node JSON payload")
|
|
29
|
+
.addHelpText("after", `
|
|
30
|
+
Examples:
|
|
31
|
+
$ frontline workflows nodes create --data '{"nodeId":"trigger_1","type":"TRIGGER","position":{"positionX":0,"positionY":0},"data":{"type":"TRIGGER","triggerType":"CONTACT_CREATED"}}'`)).action(async (opts) => {
|
|
32
|
+
const workflowId = (0, common_1.resolveWorkflowId)(opts);
|
|
33
|
+
const client = (0, globalOpts_1.requireClient)(opts);
|
|
34
|
+
const node = (0, common_1.parseJsonOption)(opts.data, "--data");
|
|
35
|
+
const result = await client.post(`workflows/${workflowId}/nodes`, { node });
|
|
36
|
+
(0, output_1.success)(result);
|
|
37
|
+
});
|
|
38
|
+
const updateCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("update")
|
|
39
|
+
.description("Update a node in the active workflow or --workflow-id")
|
|
40
|
+
.argument("<nodeId>", "Node ID")
|
|
41
|
+
.option("--workflow-id <id>", "Workflow ID. Defaults to the active workflow")
|
|
42
|
+
.requiredOption("--data <json>", "Partial node JSON payload")
|
|
43
|
+
.addHelpText("after", `
|
|
44
|
+
Examples:
|
|
45
|
+
$ frontline workflows nodes update api_1 --data '{"alias":"Fetch account"}'`)).action(async (nodeId, opts) => {
|
|
46
|
+
const workflowId = (0, common_1.resolveWorkflowId)(opts);
|
|
47
|
+
const client = (0, globalOpts_1.requireClient)(opts);
|
|
48
|
+
const node = (0, common_1.parseJsonOption)(opts.data, "--data");
|
|
49
|
+
const graph = await client.put(`workflows/${workflowId}/nodes/${nodeId}`, {
|
|
50
|
+
node,
|
|
51
|
+
});
|
|
52
|
+
(0, output_1.success)(graph);
|
|
53
|
+
});
|
|
54
|
+
const deleteCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("delete")
|
|
55
|
+
.description("Delete a node and its connected edges")
|
|
56
|
+
.argument("<nodeId>", "Node ID")
|
|
57
|
+
.option("--workflow-id <id>", "Workflow ID. Defaults to the active workflow")).action(async (nodeId, opts) => {
|
|
58
|
+
const workflowId = (0, common_1.resolveWorkflowId)(opts);
|
|
59
|
+
const client = (0, globalOpts_1.requireClient)(opts);
|
|
60
|
+
const graph = await client.delete(`workflows/${workflowId}/nodes/${nodeId}`);
|
|
61
|
+
(0, output_1.success)(graph);
|
|
62
|
+
});
|
|
63
|
+
exports.workflowsNodesCommand = new commander_1.Command("nodes").description("Manage workflow nodes");
|
|
64
|
+
exports.workflowsNodesCommand.addCommand(listCmd);
|
|
65
|
+
exports.workflowsNodesCommand.addCommand(createCmd);
|
|
66
|
+
exports.workflowsNodesCommand.addCommand(updateCmd);
|
|
67
|
+
exports.workflowsNodesCommand.addCommand(deleteCmd);
|
|
68
|
+
//# sourceMappingURL=nodes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodes.js","sourceRoot":"","sources":["../../../src/commands/workflows/nodes.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,qDAAiE;AACjE,6CAAuD;AACvD,qCAMkB;AAMlB,MAAM,OAAO,GAAG,IAAA,uBAAU,EACtB,IAAI,mBAAO,CAAC,MAAM,CAAC;KACd,WAAW,CAAC,qDAAqD,CAAC;KAClE,MAAM,CAAC,oBAAoB,EAAE,8CAA8C,CAAC,CACpF,CAAC,MAAM,CAAC,KAAK,EAAE,IAA2B,EAAE,EAAE;IAC3C,MAAM,UAAU,GAAG,IAAA,0BAAiB,EAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,MAAM,GAAG,IAAA,0BAAa,EAAC,IAAI,CAAC,CAAC;IACnC,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,GAAG,CAAgB,aAAa,UAAU,QAAQ,CAAC,CAAC;IAE/E,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;QAC5B,IAAA,mBAAU,EAAC,KAAK,CAAC,KAA6C,EAAE;YAC5D,QAAQ;YACR,MAAM;YACN,OAAO;YACP,MAAM;SACT,CAAC,CAAC;QACH,OAAO;IACX,CAAC;IAED,IAAA,gBAAO,EAAC,EAAE,OAAO,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ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,eAAO,MAAM,sBAAsB,SA0CjC,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.workflowsUpdateCommand = void 0;
|
|
4
|
+
const commander_1 = require("commander");
|
|
5
|
+
const globalOpts_1 = require("../../lib/globalOpts");
|
|
6
|
+
const output_1 = require("../../lib/output");
|
|
7
|
+
const common_1 = require("./common");
|
|
8
|
+
exports.workflowsUpdateCommand = (0, globalOpts_1.globalOpts)(new commander_1.Command("update")
|
|
9
|
+
.description("Update workflow metadata or status")
|
|
10
|
+
.option("--workflow-id <id>", "Workflow ID. Defaults to the active workflow")
|
|
11
|
+
.option("--name <name>", "Workflow name")
|
|
12
|
+
.option("--description <description>", "Workflow description")
|
|
13
|
+
.option("--status <status>", "Workflow status (ACTIVE, DRAFT, DELETED)")
|
|
14
|
+
.addHelpText("after", `
|
|
15
|
+
Examples:
|
|
16
|
+
$ frontline workflows update --status ACTIVE
|
|
17
|
+
$ frontline workflows update --name "Daily CRM Sync"
|
|
18
|
+
$ frontline workflows update --workflow-id 42 --name "Daily CRM Sync" --status ACTIVE`)).action(async (opts) => {
|
|
19
|
+
const workflowId = (0, common_1.resolveWorkflowId)(opts);
|
|
20
|
+
const client = (0, globalOpts_1.requireClient)(opts);
|
|
21
|
+
let name = opts.name;
|
|
22
|
+
if (!name) {
|
|
23
|
+
const current = await client.get(`workflows/${workflowId}`);
|
|
24
|
+
name = current.name;
|
|
25
|
+
}
|
|
26
|
+
const workflow = await client.put(`workflows/${workflowId}`, {
|
|
27
|
+
name,
|
|
28
|
+
description: opts.description,
|
|
29
|
+
status: opts.status,
|
|
30
|
+
});
|
|
31
|
+
if (opts.pretty || opts.table) {
|
|
32
|
+
(0, output_1.printKeyValue)({
|
|
33
|
+
id: workflow.id,
|
|
34
|
+
name: workflow.name,
|
|
35
|
+
status: workflow.status,
|
|
36
|
+
triggerType: workflow.triggerType,
|
|
37
|
+
});
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
(0, output_1.success)(workflow);
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../src/commands/workflows/update.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,qDAAiE;AACjE,6CAA0D;AAC1D,qCAA8E;AAQjE,QAAA,sBAAsB,GAAG,IAAA,uBAAU,EAC5C,IAAI,mBAAO,CAAC,QAAQ,CAAC;KAChB,WAAW,CAAC,oCAAoC,CAAC;KACjD,MAAM,CAAC,oBAAoB,EAAE,8CAA8C,CAAC;KAC5E,MAAM,CAAC,eAAe,EAAE,eAAe,CAAC;KACxC,MAAM,CAAC,6BAA6B,EAAE,sBAAsB,CAAC;KAC7D,MAAM,CAAC,mBAAmB,EAAE,0CAA0C,CAAC;KACvE,WAAW,CACR,OAAO,EACP;;;;wFAI4E,CAC/E,CACR,CAAC,MAAM,CAAC,KAAK,EAAE,IAA4B,EAAE,EAAE;IAC5C,MAAM,UAAU,GAAG,IAAA,0BAAiB,EAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,MAAM,GAAG,IAAA,0BAAa,EAAC,IAAI,CAAC,CAAC;IAEnC,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;IACrB,IAAI,CAAC,IAAI,EAAE,CAAC;QACR,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,GAAG,CAAW,aAAa,UAAU,EAAE,CAAC,CAAC;QACtE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IACxB,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,GAAG,CAAW,aAAa,UAAU,EAAE,EAAE;QACnE,IAAI;QACJ,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,MAAM,EAAE,IAAI,CAAC,MAAM;KACtB,CAAC,CAAC;IAEH,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;QAC5B,IAAA,sBAAa,EAAC;YACV,EAAE,EAAE,QAAQ,CAAC,EAAE;YACf,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,WAAW,EAAE,QAAQ,CAAC,WAAW;SACpC,CAAC,CAAC;QACH,OAAO;IACX,CAAC;IAED,IAAA,gBAAO,EAAC,QAAQ,CAAC,CAAC;AACtB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use.d.ts","sourceRoot":"","sources":["../../../src/commands/workflows/use.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,eAAO,MAAM,mBAAmB,SAiC9B,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.workflowsUseCommand = void 0;
|
|
4
|
+
const commander_1 = require("commander");
|
|
5
|
+
const globalOpts_1 = require("../../lib/globalOpts");
|
|
6
|
+
const output_1 = require("../../lib/output");
|
|
7
|
+
const common_1 = require("./common");
|
|
8
|
+
exports.workflowsUseCommand = (0, globalOpts_1.globalOpts)(new commander_1.Command("use")
|
|
9
|
+
.description("Select the active workflow for commands that omit --workflow-id")
|
|
10
|
+
.argument("<workflowId>", "Workflow ID")
|
|
11
|
+
.addHelpText("after", `
|
|
12
|
+
Examples:
|
|
13
|
+
$ frontline workflows use 42
|
|
14
|
+
$ frontline workflows graph
|
|
15
|
+
|
|
16
|
+
The selected workflow is stored in the current CLI profile.`)).action(async (workflowIdArg, opts) => {
|
|
17
|
+
const workflowId = Number(workflowIdArg);
|
|
18
|
+
const client = (0, globalOpts_1.requireClient)(opts);
|
|
19
|
+
const workflow = await client.get(`workflows/${workflowId}`);
|
|
20
|
+
(0, common_1.saveActiveWorkflowId)(workflow.id, opts);
|
|
21
|
+
if (opts.pretty || opts.table) {
|
|
22
|
+
(0, output_1.printKeyValue)({
|
|
23
|
+
activeWorkflowId: workflow.id,
|
|
24
|
+
name: workflow.name,
|
|
25
|
+
status: workflow.status,
|
|
26
|
+
});
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
(0, output_1.success)({
|
|
30
|
+
activeWorkflowId: workflow.id,
|
|
31
|
+
workflow,
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=use.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use.js","sourceRoot":"","sources":["../../../src/commands/workflows/use.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,qDAA0E;AAC1E,6CAA0D;AAC1D,qCAA0D;AAE7C,QAAA,mBAAmB,GAAG,IAAA,uBAAU,EACzC,IAAI,mBAAO,CAAC,KAAK,CAAC;KACb,WAAW,CAAC,iEAAiE,CAAC;KAC9E,QAAQ,CAAC,cAAc,EAAE,aAAa,CAAC;KACvC,WAAW,CACR,OAAO,EACP;;;;;4DAKgD,CACnD,CACR,CAAC,MAAM,CAAC,KAAK,EAAE,aAAqB,EAAE,IAAa,EAAE,EAAE;IACpD,MAAM,UAAU,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;IACzC,MAAM,MAAM,GAAG,IAAA,0BAAa,EAAC,IAAI,CAAC,CAAC;IACnC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,GAAG,CAAW,aAAa,UAAU,EAAE,CAAC,CAAC;IAEvE,IAAA,6BAAoB,EAAC,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IAExC,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;QAC5B,IAAA,sBAAa,EAAC;YACV,gBAAgB,EAAE,QAAQ,CAAC,EAAE;YAC7B,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,MAAM,EAAE,QAAQ,CAAC,MAAM;SAC1B,CAAC,CAAC;QACH,OAAO;IACX,CAAC;IAED,IAAA,gBAAO,EAAC;QACJ,gBAAgB,EAAE,QAAQ,CAAC,EAAE;QAC7B,QAAQ;KACX,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variables.d.ts","sourceRoot":"","sources":["../../../src/commands/workflows/variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmCpC,eAAO,MAAM,yBAAyB,SAWjC,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.workflowsVariablesCommand = void 0;
|
|
4
|
+
const commander_1 = require("commander");
|
|
5
|
+
const globalOpts_1 = require("../../lib/globalOpts");
|
|
6
|
+
const output_1 = require("../../lib/output");
|
|
7
|
+
const common_1 = require("./common");
|
|
8
|
+
function variablePayload(options) {
|
|
9
|
+
return {
|
|
10
|
+
name: options.name,
|
|
11
|
+
description: options.description,
|
|
12
|
+
pattern: options.pattern,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
exports.workflowsVariablesCommand = (0, globalOpts_1.globalOpts)(new commander_1.Command("variables"))
|
|
16
|
+
.description("Manage variables for the active workflow")
|
|
17
|
+
.addHelpText("after", `
|
|
18
|
+
Examples:
|
|
19
|
+
$ frontline workflows variables list --table
|
|
20
|
+
$ frontline workflows variables all
|
|
21
|
+
$ frontline workflows variables create --name order_id --description "Order ID"
|
|
22
|
+
$ frontline workflows variables update 123 --name order_id --pattern "^[0-9]+$"
|
|
23
|
+
$ frontline workflows variables check-name order_id`);
|
|
24
|
+
exports.workflowsVariablesCommand.addCommand((0, globalOpts_1.globalOpts)(new commander_1.Command("list")
|
|
25
|
+
.description("List workflow variables")
|
|
26
|
+
.option("--workflow-id <id>", "Workflow ID. Defaults to the active workflow")
|
|
27
|
+
.option("--filter-text <text>", "Filter by name or description")
|
|
28
|
+
.option("--is-default <true|false>", "Filter default variables")).action(async (options) => {
|
|
29
|
+
const workflowId = (0, common_1.resolveWorkflowId)(options);
|
|
30
|
+
const client = (0, globalOpts_1.requireClient)(options);
|
|
31
|
+
const data = await client.get(`workflows/${workflowId}/variables`, {
|
|
32
|
+
filterText: options.filterText,
|
|
33
|
+
isDefault: options.isDefault,
|
|
34
|
+
});
|
|
35
|
+
if (options.pretty || options.table) {
|
|
36
|
+
(0, output_1.printTable)(data.results, [
|
|
37
|
+
"id",
|
|
38
|
+
"name",
|
|
39
|
+
"status",
|
|
40
|
+
"isDefault",
|
|
41
|
+
"pattern",
|
|
42
|
+
]);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
(0, output_1.success)(data);
|
|
46
|
+
}));
|
|
47
|
+
exports.workflowsVariablesCommand.addCommand((0, globalOpts_1.globalOpts)(new commander_1.Command("all")
|
|
48
|
+
.description("List all workflow variables including defaults")
|
|
49
|
+
.option("--workflow-id <id>", "Workflow ID. Defaults to the active workflow")).action(async (options) => {
|
|
50
|
+
const workflowId = (0, common_1.resolveWorkflowId)(options);
|
|
51
|
+
const client = (0, globalOpts_1.requireClient)(options);
|
|
52
|
+
const data = await client.get(`workflows/${workflowId}/variables/all`);
|
|
53
|
+
(0, output_1.success)(data);
|
|
54
|
+
}));
|
|
55
|
+
exports.workflowsVariablesCommand.addCommand((0, globalOpts_1.globalOpts)(new commander_1.Command("create")
|
|
56
|
+
.description("Create a workflow variable")
|
|
57
|
+
.option("--workflow-id <id>", "Workflow ID. Defaults to the active workflow")
|
|
58
|
+
.requiredOption("--name <name>", "Variable name")
|
|
59
|
+
.option("--description <description>", "Variable description")
|
|
60
|
+
.option("--pattern <pattern>", "Optional validation pattern")).action(async (options) => {
|
|
61
|
+
const workflowId = (0, common_1.resolveWorkflowId)(options);
|
|
62
|
+
const client = (0, globalOpts_1.requireClient)(options);
|
|
63
|
+
const variable = await client.post(`workflows/${workflowId}/variables`, variablePayload(options));
|
|
64
|
+
(0, output_1.success)(variable);
|
|
65
|
+
}));
|
|
66
|
+
exports.workflowsVariablesCommand.addCommand((0, globalOpts_1.globalOpts)(new commander_1.Command("describe")
|
|
67
|
+
.description("Describe a workflow variable")
|
|
68
|
+
.argument("<variableId>", "Variable ID")
|
|
69
|
+
.option("--workflow-id <id>", "Workflow ID. Defaults to the active workflow")).action(async (variableId, options) => {
|
|
70
|
+
const workflowId = (0, common_1.resolveWorkflowId)(options);
|
|
71
|
+
const client = (0, globalOpts_1.requireClient)(options);
|
|
72
|
+
const variable = await client.get(`workflows/${workflowId}/variables/${variableId}`);
|
|
73
|
+
(0, output_1.success)(variable);
|
|
74
|
+
}));
|
|
75
|
+
exports.workflowsVariablesCommand.addCommand((0, globalOpts_1.globalOpts)(new commander_1.Command("update")
|
|
76
|
+
.description("Update a workflow variable")
|
|
77
|
+
.argument("<variableId>", "Variable ID")
|
|
78
|
+
.option("--workflow-id <id>", "Workflow ID. Defaults to the active workflow")
|
|
79
|
+
.requiredOption("--name <name>", "Variable name")
|
|
80
|
+
.option("--description <description>", "Variable description")
|
|
81
|
+
.option("--pattern <pattern>", "Optional validation pattern")).action(async (variableId, options) => {
|
|
82
|
+
const workflowId = (0, common_1.resolveWorkflowId)(options);
|
|
83
|
+
const client = (0, globalOpts_1.requireClient)(options);
|
|
84
|
+
const variable = await client.put(`workflows/${workflowId}/variables/${variableId}`, variablePayload(options));
|
|
85
|
+
(0, output_1.success)(variable);
|
|
86
|
+
}));
|
|
87
|
+
exports.workflowsVariablesCommand.addCommand((0, globalOpts_1.globalOpts)(new commander_1.Command("delete")
|
|
88
|
+
.description("Delete a workflow variable")
|
|
89
|
+
.argument("<variableId>", "Variable ID")
|
|
90
|
+
.option("--workflow-id <id>", "Workflow ID. Defaults to the active workflow")).action(async (variableId, options) => {
|
|
91
|
+
const workflowId = (0, common_1.resolveWorkflowId)(options);
|
|
92
|
+
const client = (0, globalOpts_1.requireClient)(options);
|
|
93
|
+
await client.delete(`workflows/${workflowId}/variables/${variableId}`);
|
|
94
|
+
(0, output_1.success)({ deleted: true, variableId: Number(variableId) });
|
|
95
|
+
}));
|
|
96
|
+
exports.workflowsVariablesCommand.addCommand((0, globalOpts_1.globalOpts)(new commander_1.Command("check-name")
|
|
97
|
+
.description("Check whether a workflow variable name exists")
|
|
98
|
+
.argument("<name>", "Variable name")
|
|
99
|
+
.option("--workflow-id <id>", "Workflow ID. Defaults to the active workflow")).action(async (name, options) => {
|
|
100
|
+
const workflowId = (0, common_1.resolveWorkflowId)(options);
|
|
101
|
+
const client = (0, globalOpts_1.requireClient)(options);
|
|
102
|
+
const result = await client.get(`workflows/${workflowId}/variables/check-name`, { name });
|
|
103
|
+
(0, output_1.success)(result);
|
|
104
|
+
}));
|
|
105
|
+
//# sourceMappingURL=variables.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variables.js","sourceRoot":"","sources":["../../../src/commands/workflows/variables.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,qDAAiE;AACjE,6CAAuD;AACvD,qCAAoE;AAwBpE,SAAS,eAAe,CAAC,OAAgC;IACrD,OAAO;QACH,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,OAAO,EAAE,OAAO,CAAC,OAAO;KAC3B,CAAC;AACN,CAAC;AAEY,QAAA,yBAAyB,GAAG,IAAA,uBAAU,EAAC,IAAI,mBAAO,CAAC,WAAW,CAAC,CAAC;KACxE,WAAW,CAAC,0CAA0C,CAAC;KACvD,WAAW,CACR,OAAO,EACP;;;;;;sDAM8C,CACjD,CAAC;AAEN,iCAAyB,CAAC,UAAU,CAChC,IAAA,uBAAU,EACN,IAAI,mBAAO,CAAC,MAAM,CAAC;KACd,WAAW,CAAC,yBAA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MAAM,CAAO,aAAa,UAAU,cAAc,UAAU,EAAE,CAAC,CAAC;IAC7E,IAAA,gBAAO,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;AAC/D,CAAC,CAAC,CACL,CAAC;AAEF,iCAAyB,CAAC,UAAU,CAChC,IAAA,uBAAU,EACN,IAAI,mBAAO,CAAC,YAAY,CAAC;KACpB,WAAW,CAAC,+CAA+C,CAAC;KAC5D,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;KACnC,MAAM,CAAC,oBAAoB,EAAE,8CAA8C,CAAC,CACpF,CAAC,MAAM,CAAC,KAAK,EAAE,IAAY,EAAE,OAAgC,EAAE,EAAE;IAC9D,MAAM,UAAU,GAAG,IAAA,0BAAiB,EAAC,OAAO,CAAC,CAAC;IAC9C,MAAM,MAAM,GAAG,IAAA,0BAAa,EAAC,OAAO,CAAC,CAAC;IACtC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,GAAG,CAC3B,aAAa,UAAU,uBAAuB,EAC9C,EAAE,IAAI,EAAE,CACX,CAAC;IACF,IAAA,gBAAO,EAAC,MAAM,CAAC,CAAC;AACpB,CAAC,CAAC,CACL,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -8,14 +8,31 @@ const whoami_1 = require("./commands/auth/whoami");
|
|
|
8
8
|
const profiles_1 = require("./commands/auth/profiles");
|
|
9
9
|
const table_1 = require("./commands/table");
|
|
10
10
|
const object_1 = require("./commands/object");
|
|
11
|
+
const tools_1 = require("./commands/tools");
|
|
12
|
+
const incomingWebhooks_1 = require("./commands/incomingWebhooks");
|
|
13
|
+
const aiModels_1 = require("./commands/aiModels");
|
|
11
14
|
const list_1 = require("./commands/agents/list");
|
|
12
15
|
const flows_1 = require("./commands/agents/flows");
|
|
13
16
|
const analytics_1 = require("./commands/agents/analytics");
|
|
17
|
+
const use_1 = require("./commands/agents/use");
|
|
18
|
+
const intents_1 = require("./commands/agents/intents");
|
|
19
|
+
const variables_1 = require("./commands/agents/variables");
|
|
20
|
+
const builder_1 = require("./commands/agents/builder");
|
|
14
21
|
const list_2 = require("./commands/workflows/list");
|
|
15
22
|
const analytics_2 = require("./commands/workflows/analytics");
|
|
23
|
+
const create_1 = require("./commands/workflows/create");
|
|
24
|
+
const delete_1 = require("./commands/workflows/delete");
|
|
25
|
+
const describe_1 = require("./commands/workflows/describe");
|
|
26
|
+
const edges_1 = require("./commands/workflows/edges");
|
|
27
|
+
const graph_1 = require("./commands/workflows/graph");
|
|
28
|
+
const nodes_1 = require("./commands/workflows/nodes");
|
|
29
|
+
const update_1 = require("./commands/workflows/update");
|
|
30
|
+
const use_2 = require("./commands/workflows/use");
|
|
31
|
+
const variables_2 = require("./commands/workflows/variables");
|
|
16
32
|
const get_1 = require("./commands/billing/get");
|
|
17
33
|
const raw_1 = require("./commands/api/raw");
|
|
18
34
|
const claudeSkills_1 = require("./commands/setup/claudeSkills");
|
|
35
|
+
const uuid_1 = require("./commands/util/uuid");
|
|
19
36
|
const output_1 = require("./lib/output");
|
|
20
37
|
const helpEpilog_1 = require("./lib/helpEpilog");
|
|
21
38
|
const pkg = require("../package.json");
|
|
@@ -23,7 +40,7 @@ const program = new commander_1.Command();
|
|
|
23
40
|
program
|
|
24
41
|
.name("frontline")
|
|
25
42
|
.description("Frontline CLI — Public API (per-account API key): auth, tables, objects, agents, workflows, billing, raw GET. Base URL is per profile; override with flags or env.")
|
|
26
|
-
.version(pkg.version ?? "0.0.0")
|
|
43
|
+
.version(pkg.version ?? "0.0.0", "-v, --version")
|
|
27
44
|
.addHelpText("after", `\n${helpEpilog_1.FRONTLINE_CLI_EPILOG}\n`);
|
|
28
45
|
// ── auth ──────────────────────────────────────────────
|
|
29
46
|
const authCmd = new commander_1.Command("auth").description("Manage Public API authentication (API key + saved base URL per profile)");
|
|
@@ -35,14 +52,37 @@ program.addCommand(authCmd);
|
|
|
35
52
|
// ── resource groups ───────────────────────────────────
|
|
36
53
|
program.addCommand(table_1.tableCommand);
|
|
37
54
|
program.addCommand(object_1.objectCommand);
|
|
55
|
+
program.addCommand(tools_1.toolsCommand);
|
|
56
|
+
program.addCommand(incomingWebhooks_1.incomingWebhooksCommand);
|
|
57
|
+
program.addCommand(aiModels_1.aiModelsCommand);
|
|
38
58
|
// ── agents / workflows / billing ──────────────────────
|
|
39
59
|
const agentsCmd = new commander_1.Command("agents").description("Manage agents");
|
|
40
60
|
agentsCmd.addCommand(list_1.agentsListCommand);
|
|
61
|
+
agentsCmd.addCommand(builder_1.agentsCreateCommand);
|
|
62
|
+
agentsCmd.addCommand(use_1.agentsUseCommand);
|
|
63
|
+
agentsCmd.addCommand(builder_1.agentsDescribeCommand);
|
|
64
|
+
agentsCmd.addCommand(builder_1.agentsUpdateCommand);
|
|
65
|
+
agentsCmd.addCommand(builder_1.agentsDeleteCommand);
|
|
66
|
+
agentsCmd.addCommand(builder_1.agentsDeployCommand);
|
|
67
|
+
agentsCmd.addCommand(builder_1.agentsSettingsCommand);
|
|
68
|
+
agentsCmd.addCommand(builder_1.agentsThemeCommand);
|
|
69
|
+
agentsCmd.addCommand(builder_1.agentsAgentSettingCommand);
|
|
41
70
|
agentsCmd.addCommand(flows_1.agentsFlowsCommand);
|
|
71
|
+
agentsCmd.addCommand(variables_1.agentsVariablesCommand);
|
|
72
|
+
agentsCmd.addCommand(intents_1.agentsIntentsCommand);
|
|
42
73
|
agentsCmd.addCommand(analytics_1.agentsAnalyticsCommand);
|
|
43
74
|
program.addCommand(agentsCmd);
|
|
44
75
|
const workflowsCmd = new commander_1.Command("workflows").description("Manage workflows");
|
|
45
76
|
workflowsCmd.addCommand(list_2.workflowsListCommand);
|
|
77
|
+
workflowsCmd.addCommand(create_1.workflowsCreateCommand);
|
|
78
|
+
workflowsCmd.addCommand(use_2.workflowsUseCommand);
|
|
79
|
+
workflowsCmd.addCommand(describe_1.workflowsDescribeCommand);
|
|
80
|
+
workflowsCmd.addCommand(update_1.workflowsUpdateCommand);
|
|
81
|
+
workflowsCmd.addCommand(delete_1.workflowsDeleteCommand);
|
|
82
|
+
workflowsCmd.addCommand(graph_1.workflowsGraphCommand);
|
|
83
|
+
workflowsCmd.addCommand(nodes_1.workflowsNodesCommand);
|
|
84
|
+
workflowsCmd.addCommand(edges_1.workflowsEdgesCommand);
|
|
85
|
+
workflowsCmd.addCommand(variables_2.workflowsVariablesCommand);
|
|
46
86
|
workflowsCmd.addCommand(analytics_2.workflowsAnalyticsCommand);
|
|
47
87
|
program.addCommand(workflowsCmd);
|
|
48
88
|
const billingCmd = new commander_1.Command("billing").description("Billing information");
|
|
@@ -53,9 +93,18 @@ const apiCmd = new commander_1.Command("api").description("Escape hatch for ad-h
|
|
|
53
93
|
apiCmd.addCommand(raw_1.apiRawCommand);
|
|
54
94
|
program.addCommand(apiCmd);
|
|
55
95
|
program.addCommand(claudeSkills_1.setupCommand);
|
|
96
|
+
const utilCmd = new commander_1.Command("util").description("Utility helpers");
|
|
97
|
+
utilCmd.addCommand(uuid_1.utilUuidCommand);
|
|
98
|
+
program.addCommand(utilCmd);
|
|
56
99
|
program.exitOverride();
|
|
100
|
+
function normalizeVersionAlias(argv) {
|
|
101
|
+
if (argv[2] === "-V") {
|
|
102
|
+
argv[2] = "--version";
|
|
103
|
+
}
|
|
104
|
+
}
|
|
57
105
|
async function main() {
|
|
58
106
|
try {
|
|
107
|
+
normalizeVersionAlias(process.argv);
|
|
59
108
|
await program.parseAsync(process.argv);
|
|
60
109
|
}
|
|
61
110
|
catch (err) {
|