xgen-dex-cli 1.7.2 → 1.8.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.
@@ -564,6 +564,56 @@ var AgentsApi = class {
564
564
  }
565
565
  return all;
566
566
  }
567
+ /** 만들기 화면이 그릴 것 — 프로바이더·모델 목록과 손댈 수 있는 설정. */
568
+ async createOptions() {
569
+ const res = await this.http.get("/api/agentflow/create/options");
570
+ return {
571
+ providers: (res.providers ?? []).map((p) => ({
572
+ value: String(p.value ?? ""),
573
+ label: p.label ?? String(p.value ?? ""),
574
+ models: (p.models ?? []).map((m) => ({
575
+ value: String(m.value ?? ""),
576
+ label: m.label ?? String(m.value ?? "")
577
+ })),
578
+ defaultModel: p.default_model,
579
+ needsBaseUrl: !!p.needs_base_url
580
+ })),
581
+ defaultProvider: res.default_provider ?? "openai",
582
+ settings: (res.settings ?? []).map((raw) => ({
583
+ id: String(raw.id ?? ""),
584
+ label: String(raw.label ?? raw.id ?? ""),
585
+ type: String(raw.type ?? "STR"),
586
+ default: raw.default,
587
+ options: raw.options,
588
+ description: raw.description,
589
+ min: raw.min,
590
+ max: raw.max,
591
+ step: raw.step
592
+ })),
593
+ defaults: res.defaults ?? {}
594
+ };
595
+ }
596
+ /**
597
+ * 에이전트 하나를 세우고 그 workflowId 를 돌려준다.
598
+ *
599
+ * 만들어지는 것은 노드 하나짜리 워크플로우다. 엣지가 없는 것이 이 노드의 성질이라
600
+ * 연결 없이 그대로 대화가 된다.
601
+ */
602
+ async create(input) {
603
+ const res = await this.http.post(
604
+ "/api/agentflow/create",
605
+ {
606
+ workflow_name: input.name,
607
+ provider: input.provider,
608
+ model: input.model ?? null,
609
+ settings: input.settings ?? null
610
+ }
611
+ );
612
+ return {
613
+ workflowId: String(res.workflow_id ?? ""),
614
+ workflowName: String(res.workflow_name ?? input.name)
615
+ };
616
+ }
567
617
  };
568
618
 
569
619
  // ../../packages/protocol/src/hash.ts
@@ -4280,6 +4330,30 @@ var DexEngine = class {
4280
4330
  async listAgents(query = {}, requestedProfile) {
4281
4331
  return this.withAuthRetry(requestedProfile, (client) => client.agents.list(query));
4282
4332
  }
4333
+ /**
4334
+ * 만들기 화면이 그릴 것 — 프로바이더·모델과 손댈 수 있는 설정.
4335
+ *
4336
+ * 목록은 서버가 Agent XGeny 노드에서 읽어 내려 준다. 커넥터와 CLI 가 각자 적어
4337
+ * 두면 노드가 바뀔 때마다 조용히 낡는다.
4338
+ */
4339
+ async agentCreateOptions(requestedProfile) {
4340
+ return this.withAuthRetry(requestedProfile, (client) => client.agents.createOptions());
4341
+ }
4342
+ /**
4343
+ * 에이전트 하나를 세운다 — Agent XGeny 노드 하나짜리 워크플로우.
4344
+ *
4345
+ * 엣지가 없는 것이 이 노드의 성질이다. 도구도 기억도 위임도 자기진화도 그 안에
4346
+ * 있어서 연결 없이 그대로 대화가 된다.
4347
+ */
4348
+ async createAgent(input, requestedProfile) {
4349
+ const name = input.name.trim();
4350
+ if (!name) throw new DexError("usage_error", "\uC5D0\uC774\uC804\uD2B8 \uC774\uB984\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.");
4351
+ if (!input.provider) throw new DexError("usage_error", "AI \uC81C\uACF5\uC0AC\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.");
4352
+ return this.withAuthRetry(
4353
+ requestedProfile,
4354
+ (client) => client.agents.create({ ...input, name })
4355
+ );
4356
+ }
4283
4357
  async listConversations(requestedProfile) {
4284
4358
  return this.withAuthRetry(requestedProfile, (client) => client.history.conversations());
4285
4359
  }
@@ -4642,4 +4716,4 @@ export {
4642
4716
  credentialBackend,
4643
4717
  SystemCredentialStore
4644
4718
  };
4645
- //# sourceMappingURL=chunk-ULMEXJOR.js.map
4719
+ //# sourceMappingURL=chunk-KY3K4GV4.js.map