linger-skill 0.2.2

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 (155) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/LICENSE +21 -0
  3. package/PRIVACY.md +31 -0
  4. package/README.md +300 -0
  5. package/README.zh-CN.md +300 -0
  6. package/SECURITY.md +25 -0
  7. package/dist/adapter-evidence.d.ts +31 -0
  8. package/dist/adapter-evidence.js +166 -0
  9. package/dist/adapter-evidence.js.map +1 -0
  10. package/dist/adapters.d.ts +20 -0
  11. package/dist/adapters.js +105 -0
  12. package/dist/adapters.js.map +1 -0
  13. package/dist/capture.d.ts +16 -0
  14. package/dist/capture.js +108 -0
  15. package/dist/capture.js.map +1 -0
  16. package/dist/cli.d.ts +2 -0
  17. package/dist/cli.js +217 -0
  18. package/dist/cli.js.map +1 -0
  19. package/dist/control.d.ts +9 -0
  20. package/dist/control.js +38 -0
  21. package/dist/control.js.map +1 -0
  22. package/dist/decision-extraction.d.ts +4 -0
  23. package/dist/decision-extraction.js +63 -0
  24. package/dist/decision-extraction.js.map +1 -0
  25. package/dist/decisions.d.ts +60 -0
  26. package/dist/decisions.js +166 -0
  27. package/dist/decisions.js.map +1 -0
  28. package/dist/delete.d.ts +21 -0
  29. package/dist/delete.js +96 -0
  30. package/dist/delete.js.map +1 -0
  31. package/dist/doctor.d.ts +6 -0
  32. package/dist/doctor.js +208 -0
  33. package/dist/doctor.js.map +1 -0
  34. package/dist/enrichment.d.ts +82 -0
  35. package/dist/enrichment.js +359 -0
  36. package/dist/enrichment.js.map +1 -0
  37. package/dist/eval-adversarial.d.ts +2 -0
  38. package/dist/eval-adversarial.js +20 -0
  39. package/dist/eval-adversarial.js.map +1 -0
  40. package/dist/eval-cli.d.ts +2 -0
  41. package/dist/eval-cli.js +83 -0
  42. package/dist/eval-cli.js.map +1 -0
  43. package/dist/eval-generator.d.ts +41 -0
  44. package/dist/eval-generator.js +36 -0
  45. package/dist/eval-generator.js.map +1 -0
  46. package/dist/eval-heldout.d.ts +2 -0
  47. package/dist/eval-heldout.js +56 -0
  48. package/dist/eval-heldout.js.map +1 -0
  49. package/dist/eval-io.d.ts +6 -0
  50. package/dist/eval-io.js +15 -0
  51. package/dist/eval-io.js.map +1 -0
  52. package/dist/eval-runner.d.ts +8 -0
  53. package/dist/eval-runner.js +56 -0
  54. package/dist/eval-runner.js.map +1 -0
  55. package/dist/eval-scorer.d.ts +27 -0
  56. package/dist/eval-scorer.js +28 -0
  57. package/dist/eval-scorer.js.map +1 -0
  58. package/dist/hook-cli.d.ts +2 -0
  59. package/dist/hook-cli.js +28 -0
  60. package/dist/hook-cli.js.map +1 -0
  61. package/dist/hook-command.d.ts +9 -0
  62. package/dist/hook-command.js +31 -0
  63. package/dist/hook-command.js.map +1 -0
  64. package/dist/hook-handler.d.ts +24 -0
  65. package/dist/hook-handler.js +93 -0
  66. package/dist/hook-handler.js.map +1 -0
  67. package/dist/hook-installer.d.ts +4 -0
  68. package/dist/hook-installer.js +120 -0
  69. package/dist/hook-installer.js.map +1 -0
  70. package/dist/hook-ownership.d.ts +8 -0
  71. package/dist/hook-ownership.js +51 -0
  72. package/dist/hook-ownership.js.map +1 -0
  73. package/dist/install-consent.d.ts +4 -0
  74. package/dist/install-consent.js +20 -0
  75. package/dist/install-consent.js.map +1 -0
  76. package/dist/installer.d.ts +33 -0
  77. package/dist/installer.js +140 -0
  78. package/dist/installer.js.map +1 -0
  79. package/dist/io.d.ts +7 -0
  80. package/dist/io.js +86 -0
  81. package/dist/io.js.map +1 -0
  82. package/dist/memory-events.d.ts +31 -0
  83. package/dist/memory-events.js +109 -0
  84. package/dist/memory-events.js.map +1 -0
  85. package/dist/memory-intent.d.ts +1 -0
  86. package/dist/memory-intent.js +4 -0
  87. package/dist/memory-intent.js.map +1 -0
  88. package/dist/paths.d.ts +15 -0
  89. package/dist/paths.js +24 -0
  90. package/dist/paths.js.map +1 -0
  91. package/dist/pending.d.ts +21 -0
  92. package/dist/pending.js +76 -0
  93. package/dist/pending.js.map +1 -0
  94. package/dist/processed-markdown.d.ts +3 -0
  95. package/dist/processed-markdown.js +29 -0
  96. package/dist/processed-markdown.js.map +1 -0
  97. package/dist/processing-policy.d.ts +19 -0
  98. package/dist/processing-policy.js +79 -0
  99. package/dist/processing-policy.js.map +1 -0
  100. package/dist/processing.d.ts +4 -0
  101. package/dist/processing.js +143 -0
  102. package/dist/processing.js.map +1 -0
  103. package/dist/purge.d.ts +7 -0
  104. package/dist/purge.js +16 -0
  105. package/dist/purge.js.map +1 -0
  106. package/dist/recall-sampling.d.ts +53 -0
  107. package/dist/recall-sampling.js +201 -0
  108. package/dist/recall-sampling.js.map +1 -0
  109. package/dist/recall.d.ts +19 -0
  110. package/dist/recall.js +70 -0
  111. package/dist/recall.js.map +1 -0
  112. package/dist/record-paths.d.ts +18 -0
  113. package/dist/record-paths.js +38 -0
  114. package/dist/record-paths.js.map +1 -0
  115. package/dist/repair.d.ts +4 -0
  116. package/dist/repair.js +83 -0
  117. package/dist/repair.js.map +1 -0
  118. package/dist/runtime-identity.d.ts +1 -0
  119. package/dist/runtime-identity.js +31 -0
  120. package/dist/runtime-identity.js.map +1 -0
  121. package/dist/runtime-installer.d.ts +7 -0
  122. package/dist/runtime-installer.js +43 -0
  123. package/dist/runtime-installer.js.map +1 -0
  124. package/dist/schema-validation.d.ts +26 -0
  125. package/dist/schema-validation.js +222 -0
  126. package/dist/schema-validation.js.map +1 -0
  127. package/dist/search.d.ts +16 -0
  128. package/dist/search.js +192 -0
  129. package/dist/search.js.map +1 -0
  130. package/dist/sensitivity.d.ts +6 -0
  131. package/dist/sensitivity.js +27 -0
  132. package/dist/sensitivity.js.map +1 -0
  133. package/dist/tag-registry.d.ts +21 -0
  134. package/dist/tag-registry.js +70 -0
  135. package/dist/tag-registry.js.map +1 -0
  136. package/dist/term-graph.d.ts +18 -0
  137. package/dist/term-graph.js +63 -0
  138. package/dist/term-graph.js.map +1 -0
  139. package/dist/types.d.ts +68 -0
  140. package/dist/types.js +2 -0
  141. package/dist/types.js.map +1 -0
  142. package/dist/vault-candidates.d.ts +1 -0
  143. package/dist/vault-candidates.js +57 -0
  144. package/dist/vault-candidates.js.map +1 -0
  145. package/dist/vault.d.ts +28 -0
  146. package/dist/vault.js +158 -0
  147. package/dist/vault.js.map +1 -0
  148. package/dist/windows-command.d.ts +6 -0
  149. package/dist/windows-command.js +9 -0
  150. package/dist/windows-command.js.map +1 -0
  151. package/package.json +53 -0
  152. package/scripts/release-readiness.mjs +58 -0
  153. package/skills/linger/SKILL.md +56 -0
  154. package/skills/linger/agents/openai.yaml +4 -0
  155. package/skills/linger/references/protocol.md +84 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,31 @@
1
+ # Changelog
2
+
3
+ Notable user-visible changes to Linger are recorded here.
4
+
5
+ ## 0.2.2 — 2026-07-14
6
+
7
+ ### Added
8
+
9
+ - Added a Simplified Chinese README with bidirectional language navigation.
10
+
11
+ ### Changed
12
+
13
+ - Reframed Linger as a sidecar continuity layer for Claude Code, Codex, and future adapters.
14
+ - Preserved host-owned memory settings and files instead of replacing the host's persistence path.
15
+ - Clarified that duplicated host and Linger context represents one underlying event, not independent corroboration.
16
+ - Added an npm-compatible `linger-skill` executable so the documented `npx linger-skill install` command resolves directly.
17
+ - Published the first npm-distributed MVP with `npx linger-skill install` as the recommended installation path.
18
+ - Included the changelog, privacy policy, and security policy in the npm artifact.
19
+ - Identified Ari Shana as the MIT copyright holder.
20
+
21
+ ### Fixed
22
+
23
+ - Upgrades now restore the Claude Code auto-memory setting left by the earlier replacement-style installer before adopting the sidecar contract.
24
+ - Hook context now prevents duplicate Linger writes without suppressing host-owned memory behavior.
25
+
26
+ ## 0.2.1 — 2026-07-13
27
+
28
+ ### Added
29
+
30
+ - Optional host-model enrichment using the model already active in Claude Code or Codex.
31
+ - Verified lifecycle capture, deterministic processing, bounded enrichment overlays, and sourced recall for both MVP adapters.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ari Shana
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/PRIVACY.md ADDED
@@ -0,0 +1,31 @@
1
+ # Privacy
2
+
3
+ Linger stores visible agent conversations and derived project memory in local files under `~/.linger/vault` by default.
4
+
5
+ ## Data stored locally
6
+
7
+ The Vault can contain visible user and assistant messages, project display names and absolute root paths, processed summaries, tags, decision trails, queue state, and integrity metadata. Remote repository URLs may influence a hashed project ID but are not stored in the project registry.
8
+
9
+ Recall-quality sampling is off by default. When explicitly enabled for a query, the query, returned evidence references, and later feedback remain local in the Vault.
10
+
11
+ Linger installs no telemetry, analytics, cloud sync, embeddings, or background daemon.
12
+
13
+ ## Data sent to the active model provider
14
+
15
+ Local-first does not mean data never leaves the device. Recalled evidence and bounded host-enrichment batches enter the current Claude Code or Codex context and may be sent to the model provider configured in that host.
16
+
17
+ Linger does not select another provider, request a separate API key, or send evidence to an additional Linger service. If host enrichment does not run, deterministic local processing and recall continue normally.
18
+
19
+ ## Sensitive content
20
+
21
+ High-confidence credential patterns are redacted before raw persistence, marked secret, and excluded from normal processing, enrichment, and recall. Contact-like sensitive records are also excluded from ordinary recall by default.
22
+
23
+ Detection is not complete. Unknown secret formats may be missed, and unrecognized content explicitly marked secret may remain in raw storage. Do not use this experimental build for data that requires audited compliance controls.
24
+
25
+ ## Host memory and removal
26
+
27
+ Linger operates as a sidecar and does not disable, replace, rewrite, or delete memory owned by Claude Code, Codex, or future host adapters. A host may independently store some of the same visible content in its own location and under its own privacy boundary. Linger recall sends only a bounded relevant evidence package into the active host context; duplicated host and Linger context should be treated as one underlying event, not independent corroboration.
28
+
29
+ Uninstall removes Linger-managed host integration but preserves the Vault. A full `purge` is separate and requires both `--yes` and the exact `PURGE` confirmation phrase.
30
+
31
+ See [SECURITY.md](SECURITY.md) for the security boundary and private vulnerability-reporting channel.
package/README.md ADDED
@@ -0,0 +1,300 @@
1
+ # Linger
2
+
3
+ [![npm version](https://img.shields.io/npm/v/linger-skill.svg)](https://www.npmjs.com/package/linger-skill)
4
+ [![CI](https://github.com/arishana1969/linger-skill/actions/workflows/ci.yml/badge.svg)](https://github.com/arishana1969/linger-skill/actions/workflows/ci.yml)
5
+
6
+ **English** | [简体中文](README.zh-CN.md)
7
+
8
+ A file-native conversation archive and decision trail for coding agents.
9
+
10
+ > 念念不忘,必有回响。
11
+ >
12
+ > What lingers in mind will find its echo.
13
+
14
+ ---
15
+
16
+ ## Status
17
+
18
+ Linger v0.2.2 is an experimental MVP for Claude Code and Codex, distributed as the public [`linger-skill`](https://www.npmjs.com/package/linger-skill) package. Linger does not promise perfect archival coverage or production-grade support.
19
+
20
+ ## Origin
21
+
22
+ This project started from a post by [Evis Drenova](https://x.com/evisdrenova):
23
+
24
+ > My ideal AI interface is a single never-ending chat thread. I don't want to think about sessions, context windows, worktrees, MCP servers, or anything else. The harness should automate everything transparently.
25
+
26
+ We cannot actually provide a never-ending thread. Context windows are real, sessions end, and machines restart. But we can build the next best thing: a layer that preserves what was said and decided so that, when you return, the continuity is still there.
27
+
28
+ ## What it does
29
+
30
+ Linger saves visible conversations with coding agents—the discussions, explicit notes, decisions, and visible rationale—as local files you own.
31
+
32
+ It is not a general AI memory system. It is a sidecar continuity layer. Linger observes supported lifecycle events without disabling, replacing, or writing into an agent's own memory system. When an agent loses older context, Linger can retain the record. When you ask why a decision was made three weeks ago, Linger can surface the evidence and its evolution.
33
+
34
+ ### What you get
35
+
36
+ - Conversation capture through verified lifecycle hooks, with explicit CLI fallback when a host cannot automate capture.
37
+ - Optional host-model organization: the current Claude or Codex model can improve summaries, types, tags, and retrieval phrases without a separate provider or API key.
38
+ - A decision trail that preserves how conclusions evolved, not only the final answer.
39
+ - A note-taking interface for remember, opt out, forget, correct, inspect, and delete workflows.
40
+ - Local-first storage using versioned JSON and human-readable Markdown.
41
+ - No database, user-managed daemon, telemetry, embedding API, or cloud sync.
42
+ - Project-scoped recall that returns sources, distinguishes uncertainty, and abstains when no reliable memory is found.
43
+ - Pending recovery, integrity checks, bounded search, and confirmed destructive controls.
44
+
45
+ ## Who it is for
46
+
47
+ Linger is for developers who use Claude Code or Codex on long-running projects.
48
+
49
+ If you have restarted a conversation and wished the agent remembered what you discussed last week—or why a design decision changed—Linger is for you.
50
+
51
+ ## Install
52
+
53
+ Requires Node.js 20 or later. The recommended installation is one command:
54
+
55
+ npx linger-skill install
56
+
57
+ Interactive installation displays the local/cloud privacy boundary and requires an exact YES before writing. Non-interactive callers must pass --yes:
58
+
59
+ npx linger-skill install --yes
60
+
61
+ Install only one adapter when needed:
62
+
63
+ npx linger-skill install --adapters claude-code
64
+ npx linger-skill install --adapters codex
65
+
66
+ For a persistent global CLI instead:
67
+
68
+ npm install --global linger-skill
69
+ linger install
70
+
71
+ To install from source for development:
72
+
73
+ git clone https://github.com/arishana1969/linger-skill.git
74
+ cd linger-skill
75
+ pnpm install --frozen-lockfile
76
+ pnpm build
77
+ node dist/cli.js install
78
+
79
+ ## How it works
80
+
81
+ Linger combines a Skill, lifecycle hooks, a helper CLI, an event-driven processor, and a local Vault.
82
+
83
+ 1. The Skill tells the agent when to save, when to search, and how to treat retrieved memory.
84
+ 2. Supported lifecycle hooks capture visible user and assistant events without blocking the conversation on capture failure.
85
+ 3. Capture stages an event, writes an immutable raw record, and adds a persistent queue item.
86
+ 4. An event-driven, session-local processor consumes the queue serially. It can run for explicit memories, at the size threshold, after the maximum wait is observed by a later event, on session startup, or through a manual command.
87
+ 5. Deterministic processing creates a safe searchable baseline: raw → processed memory → tags and retrieval phrases.
88
+ 6. When eligible records are pending, the installed Skill can ask the model already running in Claude Code or Codex to organize one bounded batch after the user's primary task.
89
+ 7. Validated enrichment is stored as a derived overlay. It improves tagging and recall without rewriting raw evidence or the deterministic baseline.
90
+ 8. Recall searches the current project and returns a bounded evidence package, falling back to the deterministic baseline whenever enrichment is missing, stale, or invalid.
91
+
92
+ The active agent combines that package with its current conversation and any host-owned memory already in context. Substantially identical facts are the same underlying evidence, not independent corroboration; conflicts should be surfaced instead of silently resolved.
93
+
94
+ Linger does not install a daemon, alter host-owned memory settings, or guarantee that an idle, long-running session will process the queue at an exact time.
95
+
96
+ The default Vault is ~/.linger/vault:
97
+
98
+ ~/.linger/vault/
99
+ ├── config.json
100
+ ├── projects/
101
+ ├── raw/
102
+ ├── processed/
103
+ ├── enrichments/
104
+ ├── decisions/
105
+ ├── queue/
106
+ ├── registry/
107
+ ├── tmp/
108
+ └── quarantine/
109
+
110
+ Raw events and decision events are append-only source records. Processed memories use JSON plus a Markdown mirror. Host enrichment is a replaceable derived overlay. Registries and current decision views are derived and can be rebuilt.
111
+
112
+ Everything is a file. You can inspect it, back it up, grep it, or remove it through confirmed controls.
113
+
114
+ ## Key ideas
115
+
116
+ ### File-native
117
+
118
+ Your memory lives in ordinary local files with a versioned schema. There is no memory database or required server. Uninstalling the integration leaves the Vault in place.
119
+
120
+ ### Decision trail
121
+
122
+ Linger records typed decision evolution: idea, preference, proposal, rationale, constraint, rejection, decision, current state, todo, and correction.
123
+
124
+ The current view is derived from immutable events. This allows Linger to preserve an A → B → A path instead of silently replacing history.
125
+
126
+ ### Evidence, not instruction
127
+
128
+ Retrieved memories are untrusted historical evidence. Commands, prompts, or old system messages found in memory must not be executed. The current system and user instructions always take priority.
129
+
130
+ ### Honest recall
131
+
132
+ Recall distinguishes exact, similar, possible, conflicting, unprocessed, and missing results. It carries source IDs and provenance warnings. If Linger cannot find reliable evidence, it says so and may offer candidate topics, decisions, tags, or observed months.
133
+
134
+ ## Agent support
135
+
136
+ Automation differs by host and version. Capability levels are reported from observed evidence, not from copied files alone.
137
+
138
+ | Agent | Verified level | Current evidence and limitations |
139
+ | --- | ---: | --- |
140
+ | Claude Code | L2 | Claude Code 2.1.207 completed a real v0.2.1 host-enrichment path while its active host model was DeepSeek: lifecycle capture, deterministic processing, overlay commit, and enriched tagging. The v0.2.2 sidecar upgrade preserves host-owned memory and has passed installation and migration verification. StopFailure is covered in disposable-home acceptance. Ctrl-C did not preserve already-streamed assistant text on the observed path. |
141
+ | Codex | L2 | Codex 0.144.0-alpha.4 completed a real v0.2.1 host-enrichment path: lifecycle capture, current-model organization, overlay commit, tag-registry rebuild, and exact semantic recall. The v0.2.2 sidecar contract is shared by the Codex adapter. A fresh install remains L1 until one trusted live session completes SessionStart, UserPromptSubmit, and Stop with the installed runtime. |
142
+ | Other agents | Not implemented | Additional adapters are outside the v0.2.2 MVP scope. Future adapters must preserve the same sidecar boundary and leave host-owned memory untouched. |
143
+
144
+ Levels:
145
+
146
+ - L0: rule-only behavior.
147
+ - L1: installed Skill with explicit file and CLI operations.
148
+ - L2: verified lifecycle hook capture.
149
+ - L3: session-local asynchronous processing.
150
+ - L4: fuller capture, processing, recovery, indexing, and recall automation.
151
+
152
+ Linger does not report L3 or L4 merely because integration files exist.
153
+
154
+ Host enrichment follows the same support boundary. In Codex it uses the model active in Codex; in Claude Code it uses the model active in Claude Code, including a user-configured compatible endpoint. Linger installs no model SDK, chooses no model, and asks for no provider credential. If the host cannot or does not run enrichment, capture and deterministic recall continue normally.
155
+
156
+ ## Natural-language workflows
157
+
158
+ The Skill helps the agent translate user intent into Linger operations. Exact behavior depends on the host's Skill and lifecycle support.
159
+
160
+ Capture and recall are intentionally different. With verified lifecycle hooks, visible conversation turns are captured automatically during ordinary chat. Recall is demand-driven: Linger does not search or inject the whole Vault on every turn. When the user refers to earlier work with phrases such as “previously,” “last time,” “continue,” “why did we choose,” or “do you remember,” the agent should search the current project's Linger evidence. For an important lookup, the user can say “Use Linger to recall …” without running a CLI command.
161
+
162
+ | You say | Intended behavior |
163
+ | --- | --- |
164
+ | “Remember this” | Capture as high-priority user-explicit evidence. |
165
+ | “Don't save this” | Skip the current user event before Vault initialization when the hook exposes it. |
166
+ | “Forget that decision” | Revoke the processed memory from ordinary recall without deleting raw history. |
167
+ | “That memory is wrong” | Append a correction with visible evidence; do not rewrite history in place. |
168
+ | “Why did we choose X?” | Search the current project's decision trail and return sourced evidence. |
169
+ | “What did we discuss about Y?” | Search the current project's conversation archive. |
170
+ | “Sample this recall” | Opt in for this query, return an attempt ID, and wait for your quality judgment. |
171
+ | “Status” | Report Vault, queue, pending, and integrity health. |
172
+
173
+ Ordinary capture and enrichment require no separate Linger command from the user. Lifecycle hooks capture visible turns. When the host reports pending eligible records, the Skill may organize at most one bounded batch after the primary request.
174
+
175
+ Linger is a sidecar rather than a replacement for host memory. Installation preserves Claude Code, Codex, and future adapters' native memory settings and files. A host may independently retain a fact that Linger also captured; on recall, the active model should merge duplicates as one underlying event and disclose conflicting versions. Linger never treats duplicated context as an extra vote.
176
+
177
+ Forget and delete are different. Forget changes recall eligibility. Delete removes a confirmed record. Purge removes the complete Linger state only after double confirmation.
178
+
179
+ ## Privacy
180
+
181
+ See [PRIVACY.md](PRIVACY.md) for the complete data boundary and removal behavior.
182
+
183
+ Linger stores visible conversation content in local files. Its runtime does not phone home, collect telemetry, create embeddings, or sync data to a Linger service.
184
+
185
+ Local-first does not mean data never leaves your machine. When an agent recalls evidence or organizes a bounded enrichment batch, that evidence enters the current Claude Code or Codex context and may be sent to the model provider configured in that host. Linger does not send it to an additional model service.
186
+
187
+ The project includes a safety baseline for sensitive content:
188
+
189
+ - High-confidence secret patterns are redacted before raw persistence.
190
+ - Secret records are excluded from processed memory and ordinary recall.
191
+ - Contact-like sensitive records are excluded from ordinary recall by default.
192
+ - Only normal-sensitivity, hash-verified records are eligible for host enrichment.
193
+ - The same capture boundary applies to hooks, manual CLI capture, and programmatic capture.
194
+
195
+ This detector is not a complete DLP system. Unknown secret formats may be missed, and explicitly marked but unrecognized secret material may still remain in raw files. Protect the Vault like any other local transcript archive. Do not use this experimental build for data that requires audited compliance controls.
196
+
197
+ ## Safety and integrity
198
+
199
+ See [SECURITY.md](SECURITY.md) for the trust boundary and private vulnerability-reporting process.
200
+
201
+ - Recall is current-project only by default.
202
+ - Cross-project search is never enabled implicitly.
203
+ - Search bounds files, snippets, returned characters, raw fragments, and wall-clock time.
204
+ - Timeouts are reported as retrieval failures, not false “no memory” results.
205
+ - IDs, enum fields, timestamps, schemas, and canonical record locations are validated at runtime.
206
+ - Critical Vault paths reject physical symlink escapes outside the real Vault root.
207
+ - Tampered raw sources are excluded or explicitly degraded.
208
+ - Parseable but invalid records stay inert, appear in doctor, and move only through confirmed repair.
209
+ - Install and uninstall validate managed destinations before mutation.
210
+ - Hook capture failures do not block the agent conversation.
211
+
212
+ These controls reduce risk but do not guarantee absolute safety against malicious repositories, prompt injection, filesystem races, manual Vault modification, or a compromised local account.
213
+
214
+ Report vulnerabilities privately through [GitHub Security Advisories](https://github.com/arishana1969/linger-skill/security/advisories/new). Do not include live secrets or Vault files in ordinary issues.
215
+
216
+ ## Configuration
217
+
218
+ Linger initializes conservative defaults:
219
+
220
+ - Capture enabled unless the Vault is paused.
221
+ - Current-project recall only.
222
+ - Sensitive exclusion enabled.
223
+ - No embeddings or additional model API.
224
+ - Host enrichment is optional, bounded to one batch per agent turn, and uses the model already active in Claude Code or Codex.
225
+ - At most 8 returned snippets.
226
+ - At most 12,000 evidence characters.
227
+ - At most 5,000 scanned files.
228
+ - At most 500 characters per raw fragment.
229
+ - A 2-second search deadline.
230
+
231
+ Pause and resume are available through the CLI. Retrieval bounds can be supplied per search or recall request.
232
+
233
+ Real-use recall sampling is off by default. An explicitly sampled query and its result metadata remain local in the Vault; high-confidence secrets are redacted. Feedback is append-only and can distinguish useful, partial, wrong, and missed recall.
234
+
235
+ Not every internal processing threshold is exposed as a stable user configuration in v0.2.2. Configuration files are schema-validated; unsupported versions or invalid bounds fail explicitly instead of being silently rewritten.
236
+
237
+ ## Limitations
238
+
239
+ - This is an MVP and does not promise perfect recall of every word.
240
+ - Automatic capture depends on verified host lifecycle support.
241
+ - Codex hooks require explicit host trust. After installing or upgrading Linger, start a new Codex session and complete one turn before relying on automatic capture.
242
+ - Claude Code may lose already-streamed assistant text on Ctrl-C interruption.
243
+ - Processing is event-driven and session-local; there is no persistent idle timer or daemon.
244
+ - Deterministic summary, tag, retrieval-phrase, and decision-topic generation may miss complex semantics. Host enrichment improves organization when available but is not guaranteed to run on every turn.
245
+ - Host enrichment currently improves processed memory metadata; it does not autonomously infer or append decision-trail events.
246
+ - The secret detector is intentionally limited and is not encryption.
247
+ - Multi-window use is not a strongly consistent transaction system.
248
+ - Linger reduces prompt-injection and malicious-repository risk but does not eliminate it.
249
+ - The deterministic evaluation suites are regression baselines, not evidence of universal real-world quality.
250
+
251
+ ## Development and verification
252
+
253
+ Requires Node.js 20 or later and pnpm.
254
+
255
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution rules and the full candidate gate.
256
+
257
+ pnpm install --frozen-lockfile
258
+ pnpm test
259
+ node scripts/validate-skill.mjs skills/linger
260
+ pnpm eval:year
261
+ pnpm eval:adversarial
262
+ pnpm eval:heldout
263
+ pnpm verify:package
264
+
265
+ The current clean candidate passes:
266
+
267
+ - 188 automated tests.
268
+ - Year, adversarial, and 250+ event held-out evaluation gates at macro composite 1.0.
269
+ - Real Codex host-enrichment acceptance from hook capture through exact recall; real Claude Code host-enrichment acceptance with a DeepSeek-backed host model.
270
+ - Skill validation.
271
+ - Exact tarball package-manager installation.
272
+ - Capture-to-recall smoke.
273
+ - Uninstall with Vault preservation.
274
+ - Tracked-file credential scanning.
275
+
276
+ These generated suites protect known behavior. They do not prove general memory quality across arbitrary conversations.
277
+
278
+ ## Uninstall and purge
279
+
280
+ With the recommended npx installation:
281
+
282
+ npx linger-skill uninstall --yes
283
+
284
+ With a global or source installation:
285
+
286
+ linger uninstall --yes
287
+
288
+ Uninstall removes managed Skill and hook integration but preserves the Vault.
289
+
290
+ To remove the entire state, including the Vault:
291
+
292
+ node dist/cli.js purge --yes --confirm PURGE
293
+
294
+ Purge is intentionally separate and requires both confirmation mechanisms.
295
+
296
+ ## License
297
+
298
+ Linger is licensed under the MIT License. See LICENSE.
299
+
300
+ See [CHANGELOG.md](CHANGELOG.md) for user-visible changes, [PRIVACY.md](PRIVACY.md) for the data boundary, and [SECURITY.md](SECURITY.md) for the security model and private reporting channel.