aicorkit 0.1.2__tar.gz

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.
Files changed (92) hide show
  1. aicorkit-0.1.2/LICENSE +201 -0
  2. aicorkit-0.1.2/PKG-INFO +437 -0
  3. aicorkit-0.1.2/README.md +403 -0
  4. aicorkit-0.1.2/aicorkit/__init__.py +3 -0
  5. aicorkit-0.1.2/aicorkit/__main__.py +5 -0
  6. aicorkit-0.1.2/aicorkit/atlassian/__init__.py +21 -0
  7. aicorkit-0.1.2/aicorkit/atlassian/cli.py +63 -0
  8. aicorkit-0.1.2/aicorkit/atlassian/client.py +347 -0
  9. aicorkit-0.1.2/aicorkit/atlassian/confluence.py +266 -0
  10. aicorkit-0.1.2/aicorkit/atlassian/confluence_cli.py +130 -0
  11. aicorkit-0.1.2/aicorkit/atlassian/jira.py +411 -0
  12. aicorkit-0.1.2/aicorkit/atlassian/jira_cli.py +229 -0
  13. aicorkit-0.1.2/aicorkit/cli.py +239 -0
  14. aicorkit-0.1.2/aicorkit/cli_common.py +22 -0
  15. aicorkit-0.1.2/aicorkit/config.py +351 -0
  16. aicorkit-0.1.2/aicorkit/graph/__init__.py +1 -0
  17. aicorkit-0.1.2/aicorkit/graph/archivist.py +59 -0
  18. aicorkit-0.1.2/aicorkit/graph/canonicalize/__init__.py +1 -0
  19. aicorkit-0.1.2/aicorkit/graph/canonicalize/chat.py +40 -0
  20. aicorkit-0.1.2/aicorkit/graph/canonicalize/document.py +51 -0
  21. aicorkit-0.1.2/aicorkit/graph/canonicalize/email.py +45 -0
  22. aicorkit-0.1.2/aicorkit/graph/chunker.py +122 -0
  23. aicorkit-0.1.2/aicorkit/graph/cli.py +689 -0
  24. aicorkit-0.1.2/aicorkit/graph/converters/__init__.py +15 -0
  25. aicorkit-0.1.2/aicorkit/graph/converters/markitdown_io.py +206 -0
  26. aicorkit-0.1.2/aicorkit/graph/daemon.py +42 -0
  27. aicorkit-0.1.2/aicorkit/graph/dashboard.py +570 -0
  28. aicorkit-0.1.2/aicorkit/graph/embed.py +214 -0
  29. aicorkit-0.1.2/aicorkit/graph/graphignore.py +85 -0
  30. aicorkit-0.1.2/aicorkit/graph/ingest.py +216 -0
  31. aicorkit-0.1.2/aicorkit/graph/meeting_bridge.py +42 -0
  32. aicorkit-0.1.2/aicorkit/graph/memory_bridge.py +43 -0
  33. aicorkit-0.1.2/aicorkit/graph/paths.py +39 -0
  34. aicorkit-0.1.2/aicorkit/graph/pipeline/__init__.py +0 -0
  35. aicorkit-0.1.2/aicorkit/graph/pipeline/worker.py +322 -0
  36. aicorkit-0.1.2/aicorkit/graph/retrieval/__init__.py +0 -0
  37. aicorkit-0.1.2/aicorkit/graph/retrieval/fetch.py +7 -0
  38. aicorkit-0.1.2/aicorkit/graph/retrieval/query.py +143 -0
  39. aicorkit-0.1.2/aicorkit/graph/retrieval/search.py +184 -0
  40. aicorkit-0.1.2/aicorkit/graph/retrieval/walk.py +47 -0
  41. aicorkit-0.1.2/aicorkit/graph/score.py +100 -0
  42. aicorkit-0.1.2/aicorkit/graph/setup.py +419 -0
  43. aicorkit-0.1.2/aicorkit/graph/sources/__init__.py +1 -0
  44. aicorkit-0.1.2/aicorkit/graph/sources/folder.py +158 -0
  45. aicorkit-0.1.2/aicorkit/graph/sources/notes.py +31 -0
  46. aicorkit-0.1.2/aicorkit/graph/sources/outlook.py +69 -0
  47. aicorkit-0.1.2/aicorkit/graph/sources/registry.py +62 -0
  48. aicorkit-0.1.2/aicorkit/graph/sources/types.py +32 -0
  49. aicorkit-0.1.2/aicorkit/graph/store/__init__.py +1 -0
  50. aicorkit-0.1.2/aicorkit/graph/store/chunks.py +244 -0
  51. aicorkit-0.1.2/aicorkit/graph/store/content.py +78 -0
  52. aicorkit-0.1.2/aicorkit/graph/store/db.py +198 -0
  53. aicorkit-0.1.2/aicorkit/graph/store/entities.py +212 -0
  54. aicorkit-0.1.2/aicorkit/graph/store/jobs.py +93 -0
  55. aicorkit-0.1.2/aicorkit/graph/store/raw_canonical.py +110 -0
  56. aicorkit-0.1.2/aicorkit/graph/store/scores.py +35 -0
  57. aicorkit-0.1.2/aicorkit/graph/store/trees.py +214 -0
  58. aicorkit-0.1.2/aicorkit/graph/store/vectors.py +42 -0
  59. aicorkit-0.1.2/aicorkit/graph/sync.py +99 -0
  60. aicorkit-0.1.2/aicorkit/graph/sync_progress.py +194 -0
  61. aicorkit-0.1.2/aicorkit/graph/tree/__init__.py +0 -0
  62. aicorkit-0.1.2/aicorkit/graph/tree/seal.py +165 -0
  63. aicorkit-0.1.2/aicorkit/graph/tree/summarise.py +43 -0
  64. aicorkit-0.1.2/aicorkit/graph/vault/__init__.py +0 -0
  65. aicorkit-0.1.2/aicorkit/graph/vault/hubs.py +125 -0
  66. aicorkit-0.1.2/aicorkit/graph/vault/index.py +107 -0
  67. aicorkit-0.1.2/aicorkit/llm/__init__.py +7 -0
  68. aicorkit-0.1.2/aicorkit/llm/acp.py +390 -0
  69. aicorkit-0.1.2/aicorkit/llm/backend.py +21 -0
  70. aicorkit-0.1.2/aicorkit/llm/factory.py +70 -0
  71. aicorkit-0.1.2/aicorkit/meeting/__init__.py +3 -0
  72. aicorkit-0.1.2/aicorkit/meeting/auto_answer.py +59 -0
  73. aicorkit-0.1.2/aicorkit/meeting/cli.py +40 -0
  74. aicorkit-0.1.2/aicorkit/meeting/controller.py +281 -0
  75. aicorkit-0.1.2/aicorkit/meeting/listen.py +1730 -0
  76. aicorkit-0.1.2/aicorkit/meeting/panel.py +807 -0
  77. aicorkit-0.1.2/aicorkit/meeting/voicemeeter.py +318 -0
  78. aicorkit-0.1.2/aicorkit/outlook/__init__.py +45 -0
  79. aicorkit-0.1.2/aicorkit/outlook/cli.py +145 -0
  80. aicorkit-0.1.2/aicorkit/outlook/com.py +638 -0
  81. aicorkit-0.1.2/aicorkit/skill.py +583 -0
  82. aicorkit-0.1.2/aicorkit/wxmsg/__init__.py +35 -0
  83. aicorkit-0.1.2/aicorkit/wxmsg/api.py +378 -0
  84. aicorkit-0.1.2/aicorkit/wxmsg/cli.py +280 -0
  85. aicorkit-0.1.2/aicorkit.egg-info/PKG-INFO +437 -0
  86. aicorkit-0.1.2/aicorkit.egg-info/SOURCES.txt +90 -0
  87. aicorkit-0.1.2/aicorkit.egg-info/dependency_links.txt +1 -0
  88. aicorkit-0.1.2/aicorkit.egg-info/entry_points.txt +2 -0
  89. aicorkit-0.1.2/aicorkit.egg-info/requires.txt +27 -0
  90. aicorkit-0.1.2/aicorkit.egg-info/top_level.txt +1 -0
  91. aicorkit-0.1.2/pyproject.toml +50 -0
  92. aicorkit-0.1.2/setup.cfg +4 -0
aicorkit-0.1.2/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,437 @@
1
+ Metadata-Version: 2.2
2
+ Name: aicorkit
3
+ Version: 0.1.2
4
+ Summary: AI-powered desktop tool orchestration CLI
5
+ Author: eric.zhang
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://gitee.com/seacozz2007/aicorkit
8
+ Project-URL: Repository, https://gitee.com/seacozz2007/aicorkit
9
+ Project-URL: Issues, https://gitee.com/seacozz2007/aicorkit/issues
10
+ Requires-Python: >=3.11
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: click>=8.0
14
+ Requires-Dist: pyyaml>=6.0
15
+ Requires-Dist: pywin32>=306; platform_system == "Windows"
16
+ Provides-Extra: dev
17
+ Requires-Dist: pytest>=8; extra == "dev"
18
+ Provides-Extra: meeting
19
+ Requires-Dist: sounddevice>=0.4.6; extra == "meeting"
20
+ Requires-Dist: numpy>=1.24; extra == "meeting"
21
+ Requires-Dist: soundfile>=0.12; extra == "meeting"
22
+ Requires-Dist: openai>=1.0; extra == "meeting"
23
+ Requires-Dist: dashscope>=1.20; extra == "meeting"
24
+ Requires-Dist: pywinauto>=0.6.9; extra == "meeting"
25
+ Requires-Dist: pyautogui>=0.9; extra == "meeting"
26
+ Provides-Extra: all
27
+ Requires-Dist: aicorkit[meeting]; extra == "all"
28
+ Requires-Dist: aicorkit[graph]; extra == "all"
29
+ Provides-Extra: graph
30
+ Requires-Dist: numpy>=1.24; extra == "graph"
31
+ Requires-Dist: dashscope>=1.20; extra == "graph"
32
+ Requires-Dist: openai>=1.0; extra == "graph"
33
+ Requires-Dist: markitdown[docx,pdf,pptx,xls,xlsx]>=0.1.6; extra == "graph"
34
+
35
+ # aicorkit
36
+
37
+ 面向 AI Agent(Kiro / Claude 等)的 **Windows 桌面自动化 CLI**。通过 pywin32 直接驱动 Outlook COM,并提供本地知识库(Graph / Memory Tree)、会议语音管道等能力。
38
+
39
+ ## 环境要求
40
+
41
+ - **Python 3.11+**
42
+ - **Windows**(Outlook COM、会议音频依赖 Windows 主机)
43
+ - Outlook 桌面客户端已安装并登录(使用邮件/日历时)
44
+ - 可选:`DASHSCOPE_API_KEY`(会议 STT/TTS、Graph 向量 embedding)
45
+
46
+ ## 安装
47
+
48
+ ### 从源码安装
49
+
50
+ ```powershell
51
+ cd D:\CODE\aicorkit
52
+ pip install -e .
53
+ ```
54
+
55
+ ### 可选依赖
56
+
57
+ | 包 | 用途 | 命令 |
58
+ |----|------|------|
59
+ | `[graph]` | 知识库向量检索(numpy、dashscope、openai) | `pip install -e ".[graph]"` |
60
+ | `[meeting]` | 会议 STT → LLM → TTS 管道 | `pip install -e ".[meeting]"` |
61
+ | `[dev]` | 开发测试 | `pip install -e ".[dev]"` |
62
+ | `[all]` | graph + meeting | `pip install -e ".[all]"` |
63
+
64
+ ### Windows 运行方式
65
+
66
+ 若 `aicorkit` 不在 PATH,可用模块方式调用(推荐):
67
+
68
+ ```powershell
69
+ python -m aicorkit --help
70
+ python -m aicorkit graph status
71
+ ```
72
+
73
+ pip 脚本目录常见位置:`%AppData%\Roaming\Python\Python313\Scripts`(可按需加入 PATH)。
74
+
75
+ ## 配置
76
+
77
+ 配置分两层,**项目级覆盖全局**:
78
+
79
+ | 层级 | 路径 |
80
+ |------|------|
81
+ | 全局 | `~/.aicorkit/config.yaml` |
82
+ | 项目 | `<项目根>/.aicorkit/config.yaml`(从当前目录向上查找最近一份) |
83
+
84
+ ```powershell
85
+ python -m aicorkit config init
86
+ python -m aicorkit config show
87
+ python -m aicorkit config paths
88
+ python -m aicorkit config set backend kiro
89
+ python -m aicorkit config set graph.embed.provider dashscope
90
+ python -m aicorkit config set atlassian.jira_url https://jira.example.com
91
+ python -m aicorkit config set atlassian.confluence_url https://wiki.example.com
92
+ ```
93
+
94
+ 凭据写入 `~/.aicorkit/secrets.env`(勿提交 git):
95
+
96
+ ```
97
+ ATLASSIAN_USERNAME=your_user
98
+ ATLASSIAN_PASSWORD=your_password
99
+ ```
100
+
101
+ 项目级示例(仓库根目录 `.aicorkit/config.yaml`):
102
+
103
+ ```yaml
104
+ graph:
105
+ workspace: .aicorkit/memory # 项目独立知识库目录
106
+
107
+ graph_sources:
108
+ - id: repo-docs
109
+ kind: folder
110
+ label: 项目文档
111
+ enabled: true
112
+ path: ./docs
113
+ glob: "**/*.md"
114
+ ```
115
+
116
+ 列表字段(如 `graph_sources`)会被项目 config **整段替换**,不会与全局逐项合并。
117
+
118
+ ## 使用说明
119
+
120
+ ### Outlook
121
+
122
+ ```powershell
123
+ # 只读
124
+ python -m aicorkit outlook list-emails -f Inbox -c 10
125
+ python -m aicorkit outlook read-email -q "季度报告"
126
+ python -m aicorkit outlook list-calendar -d 7
127
+ python -m aicorkit outlook shared-calendar --email boss@company.com -d 7
128
+ python -m aicorkit outlook free-busy --email colleague@company.com -d 3
129
+ python -m aicorkit outlook list-rooms
130
+
131
+ # 写入(Agent 执行前需用户确认)
132
+ python -m aicorkit outlook send-email --to "a@b.com" --subject "Hi" --body "Hello"
133
+ python -m aicorkit outlook create-meeting `
134
+ --subject "Sprint Review" `
135
+ --start "2026-06-08 14:00" `
136
+ --duration 60 `
137
+ --attendees "team@company.com"
138
+ ```
139
+
140
+ | 命令 | 说明 |
141
+ |------|------|
142
+ | `outlook list-emails` | 列出收件箱/已发送邮件 |
143
+ | `outlook read-email` | 按主题关键词搜索并读取 |
144
+ | `outlook send-email` | 发送邮件 |
145
+ | `outlook list-calendar` | 查看近期日程 |
146
+ | `outlook create-meeting` | 创建会议邀请 |
147
+ | `outlook shared-calendar` | 查看他人共享日历 |
148
+ | `outlook free-busy` | 查看他人忙闲 |
149
+ | `outlook list-rooms` | 常用会议室 |
150
+
151
+ ### Meeting(会议语音)
152
+
153
+ 需 `pip install -e ".[meeting]"` 和 `DASHSCOPE_API_KEY`。会议 LLM 默认使用 **cursor-agent**(`meeting.backend: cursor`),与顶层 `backend` 独立。
154
+
155
+ ```powershell
156
+ python -m aicorkit meeting listen # STT → LLM → TTS
157
+ python -m aicorkit meeting auto-answer
158
+ python -m aicorkit meeting start # listen + auto-answer
159
+
160
+ python -m aicorkit config set meeting.backend cursor # 默认已是 cursor
161
+ python -m aicorkit config set meeting.backend kiro # 改回 kiro-cli
162
+ python -m aicorkit config set meeting.graph_archive true
163
+ ```
164
+
165
+ ### Jira / Confluence
166
+
167
+ 需配置 `atlassian.jira_url`、`atlassian.confluence_url` 与 `secrets.env` 凭据。
168
+
169
+ ```powershell
170
+ # 连接测试
171
+ python -m aicorkit atlassian test
172
+
173
+ # Jira 只读
174
+ python -m aicorkit jira search --jql "assignee = currentUser() AND status != Done"
175
+ python -m aicorkit jira get-issue CMS-123
176
+ python -m aicorkit jira list-boards --project CMS
177
+ python -m aicorkit jira list-sprints --board-id 945 --state active
178
+
179
+ # Confluence 只读
180
+ python -m aicorkit confluence search --space AESCESS -q "API"
181
+ python -m aicorkit confluence list-pages --space AESCESS
182
+ python -m aicorkit confluence get-page --id 13069892
183
+
184
+ # 写入(需 --yes,Agent 须先征得用户确认)
185
+ python -m aicorkit jira add-comment CMS-123 --body "..." --yes
186
+ python -m aicorkit jira transition CMS-123 --to "In Progress" --yes
187
+ python -m aicorkit confluence update-page --id 123 --version 5 --body "..." --yes
188
+ ```
189
+
190
+ | 命令组 | 只读 | 写入(需 `--yes`) |
191
+ |--------|------|---------------------|
192
+ | `jira` | search, list-issues, get-issue, list-comments, list-projects, list-boards, list-sprints, list-board-issues | create-issue, add-comment, transition, update-issue |
193
+ | `confluence` | search, list-spaces, list-pages, get-page | update-page, add-comment |
194
+
195
+ ### Graph 知识库
196
+
197
+ 本地 **SQLite + Obsidian 兼容 wiki/**,支持入库、检索、摘要树、实体图。
198
+
199
+ **数据位置**
200
+
201
+ | 项 | 默认路径 |
202
+ |----|----------|
203
+ | 全局 workspace | `~/.aicorkit/memory/` |
204
+ | 项目 workspace | `<项目>/.aicorkit/memory/` |
205
+ | 数据库 | `chunks.db` |
206
+ | Vault | `wiki/` |
207
+ | 精编记忆 | `~/.aicorkit/MEMORY.md`(可配置) |
208
+
209
+ **一键 setup(推荐)**
210
+
211
+ ```powershell
212
+ # 最小:init + notes 源 + INDEX + dashboard
213
+ python -m aicorkit graph setup --yes
214
+
215
+ # 完整:项目 config + 文档 + Outlook + 同步 + skill
216
+ python -m aicorkit graph setup --yes --project --docs ./docs --outlook --sync --skill-platform cursor
217
+ ```
218
+
219
+ **初始化与状态**
220
+
221
+ ```powershell
222
+ python -m aicorkit graph init
223
+ python -m aicorkit graph status
224
+ ```
225
+
226
+ **入库**(写入操作需 `--yes`)
227
+
228
+ ```powershell
229
+ python -m aicorkit graph ingest document `
230
+ --source-id "proj:design" --title "设计" --body-file ./design.md --yes
231
+
232
+ python -m aicorkit graph ingest file --path ./note.md --source-id "notes:manual" --yes
233
+
234
+ python -m aicorkit graph ingest email --from outlook --folder Inbox -c 20 --yes
235
+
236
+ python -m aicorkit graph ingest chat --source-id "chat:s1" --file turns.json --yes
237
+ Get-Content turns.json -Raw | python -m aicorkit graph ingest chat --source-id "chat:s1" --stdin --yes
238
+
239
+ python -m aicorkit graph ingest meeting --file meeting.json --yes
240
+ ```
241
+
242
+ **数据源同步**
243
+
244
+ ```powershell
245
+ python -m aicorkit graph source list
246
+ python -m aicorkit graph source add --kind folder --label "文档" --path D:/docs --yes
247
+ python -m aicorkit graph source add --kind outlook --label "收件箱" --folder Inbox --yes
248
+ python -m aicorkit graph source sync --all --yes
249
+ ```
250
+
251
+ 支持 `folder` / `outlook` / `web` / `notes`。
252
+
253
+ **检索**(只读,Agent 可直接调用)
254
+
255
+ ```powershell
256
+ python -m aicorkit graph search "知识库架构"
257
+ python -m aicorkit graph search "设计" --mode hybrid -n 10
258
+ python -m aicorkit graph search --entity "项目"
259
+ python -m aicorkit graph fetch --chunk-ids "chunk_id1,chunk_id2"
260
+
261
+ python -m aicorkit graph query source --id docs:design -d 7
262
+ python -m aicorkit graph query global -d 1
263
+ python -m aicorkit graph query topic --entity "知识库"
264
+ python -m aicorkit graph drill --node-id <node_id> --depth 2
265
+ python -m aicorkit graph walk "上周会议结论" -n 5
266
+ ```
267
+
268
+ 向量检索需配置 embedding:
269
+
270
+ ```powershell
271
+ python -m aicorkit config set graph.embed.provider dashscope # DASHSCOPE_API_KEY
272
+ python -m aicorkit config set graph.embed.provider ollama # 本地 Ollama
273
+ python -m aicorkit config set graph.embed.provider openai # OpenAI-compatible
274
+ ```
275
+
276
+ **Worker 与摘要树**
277
+
278
+ 入库后异步处理:打分 → 实体抽取 → embedding → buffer → seal(L1/L2 摘要,Source / Topic / Global 三棵树)。
279
+
280
+ ```powershell
281
+ python -m aicorkit graph worker run-once
282
+ python -m aicorkit graph worker start
283
+ python -m aicorkit graph worker status
284
+ python -m aicorkit graph tree list --kind topic
285
+ python -m aicorkit graph tree digest --yes
286
+ python -m aicorkit graph entity list --hot
287
+ python -m aicorkit graph export -o graph.json
288
+ ```
289
+
290
+ **Vault 与运维**
291
+
292
+ ```powershell
293
+ python -m aicorkit graph vault open
294
+ python -m aicorkit graph vault index --yes
295
+ python -m aicorkit graph dashboard --yes
296
+ python -m aicorkit graph memory show
297
+ python -m aicorkit graph archivist file ./session.json --yes
298
+ python -m aicorkit graph daemon start --once
299
+ ```
300
+
301
+ Obsidian 打开 vault 目录(`graph vault path` 输出路径),浏览 `INDEX.md` 与双链。
302
+
303
+ ### Skill 生成
304
+
305
+ 为 Agent 生成技能文件(默认 **一次生成三个**):
306
+
307
+ ```powershell
308
+ # 默认:aicorkit-outlook + aicorkit-graph + aicorkit-atlassian
309
+ python -m aicorkit skill -p cursor
310
+ python -m aicorkit skill -p kiro
311
+ python -m aicorkit skill -p claude
312
+
313
+ # 仅 Jira / Confluence
314
+ python -m aicorkit skill -p cursor --atlassian
315
+
316
+ # 仅 Outlook / meeting
317
+ python -m aicorkit skill -p cursor --outlook
318
+
319
+ # 仅知识库 Graph
320
+ python -m aicorkit skill -p cursor --graph
321
+ ```
322
+
323
+ | 平台 | aicorkit-outlook | aicorkit-graph | aicorkit-atlassian |
324
+ |------|------------------|----------------|---------------------|
325
+ | Claude | `.claude/skills/aicorkit-outlook/` | `.claude/skills/aicorkit-graph/` | `.claude/skills/aicorkit-atlassian/` |
326
+ | Kiro | `.kiro/skills/aicorkit-outlook/` | `.kiro/skills/aicorkit-graph/` | `.kiro/skills/aicorkit-atlassian/` |
327
+ | Cursor | `.cursor/skills/aicorkit-outlook/` | `.cursor/skills/aicorkit-graph/` | `.cursor/skills/aicorkit-atlassian/` |
328
+
329
+ ### Agent 确认规则
330
+
331
+ | 类型 | 示例 | 需要用户确认 |
332
+ |------|------|--------------|
333
+ | 只读 | `graph search` / `jira get-issue` / `confluence get-page` | 否 |
334
+ | 写入 | `graph ingest` / `jira add-comment` / `confluence update-page` / `outlook send-email` | 是(Jira/Confluence/Graph 用 `--yes`) |
335
+
336
+ ## 调试
337
+
338
+ ### 常见问题
339
+
340
+ **`python` 或 `aicorkit` 找不到**
341
+
342
+ - 使用 `python -m aicorkit ...` 代替直接调用 `aicorkit`
343
+ - 确认 Python 3.11+:`python --version`
344
+ - 开发安装:`pip install -e .`
345
+
346
+ **Outlook 报错 / 无响应**
347
+
348
+ - 确认 Outlook 桌面版已启动并登录
349
+ - 首次 COM 调用可能弹出授权对话框,需允许
350
+ - 在 PowerShell 中单独测试:`python -m aicorkit outlook list-emails -c 3`
351
+
352
+ **Graph `worker run-once` 返回 `processed: 0`**
353
+
354
+ - 正常:sync 内部已跑过 worker,队列已空
355
+ - 新 ingest 后若 job 堆积:`python -m aicorkit graph worker run-once`
356
+
357
+ **向量检索无结果**
358
+
359
+ - 检查 `graph.embed.provider` 是否为 `none`
360
+ - DashScope 需设置 `DASHSCOPE_API_KEY`
361
+ - 切换 provider 后需重新 ingest 以生成向量
362
+
363
+ **项目 config 未生效**
364
+
365
+ - 确认在项目目录下执行命令
366
+ - `python -m aicorkit config paths` 查看是否识别到 `project_config`
367
+
368
+ ### 查看配置与路径
369
+
370
+ ```powershell
371
+ python -m aicorkit config paths
372
+ python -m aicorkit config show
373
+ python -m aicorkit graph status
374
+ python -m aicorkit graph vault path
375
+ python -m aicorkit graph worker status
376
+ ```
377
+
378
+ ### 开发调试
379
+
380
+ ```powershell
381
+ pip install -e ".[dev]"
382
+ pytest
383
+ ```
384
+
385
+ Graph 设计细节见 [`docs/design-graph-knowledge-base.md`](docs/design-graph-knowledge-base.md)。
386
+
387
+ ## 项目结构
388
+
389
+ 按 **skill(能力域)** 分包,每个 skill 含业务逻辑 + 独立 CLI:
390
+
391
+ ```
392
+ aicorkit/
393
+ ├── pyproject.toml
394
+ ├── README.md
395
+ ├── docs/
396
+ └── aicorkit/
397
+ ├── cli.py # 主入口,注册各 skill 子命令
398
+ ├── cli_common.py # CLI 共用工具(JSON 输出等)
399
+ ├── config.py # 全局 + 项目 config 合并
400
+ ├── skill.py # SKILL.md 生成(跨 skill 元工具)
401
+ ├── llm/ # ACP 后端(meeting 共用)
402
+ ├── outlook/ # aicorkit-outlook
403
+ │ ├── com.py # Outlook COM 实现
404
+ │ └── cli.py
405
+ ├── meeting/ # aicorkit-outlook(meeting 部分)
406
+ │ ├── listen.py # STT → AI → TTS
407
+ │ └── cli.py
408
+ ├── graph/ # aicorkit-graph(本地知识库)
409
+ │ ├── cli.py
410
+ │ ├── sources/ # folder / outlook / web / notes
411
+ │ └── ...
412
+ ├── atlassian/ # aicorkit-atlassian
413
+ │ ├── client.py # REST 客户端
414
+ │ ├── jira.py / confluence.py
415
+ │ ├── jira_cli.py / confluence_cli.py / cli.py
416
+ └── wxmsg/ # aicorkit-wxmsg
417
+ ├── api.py
418
+ └── cli.py
419
+ ```
420
+
421
+ ## 工作原理(Outlook)
422
+
423
+ ```
424
+ python -m aicorkit outlook list-emails
425
+ → aicorkit/outlook/cli.py
426
+ → aicorkit/outlook/com.py
427
+ → pywin32 → Outlook.Application COM
428
+ → MAPI → Inbox → JSON 输出
429
+ ```
430
+
431
+ Python 通过 pywin32 直接与 Outlook COM 通信,无需 MCP 服务器或 HTTP 中间层。
432
+
433
+ ## 扩展新 skill
434
+
435
+ 1. 在 `aicorkit/<skill>/` 下新增模块(如 `api.py`)与 `cli.py`(Click group)
436
+ 2. 在 `aicorkit/cli.py` 中 `main.add_command(...)`
437
+ 3. 在 `aicorkit/skill.py` 增加模板并运行 `python -m aicorkit skill -p cursor`