openxgen 1.5.0 → 1.6.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/index.js +32 -15
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -365,6 +365,7 @@ var init_auth = __esm({
|
|
|
365
365
|
var workflow_exports = {};
|
|
366
366
|
__export(workflow_exports, {
|
|
367
367
|
executeWorkflow: () => executeWorkflow,
|
|
368
|
+
executeWorkflowSSE: () => executeWorkflowSSE,
|
|
368
369
|
executeWorkflowStream: () => executeWorkflowStream,
|
|
369
370
|
getExecutionStatus: () => getExecutionStatus,
|
|
370
371
|
getIOLogs: () => getIOLogs,
|
|
@@ -401,11 +402,25 @@ async function executeWorkflowStream(request) {
|
|
|
401
402
|
}
|
|
402
403
|
async function executeWorkflow(request) {
|
|
403
404
|
const client2 = getClient();
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
405
|
+
const body = {
|
|
406
|
+
...request,
|
|
407
|
+
user_id: request.user_id ?? 1,
|
|
408
|
+
response_format: "json"
|
|
409
|
+
};
|
|
410
|
+
const res = await client2.post("/api/workflow/execute/deploy/stream", body);
|
|
411
|
+
return res.data;
|
|
412
|
+
}
|
|
413
|
+
async function executeWorkflowSSE(request) {
|
|
414
|
+
const client2 = getClient();
|
|
415
|
+
const body = {
|
|
416
|
+
...request,
|
|
417
|
+
user_id: request.user_id ?? 1,
|
|
418
|
+
response_format: "stream"
|
|
419
|
+
};
|
|
420
|
+
const res = await client2.post("/api/workflow/execute/deploy/stream", body, {
|
|
421
|
+
responseType: "stream",
|
|
422
|
+
headers: { Accept: "text/event-stream" }
|
|
423
|
+
});
|
|
409
424
|
return res.data;
|
|
410
425
|
}
|
|
411
426
|
async function getExecutionStatus(executionId) {
|
|
@@ -2480,14 +2495,13 @@ var definitions = [
|
|
|
2480
2495
|
type: "function",
|
|
2481
2496
|
function: {
|
|
2482
2497
|
name: "xgen_workflow_run",
|
|
2483
|
-
description: "XGEN \uC6CC\uD06C\uD50C\uB85C\uC6B0\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4. \uBC30\uD3EC\
|
|
2498
|
+
description: "XGEN \uC6CC\uD06C\uD50C\uB85C\uC6B0\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4. \uBC30\uD3EC \uC5EC\uBD80\uC640 \uAD00\uACC4\uC5C6\uC774 \uBAA8\uB4E0 \uC6CC\uD06C\uD50C\uB85C\uC6B0 \uC2E4\uD589 \uAC00\uB2A5.",
|
|
2484
2499
|
parameters: {
|
|
2485
2500
|
type: "object",
|
|
2486
2501
|
properties: {
|
|
2487
2502
|
workflow_id: { type: "string", description: "\uC6CC\uD06C\uD50C\uB85C\uC6B0 ID" },
|
|
2488
2503
|
workflow_name: { type: "string", description: "\uC6CC\uD06C\uD50C\uB85C\uC6B0 \uC774\uB984" },
|
|
2489
|
-
input_data: { type: "string", description: "\uC785\uB825 \uBA54\uC2DC\uC9C0" }
|
|
2490
|
-
deploy_key: { type: "string", description: "\uBC30\uD3EC \uD0A4 (\uBC30\uD3EC\uB41C \uC6CC\uD06C\uD50C\uB85C\uC6B0)" }
|
|
2504
|
+
input_data: { type: "string", description: "\uC785\uB825 \uBA54\uC2DC\uC9C0" }
|
|
2491
2505
|
},
|
|
2492
2506
|
required: ["workflow_id", "workflow_name", "input_data"]
|
|
2493
2507
|
}
|
|
@@ -2651,15 +2665,18 @@ async function workflowList2() {
|
|
|
2651
2665
|
async function workflowRun2(args) {
|
|
2652
2666
|
const { executeWorkflow: executeWorkflow2 } = await Promise.resolve().then(() => (init_workflow(), workflow_exports));
|
|
2653
2667
|
const { randomUUID: randomUUID4 } = await import("crypto");
|
|
2668
|
+
const { getAuth: getAuth3 } = await Promise.resolve().then(() => (init_store(), store_exports));
|
|
2669
|
+
const auth = getAuth3();
|
|
2654
2670
|
const result = await executeWorkflow2({
|
|
2655
2671
|
workflow_id: args.workflow_id,
|
|
2656
2672
|
workflow_name: args.workflow_name,
|
|
2657
2673
|
input_data: args.input_data,
|
|
2658
2674
|
interaction_id: `cli_${randomUUID4().slice(0, 8)}`,
|
|
2659
|
-
|
|
2675
|
+
user_id: auth?.userId ? parseInt(auth.userId) : 1
|
|
2660
2676
|
});
|
|
2661
2677
|
if (result.content) return String(result.content);
|
|
2662
2678
|
if (result.success === false) return `\uC624\uB958: ${result.error ?? result.message}`;
|
|
2679
|
+
if (result.message) return String(result.message);
|
|
2663
2680
|
return JSON.stringify(result, null, 2).slice(0, 2e3);
|
|
2664
2681
|
}
|
|
2665
2682
|
async function workflowInfo2(args) {
|
|
@@ -2941,19 +2958,19 @@ EXAMPLES OF GOOD RESPONSES:
|
|
|
2941
2958
|
XGEN CONNECTED: ${server} as ${auth.username} (${env?.name ?? "default"})
|
|
2942
2959
|
|
|
2943
2960
|
XGEN CAPABILITIES (use these tools naturally):
|
|
2944
|
-
- xgen_workflow_list: \uC6CC\uD06C\uD50C\uB85C\uC6B0 \uC804\uCCB4 \uBAA9\uB85D. \uBC30\uD3EC \uC0C1\uD0DC, ID
|
|
2945
|
-
- xgen_workflow_run: \uC6CC\uD06C\uD50C\uB85C\uC6B0 \uC2E4\uD589.
|
|
2946
|
-
- xgen_workflow_info: \uC6CC\uD06C\uD50C\uB85C\uC6B0 \uC0C1\uC138 (\uB178\uB4DC, \uC5E3\uC9C0 \uC218 \uB4F1).
|
|
2961
|
+
- xgen_workflow_list: \uC6CC\uD06C\uD50C\uB85C\uC6B0 \uC804\uCCB4 \uBAA9\uB85D. \uBC30\uD3EC \uC0C1\uD0DC, ID \uD3EC\uD568.
|
|
2962
|
+
- xgen_workflow_run: \uC6CC\uD06C\uD50C\uB85C\uC6B0 \uC2E4\uD589. \uBC30\uD3EC \uC5EC\uBD80 \uBB34\uAD00\uD558\uAC8C \uBAA8\uB4E0 \uC6CC\uD06C\uD50C\uB85C\uC6B0 \uC2E4\uD589 \uAC00\uB2A5. \uC0AC\uC6A9\uC790\uAC00 \uBC88\uD638\uB098 \uC774\uB984 \uB9D0\uD558\uBA74 \uC774\uC804 \uBAA9\uB85D\uC5D0\uC11C \uCC3E\uC544\uC11C \uBC14\uB85C \uC2E4\uD589.
|
|
2963
|
+
- xgen_workflow_info: \uC6CC\uD06C\uD50C\uB85C\uC6B0 \uC0C1\uC138 (\uB178\uB4DC, \uC5E3\uC9C0 \uC218 \uB4F1).
|
|
2947
2964
|
- xgen_collection_list: \uBB38\uC11C \uCEEC\uB809\uC158 \uBAA9\uB85D (RAG \uC9C0\uC2DD\uBCA0\uC774\uC2A4). \uBB38\uC11C \uC218, \uCCAD\uD06C \uC218 \uD3EC\uD568.
|
|
2948
2965
|
- xgen_document_list: \uD2B9\uC815 \uCEEC\uB809\uC158\uC758 \uBB38\uC11C \uBAA9\uB85D \uC870\uD68C.
|
|
2949
2966
|
- xgen_document_upload: \uD30C\uC77C\uC744 \uCEEC\uB809\uC158\uC5D0 \uC5C5\uB85C\uB4DC.
|
|
2950
2967
|
- xgen_graph_rag_query: GraphRAG \uC628\uD1A8\uB85C\uC9C0 \uC9C8\uC758. \uC9C0\uC2DD\uADF8\uB798\uD504 \uAE30\uBC18 \uB2F5\uBCC0.
|
|
2951
2968
|
- xgen_graph_stats: \uADF8\uB798\uD504 \uD1B5\uACC4 (\uB178\uB4DC, \uC5E3\uC9C0, \uD074\uB798\uC2A4, \uC778\uC2A4\uD134\uC2A4 \uC218).
|
|
2952
|
-
- xgen_execution_history: \
|
|
2969
|
+
- xgen_execution_history: \uD2B9\uC815 \uC6CC\uD06C\uD50C\uB85C\uC6B0 \uC2E4\uD589 \uC774\uB825.
|
|
2953
2970
|
- xgen_server_status: \uC11C\uBC84 \uC5F0\uACB0 \uC0C1\uD0DC.
|
|
2954
2971
|
|
|
2955
2972
|
WORKFLOW EXECUTION NOTES:
|
|
2956
|
-
- \
|
|
2973
|
+
- \uBAA8\uB4E0 \uC6CC\uD06C\uD50C\uB85C\uC6B0 \uC2E4\uD589 \uAC00\uB2A5 (\uBC30\uD3EC/\uBE44\uBC30\uD3EC \uBB34\uAD00). deploy_key \uBD88\uD544\uC694.
|
|
2957
2974
|
- \uC2E4\uD589 \uC2DC input_data\uC5D0 \uC0AC\uC6A9\uC790 \uBA54\uC2DC\uC9C0\uB97C \uB123\uC74C.
|
|
2958
2975
|
- \uC2E4\uD589 \uACB0\uACFC\uC758 content\uAC00 \uC751\uB2F5.`;
|
|
2959
2976
|
} else {
|
|
@@ -3522,7 +3539,7 @@ ${result.answer}
|
|
|
3522
3539
|
}
|
|
3523
3540
|
|
|
3524
3541
|
// src/index.ts
|
|
3525
|
-
var VERSION = "1.
|
|
3542
|
+
var VERSION = "1.6.0";
|
|
3526
3543
|
var LOGO = chalk15.cyan(`
|
|
3527
3544
|
\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588 \u2588\u2588
|
|
3528
3545
|
\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588
|