@niubitli/plugin-feishu-connector 0.3.1-connector-feishu

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.
@@ -0,0 +1,133 @@
1
+ CREATE TABLE plugin_feishu_connector_6f7b627c73.feishu_bots (
2
+ id text PRIMARY KEY,
3
+ display_name text NOT NULL,
4
+ app_id text,
5
+ profile_name text NOT NULL,
6
+ enabled boolean NOT NULL DEFAULT true,
7
+ status text NOT NULL DEFAULT 'configured',
8
+ bot_aliases jsonb NOT NULL DEFAULT '[]'::jsonb,
9
+ raw_config jsonb NOT NULL DEFAULT '{}'::jsonb,
10
+ created_at timestamptz NOT NULL DEFAULT now(),
11
+ updated_at timestamptz NOT NULL DEFAULT now()
12
+ );
13
+
14
+ CREATE TABLE plugin_feishu_connector_6f7b627c73.feishu_entries (
15
+ id text PRIMARY KEY,
16
+ display_name text NOT NULL,
17
+ connection_id text REFERENCES plugin_feishu_connector_6f7b627c73.feishu_bots(id) ON DELETE SET NULL,
18
+ enabled boolean NOT NULL DEFAULT true,
19
+ match_type text NOT NULL,
20
+ trigger_label text NOT NULL,
21
+ company_ref text,
22
+ company_id text,
23
+ project_id text,
24
+ target_agent_id text,
25
+ target_agent_name text,
26
+ reply_mode text NOT NULL DEFAULT 'thread',
27
+ base_sink_id text,
28
+ priority integer NOT NULL DEFAULT 10,
29
+ raw_config jsonb NOT NULL DEFAULT '{}'::jsonb,
30
+ created_at timestamptz NOT NULL DEFAULT now(),
31
+ updated_at timestamptz NOT NULL DEFAULT now()
32
+ );
33
+
34
+ CREATE TABLE plugin_feishu_connector_6f7b627c73.feishu_capabilities (
35
+ key text PRIMARY KEY,
36
+ title text NOT NULL,
37
+ group_name text NOT NULL,
38
+ implemented boolean NOT NULL DEFAULT false,
39
+ enabled boolean NOT NULL DEFAULT false,
40
+ risk text NOT NULL DEFAULT 'medium',
41
+ tool_name text,
42
+ lark_cli_commands jsonb NOT NULL DEFAULT '[]'::jsonb,
43
+ recommended_scopes jsonb NOT NULL DEFAULT '[]'::jsonb,
44
+ raw_definition jsonb NOT NULL DEFAULT '{}'::jsonb,
45
+ created_at timestamptz NOT NULL DEFAULT now(),
46
+ updated_at timestamptz NOT NULL DEFAULT now()
47
+ );
48
+
49
+ CREATE TABLE plugin_feishu_connector_6f7b627c73.feishu_entry_capabilities (
50
+ entry_id text NOT NULL REFERENCES plugin_feishu_connector_6f7b627c73.feishu_entries(id) ON DELETE CASCADE,
51
+ capability_key text NOT NULL REFERENCES plugin_feishu_connector_6f7b627c73.feishu_capabilities(key) ON DELETE CASCADE,
52
+ enabled boolean NOT NULL DEFAULT false,
53
+ raw_config jsonb NOT NULL DEFAULT '{}'::jsonb,
54
+ updated_at timestamptz NOT NULL DEFAULT now(),
55
+ PRIMARY KEY (entry_id, capability_key)
56
+ );
57
+
58
+ CREATE TABLE plugin_feishu_connector_6f7b627c73.feishu_agent_capabilities (
59
+ agent_id text NOT NULL,
60
+ capability_key text NOT NULL REFERENCES plugin_feishu_connector_6f7b627c73.feishu_capabilities(key) ON DELETE CASCADE,
61
+ enabled boolean NOT NULL DEFAULT false,
62
+ raw_config jsonb NOT NULL DEFAULT '{}'::jsonb,
63
+ updated_at timestamptz NOT NULL DEFAULT now(),
64
+ PRIMARY KEY (agent_id, capability_key)
65
+ );
66
+
67
+ CREATE TABLE plugin_feishu_connector_6f7b627c73.feishu_conversations (
68
+ chat_id text PRIMARY KEY,
69
+ connection_id text REFERENCES plugin_feishu_connector_6f7b627c73.feishu_bots(id) ON DELETE SET NULL,
70
+ name text,
71
+ conversation_type text,
72
+ last_active_at timestamptz,
73
+ raw_data jsonb NOT NULL DEFAULT '{}'::jsonb,
74
+ created_at timestamptz NOT NULL DEFAULT now(),
75
+ updated_at timestamptz NOT NULL DEFAULT now()
76
+ );
77
+
78
+ CREATE TABLE plugin_feishu_connector_6f7b627c73.feishu_message_routes (
79
+ id text PRIMARY KEY,
80
+ connection_id text REFERENCES plugin_feishu_connector_6f7b627c73.feishu_bots(id) ON DELETE SET NULL,
81
+ entry_id text REFERENCES plugin_feishu_connector_6f7b627c73.feishu_entries(id) ON DELETE SET NULL,
82
+ company_id text,
83
+ issue_id text,
84
+ issue_identifier text,
85
+ agent_id text,
86
+ chat_id text,
87
+ requester_open_id text,
88
+ requester_name text,
89
+ message_id text NOT NULL,
90
+ root_message_id text,
91
+ thread_id text,
92
+ reply_mode text,
93
+ session_key text NOT NULL,
94
+ raw_session jsonb NOT NULL DEFAULT '{}'::jsonb,
95
+ created_at timestamptz NOT NULL DEFAULT now(),
96
+ updated_at timestamptz NOT NULL DEFAULT now()
97
+ );
98
+
99
+ CREATE TABLE plugin_feishu_connector_6f7b627c73.feishu_event_logs (
100
+ id text PRIMARY KEY,
101
+ level text NOT NULL,
102
+ message text NOT NULL,
103
+ connection_id text,
104
+ entry_id text,
105
+ issue_id text,
106
+ feishu_message_id text,
107
+ payload jsonb NOT NULL DEFAULT '{}'::jsonb,
108
+ created_at timestamptz NOT NULL DEFAULT now()
109
+ );
110
+
111
+ CREATE TABLE plugin_feishu_connector_6f7b627c73.feishu_conflicts (
112
+ id text PRIMARY KEY,
113
+ status text NOT NULL DEFAULT 'open',
114
+ conflict_type text NOT NULL DEFAULT 'routing',
115
+ connection_id text,
116
+ selected_entry_id text,
117
+ feishu_message_id text,
118
+ summary text NOT NULL,
119
+ payload jsonb NOT NULL DEFAULT '{}'::jsonb,
120
+ created_at timestamptz NOT NULL DEFAULT now(),
121
+ updated_at timestamptz NOT NULL DEFAULT now()
122
+ );
123
+
124
+ CREATE TABLE plugin_feishu_connector_6f7b627c73.feishu_permission_checks (
125
+ id text PRIMARY KEY,
126
+ connection_id text REFERENCES plugin_feishu_connector_6f7b627c73.feishu_bots(id) ON DELETE SET NULL,
127
+ profile_name text,
128
+ ok boolean NOT NULL DEFAULT false,
129
+ missing_scopes jsonb NOT NULL DEFAULT '[]'::jsonb,
130
+ granted_scopes jsonb NOT NULL DEFAULT '[]'::jsonb,
131
+ raw_result jsonb NOT NULL DEFAULT '{}'::jsonb,
132
+ checked_at timestamptz NOT NULL DEFAULT now()
133
+ );
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@niubitli/plugin-feishu-connector",
3
+ "version": "0.3.1-connector-feishu",
4
+ "description": "Feishu/Lark connector for Paperclip agents powered by official lark-cli",
5
+ "type": "module",
6
+ "author": "Paperclip",
7
+ "license": "MIT",
8
+ "keywords": [
9
+ "paperclip",
10
+ "plugin",
11
+ "feishu",
12
+ "lark",
13
+ "connector"
14
+ ],
15
+ "dependencies": {
16
+ "@larksuite/cli": "^1.0.29"
17
+ },
18
+ "paperclipPlugin": {
19
+ "manifest": "./dist/manifest.js",
20
+ "worker": "./dist/worker.js",
21
+ "ui": "./dist/ui/"
22
+ },
23
+ "files": [
24
+ "dist",
25
+ "migrations",
26
+ "README.md"
27
+ ],
28
+ "publishConfig": {
29
+ "access": "public"
30
+ }
31
+ }