xgen-dex-cli 1.25.5 → 1.26.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/chunks/{chunk-KY3K4GV4.js → chunk-FLNJONTC.js} +65 -1
- package/dist/chunks/chunk-FLNJONTC.js.map +7 -0
- package/dist/chunks/{tui-WG5AIWUR.js → tui-DS2TQXTM.js} +47 -20
- package/dist/chunks/tui-DS2TQXTM.js.map +7 -0
- package/dist/cli.js +3 -3
- package/package.json +1 -1
- package/dist/chunks/chunk-KY3K4GV4.js.map +0 -7
- package/dist/chunks/tui-WG5AIWUR.js.map +0 -7
|
@@ -507,6 +507,68 @@ var AgentDataApi = class {
|
|
|
507
507
|
}
|
|
508
508
|
};
|
|
509
509
|
|
|
510
|
+
// ../../packages/protocol/src/filestore.ts
|
|
511
|
+
var FilestoreApi = class {
|
|
512
|
+
constructor(http) {
|
|
513
|
+
this.http = http;
|
|
514
|
+
}
|
|
515
|
+
/** 전체 폴더 평면 목록 — full_path 로 경로를 푼다. */
|
|
516
|
+
async tree() {
|
|
517
|
+
const res = await this.http.get("/api/filestore/tree");
|
|
518
|
+
return { folders: res.folders ?? [] };
|
|
519
|
+
}
|
|
520
|
+
/** 루트 내용 — 루트 바로 밑 폴더/파일. */
|
|
521
|
+
async root() {
|
|
522
|
+
const res = await this.http.get(
|
|
523
|
+
"/api/filestore/root"
|
|
524
|
+
);
|
|
525
|
+
return { folders: res.folders ?? [], items: res.items ?? [] };
|
|
526
|
+
}
|
|
527
|
+
/** 폴더 내용. */
|
|
528
|
+
async folderItems(folderId) {
|
|
529
|
+
const res = await this.http.get(
|
|
530
|
+
`/api/filestore/folders/${folderId}/items`
|
|
531
|
+
);
|
|
532
|
+
return { items: res.items ?? [] };
|
|
533
|
+
}
|
|
534
|
+
/** 저장소 상대 경로("a/b.txt") → 항목. 없으면 null. */
|
|
535
|
+
async resolveItemByPath(path) {
|
|
536
|
+
const clean = path.replace(/^\/+/, "");
|
|
537
|
+
const slash = clean.lastIndexOf("/");
|
|
538
|
+
const dirPath = slash === -1 ? "" : clean.slice(0, slash);
|
|
539
|
+
const fileName = slash === -1 ? clean : clean.slice(slash + 1);
|
|
540
|
+
let items;
|
|
541
|
+
if (!dirPath) {
|
|
542
|
+
items = (await this.root()).items;
|
|
543
|
+
} else {
|
|
544
|
+
const { folders } = await this.tree();
|
|
545
|
+
const folder = folders.find(
|
|
546
|
+
(f) => String(f.full_path ?? "").replace(/^\/+|\/+$/g, "") === dirPath
|
|
547
|
+
);
|
|
548
|
+
if (!folder) return null;
|
|
549
|
+
items = (await this.folderItems(folder.id)).items;
|
|
550
|
+
}
|
|
551
|
+
return items.find((it) => it.file_name === fileName) ?? null;
|
|
552
|
+
}
|
|
553
|
+
/**
|
|
554
|
+
* 오피스 문서(pptx/docx/xlsx + hwp/hwpx/doc/xls/ppt) 서버 렌더 — 페이지 목록.
|
|
555
|
+
* 콜드 렌더는 수십 초까지 걸린다 (웹 파일 저장소와 동일 계약).
|
|
556
|
+
*/
|
|
557
|
+
async officePreview(itemId) {
|
|
558
|
+
const res = await this.http.get(
|
|
559
|
+
`/api/agentflow/filestore-preview/${itemId}`,
|
|
560
|
+
{ timeoutMs: 3e5 }
|
|
561
|
+
);
|
|
562
|
+
return { pages: Array.isArray(res.pages) ? res.pages : [] };
|
|
563
|
+
}
|
|
564
|
+
/** 렌더된 페이지 이미지 바이트. */
|
|
565
|
+
officePreviewPage(itemId, page) {
|
|
566
|
+
return this.http.getBinary(
|
|
567
|
+
`/api/agentflow/filestore-preview/${itemId}/page/${encodeURIComponent(page)}`
|
|
568
|
+
);
|
|
569
|
+
}
|
|
570
|
+
};
|
|
571
|
+
|
|
510
572
|
// ../../packages/protocol/src/agents.ts
|
|
511
573
|
function mapAgent(r) {
|
|
512
574
|
return {
|
|
@@ -1646,6 +1708,7 @@ var XgenClient = class {
|
|
|
1646
1708
|
avatars;
|
|
1647
1709
|
voice;
|
|
1648
1710
|
agentData;
|
|
1711
|
+
filestore;
|
|
1649
1712
|
refreshToken;
|
|
1650
1713
|
onTokensRotated;
|
|
1651
1714
|
/** ensureFreshAuth 의 single-flight 가드 — 동시 401 들이 refresh 를 한 번만 태운다. */
|
|
@@ -1670,6 +1733,7 @@ var XgenClient = class {
|
|
|
1670
1733
|
this.avatars = new AvatarsApi(this.http);
|
|
1671
1734
|
this.voice = new VoiceApi(this.http);
|
|
1672
1735
|
this.agentData = new AgentDataApi(this.http);
|
|
1736
|
+
this.filestore = new FilestoreApi(this.http);
|
|
1673
1737
|
}
|
|
1674
1738
|
setBaseUrl(baseUrl) {
|
|
1675
1739
|
this.http.setBaseUrl(baseUrl);
|
|
@@ -4716,4 +4780,4 @@ export {
|
|
|
4716
4780
|
credentialBackend,
|
|
4717
4781
|
SystemCredentialStore
|
|
4718
4782
|
};
|
|
4719
|
-
//# sourceMappingURL=chunk-
|
|
4783
|
+
//# sourceMappingURL=chunk-FLNJONTC.js.map
|