aicortexpy 0.1.0__py3-none-any.whl
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.
- aicortexpy/__init__.py +3 -0
- aicortexpy/__main__.py +5 -0
- aicortexpy/acp_client.py +559 -0
- aicortexpy/acp_conn.py +853 -0
- aicortexpy/acp_errors.py +107 -0
- aicortexpy/agent_env.py +88 -0
- aicortexpy/artifact_ws.py +233 -0
- aicortexpy/artifacts.py +67 -0
- aicortexpy/attachments.py +85 -0
- aicortexpy/auto_commit.py +106 -0
- aicortexpy/capabilities.py +92 -0
- aicortexpy/chat_acp_pool.py +321 -0
- aicortexpy/cli.py +133 -0
- aicortexpy/client.py +438 -0
- aicortexpy/codex_config.py +98 -0
- aicortexpy/config.py +298 -0
- aicortexpy/daemon.py +677 -0
- aicortexpy/data/default_skills/agent-memory/SKILL.md +67 -0
- aicortexpy/data/default_skills/aicorkit-atlassian/SKILL.md +144 -0
- aicortexpy/data/default_skills/aicorkit-graph/SKILL.md +145 -0
- aicortexpy/data/default_skills/aicorkit-outlook/SKILL.md +87 -0
- aicortexpy/data/default_skills/aicorkit-wxmsg/SKILL.md +96 -0
- aicortexpy/data/default_skills/aicortex-basics/SKILL.md +10 -0
- aicortexpy/data/default_skills/aicortex-bridge-cdp/SKILL.md +118 -0
- aicortexpy/data/default_skills/aicortex-cli-ops/SKILL.md +100 -0
- aicortexpy/data/default_skills/aicortex-graph/SKILL.md +30 -0
- aicortexpy/data/default_skills/graphify/SKILL.md +97 -0
- aicortexpy/data/default_skills/question-form/SKILL.md +162 -0
- aicortexpy/data/default_skills/test-report-generator/SKILL.md +179 -0
- aicortexpy/data/default_skills/test-report-generator/scripts/generate_cases.py +146 -0
- aicortexpy/data/default_skills/test-report-generator/scripts/generate_report.py +275 -0
- aicortexpy/design_seed.py +59 -0
- aicortexpy/diskusage.py +209 -0
- aicortexpy/execenv.py +264 -0
- aicortexpy/gc.py +286 -0
- aicortexpy/handoff_bundle.py +65 -0
- aicortexpy/health.py +178 -0
- aicortexpy/local_skills.py +157 -0
- aicortexpy/models.py +385 -0
- aicortexpy/openclaw_config.py +153 -0
- aicortexpy/pinned_workdir.py +60 -0
- aicortexpy/platform_info.py +61 -0
- aicortexpy/poisoned.py +44 -0
- aicortexpy/process.py +168 -0
- aicortexpy/procutil.py +61 -0
- aicortexpy/prompt.py +235 -0
- aicortexpy/repo.py +462 -0
- aicortexpy/runner.py +969 -0
- aicortexpy/runtime_config.py +540 -0
- aicortexpy/sandbox.py +264 -0
- aicortexpy/stream.py +422 -0
- aicortexpy/terminal.py +147 -0
- aicortexpy/tunnel.py +82 -0
- aicortexpy/wakeup.py +222 -0
- aicortexpy-0.1.0.dist-info/METADATA +106 -0
- aicortexpy-0.1.0.dist-info/RECORD +58 -0
- aicortexpy-0.1.0.dist-info/WHEEL +5 -0
- aicortexpy-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-memory
|
|
3
|
+
description: "「记住」defaults to `aicortex memory` (never graph write). Save and recall this Agent's working memory. Use when the user asks to remember something, corrects you, or you learn durable preferences. After writing, briefly tell the user what you recorded."
|
|
4
|
+
inclusion: always
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# agent-memory
|
|
8
|
+
|
|
9
|
+
当前 **Agent 自己的**工作记忆。绑定本 skill 后开通。在 Agent 详情 **Memory** 页签查看。
|
|
10
|
+
|
|
11
|
+
## 默认:记住 → `aicortex memory`
|
|
12
|
+
|
|
13
|
+
用户说「记住」「记录一下」「以后按这个来」、纠正你、或要跨会话保留的偏好/约定/环境事实 → **立刻**用本 skill,命令是 `aicortex memory`(`--doc long` 约定与事实,`--doc user` 用户本人)。
|
|
14
|
+
|
|
15
|
+
**不要**用 `aicortex graph write`,**不要**写工作区知识库,**不要**找名叫 MEMORY 的 Collection。那些是团队知识库,和本记忆不是一回事。
|
|
16
|
+
|
|
17
|
+
不要写 Hermes `~/.hermes/memories/`,不要写 `aicorkit graph memory`。
|
|
18
|
+
|
|
19
|
+
任务开始时 `long` 和 `user` 已在 `.agent_context/memory.md`,不必先 `show`。查项目资料用另一个 skill:`aicortex graph search`。
|
|
20
|
+
|
|
21
|
+
## 何时加载并写入
|
|
22
|
+
|
|
23
|
+
出现下面任一情况,**立刻** `aicortex memory`,不要等任务结束、不要默记在对话里:
|
|
24
|
+
|
|
25
|
+
- 用户要求记住某件事
|
|
26
|
+
- 用户纠正你的错误,或指出正确做法(漏记下次还会犯)
|
|
27
|
+
- 学到应跨会话保留的偏好、约定、环境事实
|
|
28
|
+
|
|
29
|
+
## 文档
|
|
30
|
+
|
|
31
|
+
| `--doc` | 含义 | 写法 |
|
|
32
|
+
|---|---|---|
|
|
33
|
+
| `user` | 关于用户本人:偏好、习惯、身份相关事实 | 先 show 再整篇 write,建议 < 2000 字 |
|
|
34
|
+
| `long` | 本 Agent 稳定工作记忆:约定、纠错、选型 | 先 show 再整篇 write,建议 < 4000 字 |
|
|
35
|
+
| `daily` | 当天短记 | 只 append;稳定了再并入 `long` |
|
|
36
|
+
|
|
37
|
+
纠正工作方式 / 约定 → `long`。关于用户本人 → `user`。
|
|
38
|
+
|
|
39
|
+
## 命令
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
aicortex memory show
|
|
43
|
+
aicortex memory show --doc user
|
|
44
|
+
aicortex memory append --doc user --content "User prefers concise replies" --heading "communication"
|
|
45
|
+
aicortex memory append --doc long --content "Company git host is https://git.eniot.io/" --heading "git"
|
|
46
|
+
aicortex memory write --doc long --body-file ./long.md
|
|
47
|
+
aicortex memory append --doc daily --content "Decision: persist this in long after it stabilizes"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Windows 长文本用 `--body-file` / `--content-file`。
|
|
51
|
+
|
|
52
|
+
## 写完必须反馈
|
|
53
|
+
|
|
54
|
+
命令成功后,在回复里用一两句说明(不要贴全文):
|
|
55
|
+
|
|
56
|
+
- 记到哪个文档:`user` / `long` / `daily`
|
|
57
|
+
- 大概记了什么
|
|
58
|
+
|
|
59
|
+
例:已记到 Memory(long):公司 Git 为 https://git.eniot.io/。
|
|
60
|
+
|
|
61
|
+
## 其它
|
|
62
|
+
|
|
63
|
+
任务结束有可复用结论 → `daily`;稳定事实再并入 `long`。
|
|
64
|
+
|
|
65
|
+
用户**没有**明确要求保存到知识库时,一律走本 skill,不要 `aicortex graph write`。
|
|
66
|
+
|
|
67
|
+
**不要存**:常识、大段日志/代码、临时路径、当前 issue 已有内容、密钥/token。
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: aicorkit-atlassian
|
|
3
|
+
description: "Jira and Confluence REST CLI. Use when the user wants to search/read/update Jira issues, agile boards/sprints, or Confluence wiki pages. Requires ~/.aicorkit config + secrets.env credentials."
|
|
4
|
+
inclusion: always
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# aicorkit-atlassian
|
|
8
|
+
|
|
9
|
+
Jira issue tracking + Confluence wiki via REST API (Server & Cloud).
|
|
10
|
+
|
|
11
|
+
## Platform
|
|
12
|
+
|
|
13
|
+
Invoke `aicorkit` via Bash/PowerShell in the agent shell. On Windows prefer `python -m aicorkit ...`.
|
|
14
|
+
|
|
15
|
+
## Requirements
|
|
16
|
+
|
|
17
|
+
- `pip install aicorkit`
|
|
18
|
+
- Credentials in `~/.aicorkit/secrets.env`:
|
|
19
|
+
- `ATLASSIAN_USERNAME`
|
|
20
|
+
- `ATLASSIAN_PASSWORD`
|
|
21
|
+
- URLs in `~/.aicorkit/config.yaml`:
|
|
22
|
+
```yaml
|
|
23
|
+
atlassian:
|
|
24
|
+
jira_url: https://jira.example.com
|
|
25
|
+
confluence_url: https://wiki.example.com
|
|
26
|
+
```
|
|
27
|
+
- Test: `aicorkit atlassian test`
|
|
28
|
+
- Windows / Linux / macOS (HTTP REST, no COM)
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
Invoke via Bash/PowerShell. On Windows prefer `python -m aicorkit ...`.
|
|
33
|
+
|
|
34
|
+
### Connection
|
|
35
|
+
|
|
36
|
+
| Command | Description |
|
|
37
|
+
|---------|-------------|
|
|
38
|
+
| `aicorkit atlassian test` | Test Jira + Confluence connectivity and auth |
|
|
39
|
+
|
|
40
|
+
### Jira — Read (no confirmation)
|
|
41
|
+
|
|
42
|
+
| Command | Description |
|
|
43
|
+
|---------|-------------|
|
|
44
|
+
| `aicorkit jira search` | Search by JQL |
|
|
45
|
+
| `aicorkit jira list-issues` | Filter by project/status/assignee (JQL sugar) |
|
|
46
|
+
| `aicorkit jira get-issue` | Issue details by key |
|
|
47
|
+
| `aicorkit jira list-comments` | Issue comments |
|
|
48
|
+
| `aicorkit jira list-projects` | Accessible projects |
|
|
49
|
+
| `aicorkit jira list-boards` | Agile boards |
|
|
50
|
+
| `aicorkit jira list-sprints` | Sprints on a board |
|
|
51
|
+
| `aicorkit jira list-board-issues` | Issues on board/sprint |
|
|
52
|
+
|
|
53
|
+
**search**
|
|
54
|
+
```
|
|
55
|
+
aicorkit jira search --jql "assignee = currentUser() AND status != Done ORDER BY updated DESC" -c 20
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**list-issues**
|
|
59
|
+
```
|
|
60
|
+
aicorkit jira list-issues --project CMS --status Open --assignee me -c 10
|
|
61
|
+
aicorkit jira list-issues --jql "project = CMS AND updated >= -7d"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**get-issue / list-comments**
|
|
65
|
+
```
|
|
66
|
+
aicorkit jira get-issue CMS-123
|
|
67
|
+
aicorkit jira list-comments CMS-123
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**boards / sprints**
|
|
71
|
+
```
|
|
72
|
+
aicorkit jira list-boards --project CMS
|
|
73
|
+
aicorkit jira list-sprints --board-id 945 --state active
|
|
74
|
+
aicorkit jira list-board-issues --board-id 945 --sprint-id active -c 50
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
`--sprint-id` accepts numeric id or `active` / `future` / `closed`.
|
|
78
|
+
|
|
79
|
+
### Jira — Write (confirm user; require `--yes`)
|
|
80
|
+
|
|
81
|
+
| Command | Description |
|
|
82
|
+
|---------|-------------|
|
|
83
|
+
| `aicorkit jira create-issue` | Create issue |
|
|
84
|
+
| `aicorkit jira add-comment` | Add comment |
|
|
85
|
+
| `aicorkit jira transition` | Change status |
|
|
86
|
+
| `aicorkit jira update-issue` | Update summary/description/assignee/labels |
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
aicorkit jira create-issue --project CMS --type Story --summary "标题" --description "..." --yes
|
|
90
|
+
aicorkit jira add-comment CMS-123 --body "评论内容" --yes
|
|
91
|
+
aicorkit jira transition CMS-123 --to "In Progress" --yes
|
|
92
|
+
aicorkit jira update-issue CMS-123 --description "新描述" --assignee zheng.zhang5 --yes
|
|
93
|
+
aicorkit jira update-issue CMS-123 --assignee none --yes
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Confluence — Read (no confirmation)
|
|
97
|
+
|
|
98
|
+
| Command | Description |
|
|
99
|
+
|---------|-------------|
|
|
100
|
+
| `aicorkit confluence search` | Search pages (CQL or keyword) |
|
|
101
|
+
| `aicorkit confluence list-spaces` | List spaces |
|
|
102
|
+
| `aicorkit confluence list-pages` | Page tree in space or under parent |
|
|
103
|
+
| `aicorkit confluence get-page` | Page body by id or space+title |
|
|
104
|
+
|
|
105
|
+
**search**
|
|
106
|
+
```
|
|
107
|
+
aicorkit confluence search --space AESCESS -q "API" -c 10
|
|
108
|
+
aicorkit confluence search --cql "space = AESCESS AND type = page AND lastModified >= now('-7d')"
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**list-pages (tree)**
|
|
112
|
+
```
|
|
113
|
+
aicorkit confluence list-pages --space AESCESS
|
|
114
|
+
aicorkit confluence list-pages --space AESCESS --parent-id 12753746
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**get-page**
|
|
118
|
+
```
|
|
119
|
+
aicorkit confluence get-page --id 13069892
|
|
120
|
+
aicorkit confluence get-page --space AESCESS --title "Edge需求"
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Confluence — Write (confirm user; require `--yes`)
|
|
124
|
+
|
|
125
|
+
| Command | Description |
|
|
126
|
+
|---------|-------------|
|
|
127
|
+
| `aicorkit confluence update-page` | Update page (needs current `--version`) |
|
|
128
|
+
| `aicorkit confluence add-comment` | Add page comment |
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
aicorkit confluence update-page --id 13069892 --version 7 --body "更新内容" --yes
|
|
132
|
+
aicorkit confluence add-comment --id 13069892 --body "评论" --yes
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Read `--version` from `get-page` output before update.
|
|
136
|
+
|
|
137
|
+
## Rules
|
|
138
|
+
|
|
139
|
+
1. **Read-only** (no confirmation): all `jira search/get/list-*`, all `confluence search/get/list-*`, `atlassian test`.
|
|
140
|
+
2. **Mutating** (confirm user first; pass `--yes`): `jira create/add-comment/transition/update-issue`, `confluence update-page/add-comment`.
|
|
141
|
+
3. Prefer `jira search` or `list-issues` then `get-issue`; for wiki use `confluence search` then `get-page`.
|
|
142
|
+
4. Confluence is **not** synced to Graph — query live via CLI only.
|
|
143
|
+
5. Jira Server 7.x uses REST API v2; issue keys like `PROJ-123`.
|
|
144
|
+
6. WeCom group notify: use **aicorkit-wxmsg** skill.
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: aicorkit-graph
|
|
3
|
+
description: "Local knowledge base CLI (Memory Tree + Obsidian vault). Use when the user wants to ingest/search documents, sync email or folders into memory, query summaries, walk retrieval, or manage MEMORY.md. Run 'aicorkit graph --help' for commands."
|
|
4
|
+
inclusion: always
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# aicorkit-graph
|
|
8
|
+
|
|
9
|
+
Local-first knowledge base: SQLite + Obsidian-compatible `wiki/` vault. Reference OpenHuman Memory Tree pattern.
|
|
10
|
+
|
|
11
|
+
## Platform
|
|
12
|
+
|
|
13
|
+
Invoke `aicorkit` via Bash/PowerShell in the agent shell.
|
|
14
|
+
|
|
15
|
+
## Requirements
|
|
16
|
+
|
|
17
|
+
- `pip install aicorkit[graph]` for vector search
|
|
18
|
+
- Windows recommended (Outlook email ingest)
|
|
19
|
+
- Optional: `DASHSCOPE_API_KEY` for dashscope embeddings / meeting archive
|
|
20
|
+
|
|
21
|
+
## Storage
|
|
22
|
+
|
|
23
|
+
| Scope | Default path |
|
|
24
|
+
|-------|--------------|
|
|
25
|
+
| Global | `~/.aicorkit/memory/` (`chunks.db` + `wiki/`) |
|
|
26
|
+
| Project | `<project>/.aicorkit/memory/` via `.aicorkit/config.yaml` |
|
|
27
|
+
|
|
28
|
+
Check active config: `aicorkit config paths` / `aicorkit config show`
|
|
29
|
+
|
|
30
|
+
Project override example (`.aicorkit/config.yaml`):
|
|
31
|
+
```yaml
|
|
32
|
+
graph:
|
|
33
|
+
workspace: .aicorkit/memory
|
|
34
|
+
graph_sources:
|
|
35
|
+
- id: repo-docs
|
|
36
|
+
kind: folder
|
|
37
|
+
label: 项目文档
|
|
38
|
+
path: ./docs
|
|
39
|
+
glob: "**/*.md"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Commands
|
|
43
|
+
|
|
44
|
+
| Command | Description |
|
|
45
|
+
|---------|-------------|
|
|
46
|
+
| `aicorkit graph init` | Initialize chunks.db and wiki/ |
|
|
47
|
+
| `aicorkit graph status` | Counts and storage size |
|
|
48
|
+
| `aicorkit graph ingest document\|file\|chat\|meeting\|email` | Ingest content |
|
|
49
|
+
| `aicorkit graph source *` | Configure and sync sources |
|
|
50
|
+
| `aicorkit graph search` | Keyword / vector / hybrid search |
|
|
51
|
+
| `aicorkit graph fetch` | Full chunk bodies by id |
|
|
52
|
+
| `aicorkit graph walk` | Multi-step agentic retrieval |
|
|
53
|
+
| `aicorkit graph query *` | Summary tree: source / global / topic |
|
|
54
|
+
| `aicorkit graph worker *` | Async extract / seal / digest jobs |
|
|
55
|
+
| `aicorkit graph vault *` | Obsidian vault path / INDEX |
|
|
56
|
+
| `aicorkit graph memory *` | MEMORY.md bridge |
|
|
57
|
+
| `aicorkit graph archivist` | Archive conversation JSON |
|
|
58
|
+
| `aicorkit graph daemon` | Scheduled sync + worker |
|
|
59
|
+
|
|
60
|
+
**init / setup**
|
|
61
|
+
```
|
|
62
|
+
aicorkit graph setup --yes
|
|
63
|
+
aicorkit graph setup --yes --project --docs ./docs --outlook --sync --skill-platform cursor
|
|
64
|
+
aicorkit graph init
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**ingest** (requires `--yes`)
|
|
68
|
+
```
|
|
69
|
+
aicorkit graph ingest document --source-id "proj:v1" --title "设计" --body-file ./d.md --yes
|
|
70
|
+
aicorkit graph ingest file --path ./note.md --source-id "notes:manual" --yes
|
|
71
|
+
aicorkit graph ingest chat --source-id "chat:s1" --file turns.json --yes
|
|
72
|
+
cat turns.json | aicorkit graph ingest chat --source-id "chat:s1" --stdin --yes
|
|
73
|
+
aicorkit graph ingest meeting --file meeting.json --yes
|
|
74
|
+
aicorkit graph ingest email --from outlook --folder Inbox -c 20 --yes
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**sources & sync** (requires `--yes`)
|
|
78
|
+
```
|
|
79
|
+
aicorkit graph source add --kind folder --label "文档" --path D:/docs --yes
|
|
80
|
+
aicorkit graph source add --kind outlook --label "收件箱" --folder Inbox --yes
|
|
81
|
+
aicorkit graph source sync --all --yes
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Kinds: `folder` | `outlook` | `web` | `notes`
|
|
85
|
+
|
|
86
|
+
**search** (read-only)
|
|
87
|
+
```
|
|
88
|
+
aicorkit graph search "季度复盘"
|
|
89
|
+
aicorkit graph search --entity "知识库"
|
|
90
|
+
aicorkit graph search "API" --mode hybrid -n 10
|
|
91
|
+
aicorkit graph fetch --chunk-ids "id1,id2"
|
|
92
|
+
aicorkit graph walk "上周结论" -n 5
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Team workspace knowledge in an **AICortex task**: bind collections on the Agent detail **Knowledge** tab, then `aicortex graph search`. Write with `aicortex graph write` **only** when the user explicitly asks to save to 知识库. 「记住」goes to Agent Memory (`aicortex memory`), never graph write. Do not use `aicorkit graph remote login/use` at runtime.
|
|
96
|
+
|
|
97
|
+
`aicorkit graph remote login` is only for a **local laptop vault** (browse cloud collections from your machine). After login, `graph search` / `walk` / `fetch` default to local + cloud (`--scope all`). `--bind all` searches every collection in the workspace; `--bind <slug>` pins one library. Prefer editing documents in the web UI.
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
# In an Agent task (preferred)
|
|
101
|
+
aicortex graph search "架构方案"
|
|
102
|
+
|
|
103
|
+
# Local laptop vault only
|
|
104
|
+
aicorkit graph remote login --base-url https://app-portal-pdc1.envisioniot.com/aicortex-api --token mul_... --workspace <slug>
|
|
105
|
+
aicorkit graph remote use --workspace <slug>
|
|
106
|
+
aicorkit graph remote collections
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Flags: `--entity TEXT` `--source-id TEXT` `-n INT` `--mode [auto|keyword|vector|hybrid]`
|
|
110
|
+
|
|
111
|
+
Embed: `aicorkit config set graph.embed.provider dashscope|ollama|openai|none`
|
|
112
|
+
|
|
113
|
+
**query / tree / worker**
|
|
114
|
+
```
|
|
115
|
+
aicorkit graph query source --id docs:design -d 7
|
|
116
|
+
aicorkit graph query global -d 1
|
|
117
|
+
aicorkit graph query topic --entity "知识库"
|
|
118
|
+
aicorkit graph drill --node-id <node_id> --depth 1
|
|
119
|
+
aicorkit graph worker run-once
|
|
120
|
+
aicorkit graph worker start
|
|
121
|
+
aicorkit graph tree digest --yes
|
|
122
|
+
aicorkit graph entity list --hot
|
|
123
|
+
aicorkit graph export -o graph.json
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**vault / memory / ops** (mutating need `--yes`)
|
|
127
|
+
```
|
|
128
|
+
aicorkit graph vault open
|
|
129
|
+
aicorkit graph vault index --yes
|
|
130
|
+
aicorkit graph memory show
|
|
131
|
+
aicorkit graph memory append --section "决策" --content "..." --yes
|
|
132
|
+
aicorkit graph archivist file ./session.json --yes
|
|
133
|
+
aicorkit graph dashboard --yes
|
|
134
|
+
aicorkit graph daemon start --once
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Obsidian: open vault from `aicorkit graph vault path` — browse `wiki/INDEX.md`, `sources/`, `entities/`.
|
|
138
|
+
|
|
139
|
+
## Rules
|
|
140
|
+
|
|
141
|
+
1. **Read-only** (no confirmation): `search`, `fetch`, `walk`, `query`, `drill`, `status`, `vault open/path`, `entity list`, `worker status`, `tree list`, `memory show/path`, `config show/paths`.
|
|
142
|
+
2. **Mutating** (confirm user; use `--yes`): `ingest`, `source add/sync`, `init --force`, `tree digest`, `worker flush-stale`, `vault index`, `memory append`, `archivist`, `dashboard`, `daemon`.
|
|
143
|
+
3. Prefer `walk` or `search --mode hybrid` for agent retrieval; use `fetch` to cite full chunk text.
|
|
144
|
+
4. Project config overrides global — run commands from project root when using per-repo workspace.
|
|
145
|
+
5. WeCom group notify: use **aicorkit-wxmsg** skill.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: aicorkit-outlook
|
|
3
|
+
description: "CLI for Outlook email/calendar via COM or HTTP bridge. Use when the user wants to read/send email, manage calendar, or run meeting audio pipeline. For local knowledge base use the separate aicorkit-graph skill."
|
|
4
|
+
inclusion: always
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# aicorkit-outlook
|
|
8
|
+
|
|
9
|
+
Outlook automation via **aicorkit** (`pip install aicorkit`). Windows host may also run **aicortex-bridge** (`pip install aicortex-bridge`, same repo) for Pod deployments.
|
|
10
|
+
|
|
11
|
+
## Platform
|
|
12
|
+
|
|
13
|
+
| Mode | Where | How |
|
|
14
|
+
|------|-------|-----|
|
|
15
|
+
| **COM (local)** | Windows + Outlook desktop | `aicorkit outlook ...` |
|
|
16
|
+
| **Bridge (pod)** | Linux pod + Windows host | Host: `aicortex-bridge serve`; pod: `AICORTEX_BRIDGE_URL=http://host.docker.internal:8766` |
|
|
17
|
+
|
|
18
|
+
When `AICORTEX_BRIDGE_URL` is set, **aicorkit** routes `outlook *` and `graph ingest email --from outlook` over HTTP automatically. Legacy: `AICORKIT_OUTLOOK_BRIDGE_URL` / `AICORTEX_OUTLOOK_BRIDGE_URL`.
|
|
19
|
+
|
|
20
|
+
Install (Windows host):
|
|
21
|
+
|
|
22
|
+
```powershell
|
|
23
|
+
pip install aicorkit aicortex-bridge
|
|
24
|
+
aicortex-bridge serve
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Requirements
|
|
28
|
+
|
|
29
|
+
- **Local COM:** Windows + Outlook desktop signed in
|
|
30
|
+
- **Bridge:** Windows host with Outlook + `aicortex-bridge`; pod with `extra_hosts` / `host.docker.internal`
|
|
31
|
+
- Linux without bridge: Outlook unavailable
|
|
32
|
+
|
|
33
|
+
## Outlook — Email (CLI)
|
|
34
|
+
|
|
35
|
+
| Command | Description |
|
|
36
|
+
|---------|-------------|
|
|
37
|
+
| `aicorkit outlook list-emails` | List recent emails (Inbox / Sent) |
|
|
38
|
+
| `aicorkit outlook read-email` | Search by subject keyword, return body |
|
|
39
|
+
| `aicorkit outlook send-email` | Send email |
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
aicorkit outlook list-emails -f Inbox -c 20
|
|
43
|
+
aicorkit outlook read-email -q "quarterly report"
|
|
44
|
+
aicorkit outlook send-email --to "a@b.com" --subject "Hello" --body "World"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**send-email policy** (`email.whitelist` in `~/.aicorkit/config.yaml`): only whitelisted To/CC are sent; others return `blocked: ...`.
|
|
48
|
+
|
|
49
|
+
## Outlook — Calendar (CLI)
|
|
50
|
+
|
|
51
|
+
| Command | Description |
|
|
52
|
+
|---------|-------------|
|
|
53
|
+
| `aicorkit outlook list-calendar` | Upcoming events |
|
|
54
|
+
| `aicorkit outlook create-meeting` | Create meeting invitation |
|
|
55
|
+
| `aicorkit outlook free-busy` | Free/busy for an email (`-e`) |
|
|
56
|
+
| `aicorkit outlook list-rooms` | Frequent meeting rooms (recent calendar) |
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
aicorkit outlook list-calendar -d 14
|
|
60
|
+
aicorkit outlook create-meeting --subject "Review" --start "2026-06-08 14:00" --duration 60 --attendees "team@co.com"
|
|
61
|
+
aicorkit outlook free-busy -e "a@b.com" -d 7
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Graph + Outlook
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
aicorkit graph ingest email --from outlook --folder Inbox -c 20 --yes
|
|
68
|
+
aicorkit graph source add --kind outlook --label "收件箱" --folder Inbox --yes
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Uses `list_emails_full` — works via bridge when env URL is set.
|
|
72
|
+
|
|
73
|
+
## Meeting (optional, COM-only)
|
|
74
|
+
|
|
75
|
+
Requires `pip install aicorkit[meeting]`. Not available via bridge.
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
aicorkit meeting listen
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Rules
|
|
82
|
+
|
|
83
|
+
1. Read-only commands — no confirmation needed.
|
|
84
|
+
2. Mutating (`send-email`, `create-meeting`, `meeting listen/start`) — confirm with user first.
|
|
85
|
+
3. Email addresses: semicolon-separated for multiple recipients.
|
|
86
|
+
|
|
87
|
+
Knowledge base: **aicorkit-graph**. Jira/Confluence: **aicorkit-atlassian**. WeCom: **aicorkit-wxmsg**.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: aicorkit-wxmsg
|
|
3
|
+
description: "企业微信群机器人 Webhook 消息推送。Use when the user wants to notify a WeCom group: text, markdown, news card, image, or file. Configure wxmsg.webhook_url in ~/.aicorkit/config.yaml."
|
|
4
|
+
inclusion: always
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# aicorkit-wxmsg
|
|
8
|
+
|
|
9
|
+
企业微信群机器人消息推送(Webhook REST,无额外依赖)。
|
|
10
|
+
|
|
11
|
+
## Platform
|
|
12
|
+
|
|
13
|
+
Invoke `aicorkit` via Bash/PowerShell in the agent shell. On Windows prefer `python -m aicorkit ...`.
|
|
14
|
+
|
|
15
|
+
## Requirements
|
|
16
|
+
|
|
17
|
+
- `pip install aicorkit`
|
|
18
|
+
- Webhook 写入 `~/.aicorkit/config.yaml`(勿提交 git):
|
|
19
|
+
```yaml
|
|
20
|
+
wxmsg:
|
|
21
|
+
webhook_url: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_KEY
|
|
22
|
+
timeout: 30
|
|
23
|
+
```
|
|
24
|
+
或命令:`aicorkit config set wxmsg.webhook_url "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=..."`
|
|
25
|
+
- 也可在 `~/.aicorkit/secrets.env` 设 `WECHAT_WEBHOOK_URL`,config 里用环境变量引用
|
|
26
|
+
- 测试: `aicorkit wxmsg test`
|
|
27
|
+
- Windows / Linux / macOS
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
Invoke via Bash/PowerShell. On Windows prefer `python -m aicorkit ...`.
|
|
32
|
+
|
|
33
|
+
### Commands
|
|
34
|
+
|
|
35
|
+
| Command | Description |
|
|
36
|
+
|---------|-------------|
|
|
37
|
+
| `aicorkit wxmsg send` | 文本 / Markdown |
|
|
38
|
+
| `aicorkit wxmsg send-card` | 图文卡片(标题 + 跳转 URL + 可选封面) |
|
|
39
|
+
| `aicorkit wxmsg send-image` | 本地图片(JPG/PNG ≤2M) |
|
|
40
|
+
| `aicorkit wxmsg send-file` | 本地文件(≤20M,先上传再发送) |
|
|
41
|
+
| `aicorkit wxmsg test` | 连通性测试 |
|
|
42
|
+
|
|
43
|
+
**send** — 纯文本或 Markdown
|
|
44
|
+
```
|
|
45
|
+
aicorkit wxmsg send "构建完成"
|
|
46
|
+
aicorkit wxmsg send --markdown "**告警** CI failed"
|
|
47
|
+
aicorkit wxmsg send -f report.md --markdown-v2
|
|
48
|
+
aicorkit wxmsg send --at "@all" "请尽快处理"
|
|
49
|
+
echo "pipeline done" | aicorkit wxmsg send -
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**send-card** — 带链接的卡片通知(推荐)
|
|
53
|
+
```
|
|
54
|
+
aicorkit wxmsg send-card --title "AICortex" \
|
|
55
|
+
--url "https://app.example.com/aicortex/" \
|
|
56
|
+
--desc "任务完成通知"
|
|
57
|
+
aicorkit wxmsg send-card --title "构建完成" --url "https://ci.example.com/42" \
|
|
58
|
+
--desc "main 已通过" --picurl "https://example.com/cover.png"
|
|
59
|
+
```
|
|
60
|
+
- `--picurl` 须为企微可访问的 **公网 HTTPS** 图片;本地图请用 `send-image`
|
|
61
|
+
- 不传 `--picurl` 时卡片仍可用,顶部显示默认占位图
|
|
62
|
+
- 多条卡片:`-j '[{"title":"a","url":"https://..."}]'`(最多 8 条)
|
|
63
|
+
|
|
64
|
+
**send-image / send-file** — 本地文件
|
|
65
|
+
```
|
|
66
|
+
aicorkit wxmsg send-image screenshot.png
|
|
67
|
+
aicorkit wxmsg send-file build.log
|
|
68
|
+
aicorkit wxmsg send-file report.pdf
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**CLI 选项**
|
|
72
|
+
- 覆盖 webhook:`--webhook-url` 或 `--key`
|
|
73
|
+
- 预览不发送:`--dry-run`(`send` / `send-card`)
|
|
74
|
+
|
|
75
|
+
## Message type guide
|
|
76
|
+
|
|
77
|
+
| 场景 | 命令 |
|
|
78
|
+
|------|------|
|
|
79
|
+
| 简短通知 | `send` |
|
|
80
|
+
| 带跳转链接 | `send-card` |
|
|
81
|
+
| 发截图 | `send-image` |
|
|
82
|
+
| 发日志/附件 | `send-file` |
|
|
83
|
+
| 代码块/表格 | `send --markdown-v2` |
|
|
84
|
+
|
|
85
|
+
## Rules
|
|
86
|
+
|
|
87
|
+
1. 发送前确认 webhook 已配置(`aicorkit wxmsg test`);配置好后无需每次加 `--webhook-url`。
|
|
88
|
+
2. 结构化、可点击的通知优先 `send-card`;纯文本用 `send`。
|
|
89
|
+
3. 卡片封面用 `--picurl`(远程 URL);本地图片用 `send-image`,二者不要混用。
|
|
90
|
+
4. 勿在消息或 git 中泄露 webhook key;`config.yaml` 含 key 时不要提交仓库。
|
|
91
|
+
5. 单机器人 **20 条/分钟**;高频场景合并消息。
|
|
92
|
+
6. 发送类命令建议先与用户确认标题、链接和正文内容。
|
|
93
|
+
|
|
94
|
+
Outlook / meeting: **aicorkit-outlook** skill.
|
|
95
|
+
Knowledge base: **aicorkit-graph** skill.
|
|
96
|
+
Jira / Confluence: **aicorkit-atlassian** skill.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# AICortex basics
|
|
2
|
+
|
|
3
|
+
You are running inside an AICortex workspace via the local daemon.
|
|
4
|
+
|
|
5
|
+
## Rules
|
|
6
|
+
|
|
7
|
+
- Prefer `aicortex` CLI with `--output json` for structured reads.
|
|
8
|
+
- Final issue results go through `aicortex issue comment add`.
|
|
9
|
+
- Do not @mention agents as a polite sign-off (that re-triggers runs).
|
|
10
|
+
- On Windows use `--content-file` for multi-line / non-ASCII comment bodies.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: aicortex-bridge-cdp
|
|
3
|
+
description: >-
|
|
4
|
+
在 aicortexpod 用本机 Chrome CDP(9222)或宿主机 aicortex-bridge(8766)打开页面、截图、UI 验收。
|
|
5
|
+
Use when the user mentions 浏览器、Chrome、CDP、DevTools、Playwright、页面测试、
|
|
6
|
+
UI 验收、打开网页、截图、中文乱码、或在 aicortexpod 里测前端。
|
|
7
|
+
inclusion: always
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# aicortex-bridge-cdp
|
|
11
|
+
|
|
12
|
+
在 **aicortexpod** 里没有 Cursor IDE Browser。
|
|
13
|
+
|
|
14
|
+
- **页面测试 / 截图 / 中文渲染(优先)**:容器内 **aicortex-cdp**(本机 Chrome,端口 `9222`)。镜像已装 Noto CJK / 文泉驿,避免中文方框乱码。
|
|
15
|
+
- **Outlook / 宿主机已登录桌面 Chrome**:仍走 Windows **aicortex-bridge**(`AICORTEX_BRIDGE_URL`,端口 `8766`)。
|
|
16
|
+
|
|
17
|
+
## 本机 CDP(截图 / 中文页,优先)
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
aicortex-cdp status || aicortex-cdp start
|
|
21
|
+
curl -fsS http://127.0.0.1:9222/json/version
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Playwright:
|
|
25
|
+
|
|
26
|
+
```javascript
|
|
27
|
+
const browser = await chromium.connectOverCDP("http://127.0.0.1:9222");
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
中文回退:镜像已装 `fonts-noto-cjk`、`fonts-wqy-microhei`、`fonts-wqy-zenhei`,Chrome 以 `--lang=zh-CN` 启动。`aicortex-cdp start` 失败时再查 `/var/log/aicortex-cdp.log`。
|
|
31
|
+
|
|
32
|
+
`AICORTEX_POD_CDP=0` 可关闭入口自动拉起。
|
|
33
|
+
|
|
34
|
+
## 前置(宿主机 bridge,Outlook / 桌面 Chrome)
|
|
35
|
+
|
|
36
|
+
1. 宿主机已安装并启动(默认后台):
|
|
37
|
+
|
|
38
|
+
```powershell
|
|
39
|
+
pip install -U aicortex-bridge
|
|
40
|
+
aicortex-bridge serve
|
|
41
|
+
aicortex-bridge status
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
需要 **aicortex-bridge >= 0.1.2**(含 CDP)。`0.1.1` 只有 Outlook。
|
|
45
|
+
|
|
46
|
+
2. Pod 能访问 `host.docker.internal`(`docker run` 已加 `--add-host=host.docker.internal:host-gateway`)。
|
|
47
|
+
3. Pod 已设置 `AICORTEX_BRIDGE_URL=http://host.docker.internal:8766`(Outlook 与 CDP 共用)。
|
|
48
|
+
|
|
49
|
+
## 连接地址(宿主机 Chrome:只走 bridge,不要直连 9333)
|
|
50
|
+
|
|
51
|
+
优先用环境变量:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
echo "${AICORTEX_BRIDGE_URL:-未设置}"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
默认:
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
http://host.docker.internal:8766
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Playwright:
|
|
64
|
+
|
|
65
|
+
```javascript
|
|
66
|
+
const browser = await chromium.connectOverCDP("http://host.docker.internal:8766");
|
|
67
|
+
const context = browser.contexts()[0] || await browser.newContext();
|
|
68
|
+
const page = context.pages()[0] || await context.newPage();
|
|
69
|
+
await page.goto("https://example.com");
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
先探测再测页面:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
curl -4 -s http://host.docker.internal:8766/health
|
|
76
|
+
curl -4 -s http://host.docker.internal:8766/json/version
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
`/json/version` 应返回 JSON,含 `webSocketDebuggerUrl`(主机名应是 `host.docker.internal` 或 IP,**不要**再用 `ws://127.0.0.1/...`)。
|
|
80
|
+
|
|
81
|
+
`host.docker.internal` 解析到 IPv6 失败时,改用:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
getent ahostsv4 host.docker.internal
|
|
85
|
+
# 例如 192.168.65.254
|
|
86
|
+
curl -s http://192.168.65.254:8766/json/version
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Playwright 也改成 `http://<该IPv4>:8766`。
|
|
90
|
+
|
|
91
|
+
## 禁止
|
|
92
|
+
|
|
93
|
+
- 不要用 Cursor IDE 的 `browser_cdp` / `cursor-ide-browser`(pod 里没有该 MCP)。
|
|
94
|
+
- 截图、中文页优先连本机 `http://127.0.0.1:9222`(`aicortex-cdp`),不要为截图再起第二套 Chrome。
|
|
95
|
+
- 不要从 pod 直连宿主机 `127.0.0.1:9333` 或裸访问 `http://host.docker.internal:9333`(Chrome 会拒 Host 头)。
|
|
96
|
+
- 需要宿主机桌面会话时才连 `AICORTEX_BRIDGE_URL`(8766)。
|
|
97
|
+
|
|
98
|
+
## 控制接口(可选)
|
|
99
|
+
|
|
100
|
+
Bridge 与 Outlook 共用 `8766`:
|
|
101
|
+
|
|
102
|
+
| 用途 | 请求 |
|
|
103
|
+
|------|------|
|
|
104
|
+
| 健康 | `GET /health`(`cdp` 应为 `up`) |
|
|
105
|
+
| 状态 | `GET /v1/cdp/status` |
|
|
106
|
+
| 启动 Chrome | `POST /v1/cdp/start` |
|
|
107
|
+
| 停止(仅 bridge 拉起的进程) | `POST /v1/cdp/stop` |
|
|
108
|
+
|
|
109
|
+
设了 `AICORTEX_BRIDGE_TOKEN` 时,`/v1/cdp/*` 需要 `Authorization: Bearer ...`。`/json` 与 `/devtools` 不需要 token。
|
|
110
|
+
|
|
111
|
+
## 操作约定
|
|
112
|
+
|
|
113
|
+
1. 先 `/health` + `/json/version`,不通就让用户在宿主机执行 `aicortex-bridge serve`,不要假装已经测过页面。
|
|
114
|
+
2. 用已有浏览器 context/page,避免反复 newContext 把用户桌面 Chrome 搞乱。
|
|
115
|
+
3. 改数据、提交表单、删除前先确认。
|
|
116
|
+
4. 只读打开/检查页面无需确认。
|
|
117
|
+
|
|
118
|
+
Outlook 仍用 **aicorkit-outlook**(同一 bridge 的 `/v1/outlook/*`)。
|