@team-semicolon/semo-cli 4.1.5 → 4.3.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.
@@ -1,12 +1,15 @@
1
1
  /**
2
2
  * SEMO CLI - PostgreSQL 데이터베이스 클라이언트
3
3
  *
4
- * 팀 코어 PostgreSQL에서 스킬, 커맨드, 에이전트 정보를 조회합니다.
4
+ * 스킬, 커맨드, 에이전트 정보를 조회합니다.
5
5
  * DB 연결 실패 시 하드코딩된 폴백 데이터를 사용합니다.
6
6
  *
7
7
  * v3.14.0: Supabase → PostgreSQL 전환
8
- * - semo-system 의존성 제거
9
- * - 문서 내용을 DB에서 직접 조회
8
+ * v4.0.0: 스키마 통합 — SoT를 *_definitions 테이블로 변경
9
+ * - skill_definitions (prompt as content)
10
+ * - agent_definitions (persona_prompt as content)
11
+ * - command_definitions (prompt as content)
12
+ * - semo.skills / semo.agents / semo.commands 는 하위 호환 뷰
10
13
  */
11
14
  import { Pool } from "pg";
12
15
  export declare function getPool(): Pool;
@@ -16,6 +19,7 @@ export interface Skill {
16
19
  display_name: string;
17
20
  description: string | null;
18
21
  content: string;
22
+ bot_ids: string[];
19
23
  category: string;
20
24
  package: string;
21
25
  is_active: boolean;
@@ -39,6 +43,7 @@ export interface Agent {
39
43
  package: string;
40
44
  is_active: boolean;
41
45
  install_order: number;
46
+ metadata?: Record<string, unknown>;
42
47
  }
43
48
  export interface Package {
44
49
  id: string;
@@ -52,20 +57,46 @@ export interface Package {
52
57
  is_required: boolean;
53
58
  install_order: number;
54
59
  }
60
+ export interface BotDelegation {
61
+ id: number;
62
+ from_bot_id: string;
63
+ to_bot_id: string;
64
+ delegation_type: string;
65
+ domains: string[];
66
+ method: string;
67
+ channel: string | null;
68
+ max_roundtrips: number;
69
+ priority: string;
70
+ is_active: boolean;
71
+ }
72
+ export interface BotProtocol {
73
+ id: number;
74
+ key: string;
75
+ value: Record<string, unknown>;
76
+ description: string | null;
77
+ }
55
78
  /**
56
79
  * 활성 스킬 목록 조회
80
+ * SoT: skill_definitions (prompt as content — CLI 인터페이스 유지)
57
81
  */
58
82
  export declare function getActiveSkills(): Promise<Skill[]>;
59
83
  /**
60
84
  * 스킬 이름 목록만 조회
61
85
  */
62
86
  export declare function getActiveSkillNames(): Promise<string[]>;
87
+ /**
88
+ * 특정 봇의 스킬 목록 조회 (공유 + 봇 전용)
89
+ * skill_definitions.target_agents 배열로 매핑 — 전용 스킬 먼저, 공유 스킬 뒤
90
+ */
91
+ export declare function getActiveSkillsForBot(botId: string): Promise<Skill[]>;
63
92
  /**
64
93
  * 커맨드 목록 조회
94
+ * SoT: command_definitions (prompt as content — CLI 인터페이스 유지)
65
95
  */
66
96
  export declare function getCommands(): Promise<SemoCommand[]>;
67
97
  /**
68
98
  * 에이전트 목록 조회
99
+ * SoT: agent_definitions (persona_prompt as content — CLI 인터페이스 유지)
69
100
  */
70
101
  export declare function getAgents(): Promise<Agent[]>;
71
102
  /**
@@ -76,6 +107,14 @@ export declare function getPackages(layer?: string): Promise<Package[]>;
76
107
  * 카테고리별 스킬 개수 조회
77
108
  */
78
109
  export declare function getSkillCountByCategory(): Promise<Record<string, number>>;
110
+ /**
111
+ * 위임 매트릭스 조회
112
+ */
113
+ export declare function getDelegations(botId?: string): Promise<BotDelegation[]>;
114
+ /**
115
+ * 프로토콜 메타데이터 조회
116
+ */
117
+ export declare function getProtocol(): Promise<BotProtocol[]>;
79
118
  /**
80
119
  * DB 연결 종료
81
120
  */