@cteno/sdk-linux-x64 0.0.0-stage → 2.10.14

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 (116) hide show
  1. package/LICENSE.daemon +31 -0
  2. package/README.md +4 -2
  3. package/agents/flow-analyzer/AGENT.md +71 -0
  4. package/bin/cteno-host-cli +4 -0
  5. package/bin/cteno-wiki +0 -0
  6. package/bin/rg +0 -0
  7. package/bin/secret-exec +0 -0
  8. package/manifest.json +12 -0
  9. package/package.json +33 -4
  10. package/plugins/agent-secrets/.cteno-plugin/plugin.json +133 -0
  11. package/plugins/agent-secrets/bin/linux-x64/fnox +4 -0
  12. package/plugins/agent-secrets/bin/linux-x64/secret-exec +0 -0
  13. package/plugins/agent-secrets/skills/secret/SKILL.md +201 -0
  14. package/plugins/cteno.browser/.cteno-plugin/plugin.json +65 -0
  15. package/plugins/cteno.browser/skills/browser/SKILL.md +28 -0
  16. package/plugins/cteno.inbox/.cteno-plugin/plugin.json +132 -0
  17. package/plugins/cteno.inbox/bin/all/cteno-connector-credential +31 -0
  18. package/plugins/cteno.inbox/bin/all/cteno-telegram-connector +33 -0
  19. package/plugins/cteno.inbox/bin/linux-x64/cteno-inbox +0 -0
  20. package/plugins/cteno.inbox/skills/cteno-inbox/SKILL.md +374 -0
  21. package/plugins/cteno.inbox/tools/inbox_focus/TOOL.md +44 -0
  22. package/plugins/cteno.memory/.cteno-plugin/plugin.json +176 -0
  23. package/plugins/cteno.memory/agents/llm-wiki/AGENT.md +96 -0
  24. package/plugins/cteno.memory/bin/linux-x64/cteno-wiki +0 -0
  25. package/plugins/cteno.memory/skills/codebase-wiki/SKILL.md +52 -0
  26. package/plugins/cteno.memory/skills/cteno.memory.native/SKILL.md +110 -0
  27. package/plugins/cteno.memory/tools/memory/TOOL.md +492 -0
  28. package/plugins/cteno.memory/ui/index.html +822 -0
  29. package/plugins/cteno.models/.cteno-plugin/plugin.json +191 -0
  30. package/plugins/cteno.websearch/.cteno-plugin/plugin.json +45 -0
  31. package/plugins/jev/.cteno-plugin/plugin.json +309 -0
  32. package/plugins/jev/skills/jev-browser/SKILL.md +66 -0
  33. package/plugins/jev/skills/jev-browser/jev_browser.py +335 -0
  34. package/skills/agent-create/SKILL.md +86 -0
  35. package/skills/cteno-host-cli/SKILL.md +256 -0
  36. package/skills/docx/LICENSE +23 -0
  37. package/skills/docx/NOTICE.md +8 -0
  38. package/skills/docx/SKILL.md +69 -0
  39. package/skills/docx/references/cjk_typography.md +357 -0
  40. package/skills/docx/references/design_principles.md +819 -0
  41. package/skills/docx/references/revisions-and-comments.md +88 -0
  42. package/skills/docx/references/track_changes_guide.md +200 -0
  43. package/skills/docx/references/typography_guide.md +294 -0
  44. package/skills/docx/scripts/cjk_fonts.py +244 -0
  45. package/skills/docx/scripts/docx_comments.py +289 -0
  46. package/skills/docx/scripts/docx_common.py +92 -0
  47. package/skills/docx/scripts/docx_create.py +259 -0
  48. package/skills/docx/scripts/docx_edit.py +250 -0
  49. package/skills/docx/scripts/docx_read.py +149 -0
  50. package/skills/docx/scripts/docx_revisions.py +146 -0
  51. package/skills/docx/scripts/docx_template.py +70 -0
  52. package/skills/docx/scripts/docx_validate.py +156 -0
  53. package/skills/docx/scripts/render.py +250 -0
  54. package/skills/docx/tests/test_docx_skill.py +525 -0
  55. package/skills/home-devices/SKILL.md +121 -0
  56. package/skills/mcp/SKILL.md +72 -0
  57. package/skills/mcp/scripts/mcp_setup.py +439 -0
  58. package/skills/pdf/LICENSE +23 -0
  59. package/skills/pdf/NOTICE.md +8 -0
  60. package/skills/pdf/SKILL.md +63 -0
  61. package/skills/pdf/references/design-tokens.md +381 -0
  62. package/skills/pdf/references/forms.md +99 -0
  63. package/skills/pdf/references/nano-pdf-editing.md +40 -0
  64. package/skills/pdf/references/ocr-extraction.md +165 -0
  65. package/skills/pdf/scripts/_raster.py +76 -0
  66. package/skills/pdf/scripts/extract_marker.py +88 -0
  67. package/skills/pdf/scripts/extract_pymupdf.py +101 -0
  68. package/skills/pdf/scripts/pdf_create.py +191 -0
  69. package/skills/pdf/scripts/pdf_fill_form.py +97 -0
  70. package/skills/pdf/scripts/pdf_form_layout.py +168 -0
  71. package/skills/pdf/scripts/pdf_make_form.py +145 -0
  72. package/skills/pdf/scripts/pdf_merge.py +50 -0
  73. package/skills/pdf/scripts/pdf_meta.py +115 -0
  74. package/skills/pdf/scripts/pdf_page_image.py +99 -0
  75. package/skills/pdf/scripts/pdf_read.py +153 -0
  76. package/skills/pdf/scripts/pdf_secure.py +71 -0
  77. package/skills/pdf/scripts/pdf_split.py +84 -0
  78. package/skills/pdf/scripts/pdf_stamp.py +143 -0
  79. package/skills/pdf/scripts/pdf_watermark.py +51 -0
  80. package/skills/pdf/scripts/render.py +250 -0
  81. package/skills/pdf/tests/test_pdf_skill.py +415 -0
  82. package/skills/pptx/LICENSE +23 -0
  83. package/skills/pptx/NOTICE.md +8 -0
  84. package/skills/pptx/SKILL.md +62 -0
  85. package/skills/pptx/references/design-system.md +392 -0
  86. package/skills/pptx/references/pptxgenjs.md +420 -0
  87. package/skills/pptx/references/slide-types.md +413 -0
  88. package/skills/pptx/scripts/cjk_fonts.py +244 -0
  89. package/skills/pptx/scripts/pptx_create.py +240 -0
  90. package/skills/pptx/scripts/pptx_edit.py +436 -0
  91. package/skills/pptx/scripts/pptx_from_template.py +88 -0
  92. package/skills/pptx/scripts/pptx_read.py +131 -0
  93. package/skills/pptx/scripts/pptx_render.py +96 -0
  94. package/skills/pptx/scripts/render.py +250 -0
  95. package/skills/pptx/tests/test_powerpoint_skill.py +477 -0
  96. package/skills/skill-create/SKILL.md +114 -0
  97. package/skills/video-generation/SKILL.md +27 -0
  98. package/skills/xlsx/LICENSE +23 -0
  99. package/skills/xlsx/NOTICE.md +8 -0
  100. package/skills/xlsx/SKILL.md +63 -0
  101. package/skills/xlsx/references/format.md +71 -0
  102. package/skills/xlsx/references/restructuring.md +71 -0
  103. package/skills/xlsx/scripts/csv_to_xlsx.py +110 -0
  104. package/skills/xlsx/scripts/formula_check.py +428 -0
  105. package/skills/xlsx/scripts/render.py +250 -0
  106. package/skills/xlsx/scripts/xlsx_create.py +265 -0
  107. package/skills/xlsx/scripts/xlsx_edit.py +269 -0
  108. package/skills/xlsx/scripts/xlsx_read.py +166 -0
  109. package/skills/xlsx/scripts/xlsx_recalc.py +119 -0
  110. package/skills/xlsx/scripts/xlsx_restructure.py +343 -0
  111. package/skills/xlsx/scripts/xlsx_to_csv.py +75 -0
  112. package/skills/xlsx/tests/test_xlsx_skill.py +544 -0
  113. package/tools/create_goal/TOOL.md +36 -0
  114. package/tools/image_generation/TOOL.md +81 -0
  115. package/tools/skill/TOOL.md +117 -0
  116. package/tools/update_profile_notes/TOOL.md +39 -0
@@ -0,0 +1,176 @@
1
+ {
2
+ "schemaVersion": 2,
3
+ "id": "cteno.memory",
4
+ "version": "0.3.1",
5
+ "title": "Cteno Wiki Memory",
6
+ "icon": "library-outline",
7
+ "color": "#8E7CFF",
8
+ "developer": "Cteno",
9
+ "category": "记忆",
10
+ "featured": true,
11
+ "origin": "builtin",
12
+ "description": "An OKF knowledge wiki that compounds over time — fast daily logs, index-first topic recall, and slow dream consolidation into durable interlinked pages. Self-contained CRUD via the bundled cteno-wiki CLI; LLM consolidation via the host's generic subagent interface.",
13
+ "defaultEnabled": true,
14
+ "surfaces": {
15
+ "prompt": {
16
+ "fragments": [
17
+ "skills/cteno.memory.native/SKILL.md"
18
+ ]
19
+ },
20
+ "rpc": {
21
+ "handler": {
22
+ "type": "command",
23
+ "command": "cteno-wiki",
24
+ "args": [
25
+ "rpc"
26
+ ],
27
+ "timeout_secs": 120
28
+ }
29
+ },
30
+ "tools": [
31
+ {
32
+ "id": "memory",
33
+ "definition": "tools/memory/TOOL.md"
34
+ }
35
+ ],
36
+ "agents": [
37
+ {
38
+ "id": "llm-wiki",
39
+ "definition": "agents/llm-wiki/AGENT.md"
40
+ }
41
+ ],
42
+ "hooks": [
43
+ {
44
+ "event": "UserPromptSubmit",
45
+ "handler": {
46
+ "type": "command",
47
+ "command": "cteno-wiki",
48
+ "args": [
49
+ "auto-recall-hook"
50
+ ],
51
+ "timeoutSecs": 2
52
+ }
53
+ },
54
+ {
55
+ "event": "UserPromptSubmit",
56
+ "handler": {
57
+ "type": "command",
58
+ "command": "cteno-wiki",
59
+ "args": [
60
+ "capture",
61
+ "--event",
62
+ "UserPromptSubmit"
63
+ ],
64
+ "timeoutSecs": 5
65
+ }
66
+ },
67
+ {
68
+ "event": "Stop",
69
+ "handler": {
70
+ "type": "command",
71
+ "command": "cteno-wiki capture --event Stop"
72
+ }
73
+ },
74
+ {
75
+ "event": "SubagentStop",
76
+ "handler": {
77
+ "type": "command",
78
+ "command": "cteno-wiki capture --event SubagentStop"
79
+ }
80
+ },
81
+ {
82
+ "event": "PostCompact",
83
+ "handler": {
84
+ "type": "command",
85
+ "command": "cteno-wiki capture --event PostCompact"
86
+ }
87
+ }
88
+ ],
89
+ "pages": [
90
+ {
91
+ "id": "memory",
92
+ "title": "记忆",
93
+ "entry": "ui/index.html",
94
+ "slot": "chat-header-memory",
95
+ "rpc": [
96
+ "list",
97
+ "read",
98
+ "sync_docs",
99
+ "dream_status",
100
+ "dream_mark_seen",
101
+ "dream_dismiss",
102
+ "capabilities",
103
+ "dream_proposals",
104
+ "dream_asks",
105
+ "dream_proposal_decide",
106
+ "dream_handoffs",
107
+ "dream_changes",
108
+ "dream_undo",
109
+ "activity",
110
+ "topics",
111
+ "search"
112
+ ],
113
+ "desktop": {
114
+ "container": "cef-pane"
115
+ },
116
+ "mobile": {
117
+ "container": "rn-webview"
118
+ }
119
+ }
120
+ ],
121
+ "messageActions": [
122
+ {
123
+ "id": "collect",
124
+ "title": "记住",
125
+ "icon": "mci:brain",
126
+ "rpc": "collect"
127
+ }
128
+ ],
129
+ "externalCli": {
130
+ "name": "Cteno Wiki CLI",
131
+ "description": "Self-contained OKF knowledge-wiki memory CLI. Portable CRUD over a Cteno memory bundle, usable by any agent via the shell.",
132
+ "binary": "cteno-wiki",
133
+ "statusCommand": "cteno-wiki schema"
134
+ },
135
+ "recommendations": [
136
+ {
137
+ "id": "cteno-memory-dream",
138
+ "title": "整理记忆(Dream)",
139
+ "description": "把最近的 daily logs 归纳合并进 OKF 知识 wiki,并维护主题索引。",
140
+ "icon": "sparkles-outline",
141
+ "color": "#8E7CFF",
142
+ "prompt": "请整理并归纳我的项目记忆:调用 memory 工具的 dream 动作({\"action\":\"dream\",\"scope\":\"private\"}),把最近的 daily logs 与 raw project docs 合并进 OKF 知识 wiki 的主题页并维护 index.md。当前项目目录由 runtime 自动注入,不要传 project_dir。完成后简要说明更新或新建了哪些主题页。"
143
+ },
144
+ {
145
+ "id": "cteno-memory-recall",
146
+ "title": "回忆某个主题",
147
+ "description": "按主题从 OKF wiki 检索相关页面与要点。",
148
+ "icon": "search-outline",
149
+ "color": "#8E7CFF",
150
+ "prompt": "我想回忆一个主题。请用 memory 工具的 recall 动作,按我给的主题词从 OKF 知识 wiki 里检索相关主题页(索引优先、整页返回),汇总要点并列出页面间的关联。"
151
+ },
152
+ {
153
+ "id": "cteno-memory-index",
154
+ "title": "查看记忆索引",
155
+ "description": "列出 wiki 的主题索引,了解已沉淀的知识。",
156
+ "icon": "list-outline",
157
+ "color": "#8E7CFF",
158
+ "prompt": "请读取 OKF 知识 wiki 的 index.md,按主题分类列出我已经沉淀的知识页面,并指出哪些主题内容较多、哪些还比较单薄。"
159
+ }
160
+ ],
161
+ "suggestedPrompts": [
162
+ {
163
+ "id": "recall",
164
+ "title": "回忆一下我们之前聊过的事",
165
+ "prompt": "帮我回忆一下我们之前聊过的事:先问我想回忆哪件事,再从记忆里找出相关的要点,用几句话告诉我。"
166
+ }
167
+ ]
168
+ },
169
+ "permissions": {
170
+ "externalProcess": [
171
+ "cteno-wiki"
172
+ ],
173
+ "network": false,
174
+ "filesystem": []
175
+ }
176
+ }
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: "LLM Wiki Librarian"
3
+ description: "Consolidates raw memory logs into a persistent, interlinked OKF knowledge wiki."
4
+ version: "1.2.0"
5
+ type: "autonomous"
6
+ # Fire-and-forget dream librarian: nobody is watching to answer a permission
7
+ # card, so run non-interactively. (R4 bubbles INTERACTIVE subagents' permission
8
+ # requests to the parent UI; this agent opts out by pinning bypass.)
9
+ permission_mode: "bypass_permissions"
10
+ # A dream CONSUMES raw memory; it must never PRODUCE it. Plugin lifecycle
11
+ # hooks (the wiki's own capture on UserPromptSubmit/Stop) are not projected
12
+ # into this agent's sessions, otherwise each dream's ~3 KB prompt and closing
13
+ # summary land in the daily log and bump the dirty-gate that spawned it.
14
+ hooks_enabled: false
15
+ expose_as_tool: false
16
+ temperature: 0.2
17
+ max_tokens: 8192
18
+ timeout_seconds: 600
19
+ tools:
20
+ - memory
21
+ - read
22
+ - grep
23
+ - glob
24
+ ---
25
+
26
+ # LLM Wiki Librarian
27
+
28
+ You maintain a persistent **knowledge wiki** in the project's memory that
29
+ *compounds* over time. Raw daily logs are your source material; the wiki is the
30
+ compiled, durable result. You read the new raw material, then update the wiki so
31
+ future sessions can recall it.
32
+
33
+ The wiki is stored in **Open Knowledge Format (OKF)**: a directory of markdown
34
+ files, each with YAML frontmatter and a markdown body, cross-linked with
35
+ standard relative markdown links. The consolidation mechanics (merge loop, OKF
36
+ page shape, safety rules) arrive with each task — follow them exactly; this
37
+ file only adds your tool bindings and durability policy.
38
+
39
+ ## Tool bindings
40
+
41
+ You work through the `memory` tool:
42
+
43
+ - Recall (index-first): `memory({action:"recall", query:"<topic>"})` —
44
+ returns whole pages within a character budget; when nothing matches, the topic
45
+ `index.md` comes back as a navigation map. Oversized bodies are represented by
46
+ their path instead of being cut. **A single query can miss a relevant page**
47
+ when its title/description use different wording (CJK vs English keywords,
48
+ a different technical term for the same incident). Before deciding no page
49
+ fits and creating a new one, try at least one rephrased query — swap
50
+ CJK/English keywords, try the subsystem or file name — and skim the returned
51
+ `index.md` topic map if still inconclusive.
52
+ - For exact strings or oversized pages, reuse generic `grep` on the OKF path,
53
+ then generic `read` with `offset`/`limit`. Private OKF is under
54
+ `<project>/.cteno/memory/`; global OKF defaults to `~/.cteno/memory/`.
55
+ Prefer durable topic directories and `raw/docs/`; do not grep `logs/` by
56
+ default. Never edit managed `raw/docs/` pages — update durable topic pages.
57
+ - Read a complete page: `memory({action:"read", file_path:"<path>"})`.
58
+ - Merge/write a page: `memory({action:"overwrite", file_path:"<path>",
59
+ content:"<full OKF page>", sources:["log: <log path>"]})` — unions `sources[]`
60
+ provenance and maintains the page's `index.md` entry automatically.
61
+ - Remove an obsolete page: `memory({action:"delete", file_path:"<path>"})`.
62
+
63
+ - Finish every pass with exactly one outcome report:
64
+ `memory({action:"dream_report", status:"ok", summary:"…", pages:["<paths written/deleted>"], proposals:[{kind, evidence, action, confidence, needs_user, pages}]})`,
65
+ or — when you could not complete the pass (tool errors, unreadable material,
66
+ conflicting pages you could not safely merge) —
67
+ `memory({action:"dream_report", status:"failed", error:"<what went wrong>", summary:"<what you did get done>"})`.
68
+ Do not retry a failed pass yourself; the user decides. If the user later
69
+ continues this session and the pass succeeds, report `ok` again.
70
+
71
+ ## Digest it yourself (proposals)
72
+
73
+ Every pass also reports **proposals** — the §3.6 table in the task's
74
+ mechanics. Default to deciding yourself: clarify (look it up, else mark
75
+ 未证实), conflict (newest direct evidence wins, old claim kept as a trace),
76
+ promote / guard (write the rule), expire (mark stale facts), privacy (remove
77
+ the secret from the page), skillify (write a `workflow/` page) — you do these in
78
+ this pass and report them with `needs_user:false`. followup / stale are handed
79
+ to the main conversation as-is. Only `schedule`, and a `conflict` about money,
80
+ an external commitment or direction whose evidence is equally strong, get
81
+ `needs_user:true` (write their `action`/`evidence` in plain user words — Jelly
82
+ says them in chat verbatim; see the rules); the host shows the user at most one such ask per day and
83
+ remembers every "no" on `knowledge/declined-dream-proposals.md` — never raise
84
+ those again. Every page you write or delete is journaled and can be undone by
85
+ the user, so act; do not ask.
86
+
87
+ ## What to consolidate
88
+
89
+ - User preferences and feedback that should affect future work.
90
+ - Project decisions, deadlines, incidents, and their rationale when not derivable
91
+ from code.
92
+ - References to external systems: trackers, dashboards, channels, PRs.
93
+ - Repeated gotchas, validated approaches, and cross-session coordination rules.
94
+
95
+ Drop anything derivable from the repo or git history, transient task state, and
96
+ ephemera.
@@ -0,0 +1,52 @@
1
+ ---
2
+ description: OKF codebase memory — recall-before-explore, save-after. Use BEFORE fanning out agents to explore an unfamiliar subsystem (recall accumulated knowledge first; if it answers, skip the exploration), and AFTER discovering durable architecture facts (save them so they compound across sessions). Scoped global + per-project like skills. Backed by the bundled cteno-wiki CLI.
3
+ ---
4
+
5
+ # Cteno Wiki — codebase memory (recall-before-explore, save-after)
6
+
7
+ A persistent OKF knowledge wiki. **Re-exploring the same subsystem every task is a tax — recall first, and feed back what you learn so it compounds.**
8
+
9
+ - **CLI:** `cteno-wiki` (bundled in this plugin's `bin/`, on PATH while enabled).
10
+ - **One OKF store, shared with the Cteno runtime** (`<dir>/.cteno/memory`). Two scopes (like skills):
11
+ - **project** = `--project-dir "${CLAUDE_PROJECT_DIR:-$PWD}"` → `$CLAUDE_PROJECT_DIR/.cteno/memory` — THIS codebase's maps (file:line, gotchas, subsystem designs).
12
+ - **global** = `--scope global` → `$HOME/.cteno/memory` — cross-project (working habits, general patterns).
13
+ - **Project docs are raw Wiki data:** `docs/**/*.md(x)` is mirrored byte-for-byte
14
+ to `raw/docs/` with OKF provenance. Run `cteno-wiki sync-docs` for immediate
15
+ catch-up; Cteno runtime also watches and reconciles active projects.
16
+
17
+ ## RECALL — before exploring (check BOTH scopes)
18
+ ```bash
19
+ cteno-wiki sync-docs --project-dir "${CLAUDE_PROJECT_DIR:-$PWD}"
20
+ cteno-wiki recall --project-dir "${CLAUDE_PROJECT_DIR:-$PWD}" --query "$ARGUMENTS" --text
21
+ cteno-wiki recall --scope global --query "$ARGUMENTS" --text
22
+ ```
23
+ Index-first: topic index → whole pages → link hops. No match returns the topic
24
+ index as a navigation map — pick a page and `read` it. If it answers, **skip the agent fan-out**.
25
+
26
+ **Fan-out raw capture is automatic.** `SubagentStop` and Workflow-result hooks
27
+ write the complete Explorer/worker findings to the daily raw log, so do not
28
+ duplicate that payload manually. After using the findings, write only the
29
+ durable merged conclusion to a topic page when it adds lasting value.
30
+
31
+ ## SAVE — after durable findings (route by scope)
32
+ - **Codebase facts** (file:line, gotchas, this-project subsystem design) → **project** scope.
33
+ - **Cross-project** (working habits, general patterns) → **global** scope.
34
+ ```bash
35
+ # project scope below; for cross-project swap `--project-dir "${CLAUDE_PROJECT_DIR:-$PWD}"` → `--scope global`
36
+ cteno-wiki overwrite --project-dir "${CLAUDE_PROJECT_DIR:-$PWD}" --file knowledge/<topic>.md --source "<where you learned it>" --content - <<'PAGE'
37
+ ---
38
+ type: reference
39
+ title: <title>
40
+ tags: [<tag>, <tag>]
41
+ ---
42
+ <durable facts — concrete file:line, the gotcha + why, the decision + judgement>
43
+ Related: [Adjacent page](other-topic.md)
44
+ PAGE
45
+ ```
46
+ `overwrite` unions `sources[]`, stamps the timestamp, and upserts the page's `index.md` entry — no separate index step.
47
+
48
+ ## Browse / prune
49
+ - `cteno-wiki list --project-dir "${CLAUDE_PROJECT_DIR:-$PWD}"` · `cteno-wiki read --project-dir "${CLAUDE_PROJECT_DIR:-$PWD}" --file <path>` (add `--scope global` for cross-project)
50
+ - `cteno-wiki delete --project-dir "${CLAUDE_PROJECT_DIR:-$PWD}" --file <path>` removes a stale page + its index entry.
51
+
52
+ The point: stop re-discovering. Recall (both scopes) → explore only what's missing → save back to the right scope.
@@ -0,0 +1,110 @@
1
+ # Cteno Memory Tool
2
+
3
+ Use Cteno's runtime-native `memory` tool for persistent project and global
4
+ memory. Do not call desktop sidecar CLIs directly.
5
+
6
+ The runtime injects the active project root; never pass `project_dir` yourself.
7
+ Project memory maps to `.cteno/memory/`. Pass `scope: "global"` only when you
8
+ explicitly want global memory.
9
+
10
+ To look into ANOTHER project's memory (e.g. from the main conversation, using a
11
+ path listed in `<project_directory>`), pass `project: "<absolute project root>"`
12
+ to `recall`, `read` or `list`. This is read-only and reads only that project's
13
+ `.cteno/memory/`; a project without memory returns an empty result. Page
14
+ writes (`save`/`overwrite`/`delete`/`dream`) reject `project`.
15
+
16
+ A project decision made in the main conversation is forwarded with
17
+ `log` + `project`: the entry is appended (only appended) to that project's daily
18
+ log with an origin note, a marked copy stays in your own log, and the project's
19
+ dream consolidates it. Only known projects are accepted; pages are never
20
+ touched. Cross-project facts (preferences, machines, brand wording) stay global.
21
+
22
+ Memory is an **OKF (Open Knowledge Format) wiki**: each page is markdown with a
23
+ YAML frontmatter (`type` required; optional `title`/`description`/`sources`/
24
+ `tags`/`timestamp`), the path is the page identity, and pages cross-link with
25
+ relative markdown links. Files under `docs/` are continuously mirrored,
26
+ byte-for-byte, into `raw/docs/` as `type: raw` Wiki input. A topic-organized
27
+ `index.md` is the entry point; daily
28
+ `logs/YYYY/MM/YYYY-MM-DD.md` hold fast append-only signals; slow consolidation
29
+ (`dream`) merges logs into durable topic pages and maintains `index.md`.
30
+
31
+ The runtime automatically captures complete user prompts and completed
32
+ Explorer/worker/Subagent findings into the project daily raw log. Do not save
33
+ the same material again manually. Use `save`/`overwrite` only for deliberate
34
+ durable topic edits; `dream` promotes useful raw material into topic pages.
35
+
36
+ Command schema:
37
+
38
+ ```json
39
+ {
40
+ "list": {
41
+ "input": { "action": "list", "scope": "private" },
42
+ "output": { "success": "boolean", "data": ["[private] file.md", "[global] file.md"] }
43
+ },
44
+ "recall": {
45
+ "input": { "action": "recall", "query": "<string>", "limit": 10, "max_chars": 32000, "project": "<optional absolute project root, read-only>" },
46
+ "output": { "success": "boolean", "data": [{ "file_path": "string", "content": "whole page or oversized-page descriptor", "score": "real index overlap with link decay" }] },
47
+ "description": "Wiki recall across BOTH scopes: index-first whole pages under a Unicode-character budget, not keyword chunks. Oversized bodies are represented by path; use existing grep + ranged read."
48
+ },
49
+ "read": {
50
+ "input": { "action": "read", "file_path": "<file_path>", "scope": "private" },
51
+ "output": { "success": "boolean", "data": "markdown or null" }
52
+ },
53
+ "delete": {
54
+ "input": { "action": "delete", "file_path": "<file_path>", "scope": "private" },
55
+ "output": { "success": "boolean" },
56
+ "description": "Delete a memory page and remove its index.md entry."
57
+ },
58
+ "save": {
59
+ "input": { "action": "save", "file_path": "knowledge/<topic>.md", "type": "<required OKF type>", "content": "<markdown>", "scope": "private" },
60
+ "output": { "success": "boolean" },
61
+ "description": "Append a durable fact to one indexed OKF topic page. Exact retries are deduplicated; legacy MEMORY.md is redirected to knowledge/general.md."
62
+ },
63
+ "overwrite": {
64
+ "input": { "action": "overwrite", "file_path": "<file_path>", "content": "<OKF markdown>", "sources": ["log: logs/2026/06/..."], "scope": "private" },
65
+ "output": { "success": "boolean" },
66
+ "description": "Read-modify-write a page with newly authored OKF content, unioning `sources[]` provenance with the existing page and upserting its index.md entry. The merge primitive for wiki consolidation."
67
+ },
68
+ "log": {
69
+ "input": { "action": "log", "content": "<entry>", "scope": "private" },
70
+ "output": { "success": "boolean" },
71
+ "description": "Append a timestamped fast-memory entry to today's daily log. Use for fresh signals, decisions, external events, and handoff facts not yet ready to become durable topic memory."
72
+ },
73
+ "migrate": {
74
+ "input": { "action": "migrate", "scope": "private" },
75
+ "output": { "success": "boolean" },
76
+ "description": "One-shot, idempotent migration of the current scope to OKF: rewrite legacy type+date frontmatter, generate index.md, seed log.md."
77
+ },
78
+ "sync_docs": {
79
+ "input": { "action": "sync_docs", "scope": "private" },
80
+ "output": { "success": "boolean" },
81
+ "description": "Immediately reconcile docs/**/*.md(x) into raw/docs/. Normally automatic via watcher and read-time catch-up."
82
+ },
83
+ "reindex": {
84
+ "input": { "action": "reindex", "scope": "private" },
85
+ "output": { "success": "boolean" },
86
+ "description": "Structurally repair index.md against the pages on disk: drop duplicate entries and entries for deleted pages, add entries for un-indexed pages. Preserves surviving entries' authored text and topic headings, so it is safe to run anytime; idempotent. Run it after merging memory between git branches/worktrees (index.md is union-merged). `refresh_from_pages: true` re-derives entry text from page frontmatter — lossy, since consolidation writes richer text into the index than pages carry."
87
+ },
88
+ "dream": {
89
+ "input": { "action": "dream", "scope": "private" },
90
+ "output": { "success": "boolean" },
91
+ "description": "Slow-memory consolidation: spawns the `llm-wiki` librarian subagent in the background to read daily logs and merge durable facts into the OKF wiki (`overwrite` + `index.md`). Fire-and-forget."
92
+ }
93
+ }
94
+ ```
95
+
96
+ When to use which: `recall` is THE topic recall — index-first Wiki navigation
97
+ returning whole linked pages within `max_chars` (there is no keyword-chunk
98
+ search). If the result is the index map, pick a page and `read` it. If a page is
99
+ oversized or you need an exact string/identifier/regex, reuse the generic tools:
100
+
101
+ 1. Run `memory(recall)` first so raw docs are synchronized and candidate pages
102
+ are known.
103
+ 2. `grep` private OKF under `.cteno/memory/` or global OKF under
104
+ `~/.cteno/memory/`; prefer `knowledge/`, `project/`, `workflow/`,
105
+ `incidents/`, and `raw/docs/`, not noisy `logs/`.
106
+ 3. Use generic `read(offset, limit)` around the returned lines.
107
+
108
+ Use `overwrite` (not `save`) when refining an existing page so `sources[]` provenance
109
+ is preserved; `log` for transient signals; `dream` to consolidate logs into the
110
+ durable wiki.