counterparts 0.3.11 → 0.3.13
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.
- package/CHANGELOG.md +326 -0
- package/docs/QUICKSTART.md +5 -0
- package/docs/README.md +2 -2
- package/docs/module-map.md +3 -3
- package/package.json +1 -1
- package/src/adapters/claude-code/CONTRACT.md +36 -10
- package/src/adapters/claude-code/INTERFACE-GAPS.md +116 -16
- package/src/adapters/claude-code/NOTES.md +182 -0
- package/src/adapters/claude-code/bin/hook.ts +46 -12
- package/src/adapters/claude-code/bin/runner.ts +7 -1
- package/src/adapters/claude-code/doctor.ts +632 -18
- package/src/adapters/claude-code/hooks.ts +61 -16
- package/src/adapters/claude-code/index.ts +11 -0
- package/src/adapters/claude-code/night-run.ts +150 -14
- package/src/adapters/claude-code/transcript.ts +268 -1
- package/src/adapters/cli/CONTRACT.md +5 -0
- package/src/adapters/cli/INTERFACE-GAPS.md +8 -4
- package/src/adapters/cli/NOTES.md +111 -0
- package/src/adapters/cli/commands.ts +134 -92
- package/src/adapters/cli/dream-core.ts +57 -42
- package/src/adapters/cli/export.ts +320 -21
- package/src/adapters/cli/help.ts +2 -1
- package/src/adapters/cli/index.ts +1 -0
- package/src/adapters/cli/install.ts +39 -7
- package/src/adapters/cli/mechanisms.ts +7 -1
- package/src/adapters/cli/uninstall.ts +13 -5
- package/src/adapters/cli/wire.ts +189 -63
- package/src/adapters/config.ts +2 -0
- package/src/adapters/dashboard/INTERFACE-GAPS.md +10 -1
- package/src/adapters/dashboard/NOTES.md +79 -0
- package/src/adapters/dashboard/registries.ts +34 -2
- package/src/adapters/dashboard/web/README.md +19 -14
- package/src/adapters/dashboard/web/actions.ts +23 -1
- package/src/adapters/dashboard/web/flow.ts +14 -0
- package/src/adapters/dashboard/web/lanes.ts +10 -0
- package/src/adapters/dashboard/web/narrate.ts +88 -2
- package/src/adapters/dashboard/web/pages/flow/sections/fired.js +1 -0
- package/src/adapters/dashboard/web/pages/health/sections/checks.js +2 -0
- package/src/adapters/dashboard/web/pages/health/sections/wake.js +3 -1
- package/src/adapters/dashboard/web/pages/memories/memories.css +17 -4
- package/src/adapters/dashboard/web/pages/memories/row.js +37 -21
- package/src/adapters/dashboard/web/pages/memories/sections/search.js +279 -60
- package/src/adapters/dashboard/web/pages/memories/state.js +2 -1
- package/src/adapters/dashboard/web/server.ts +0 -5
- package/src/adapters/dashboard/web/shared/memory-marks.css +7 -0
- package/src/adapters/dashboard/web/shared/memory-marks.js +33 -0
- package/src/adapters/dashboard/web/shared/memory-modal.js +5 -3
- package/src/adapters/dashboard/web/views/health.ts +21 -3
- package/src/adapters/dashboard/web/views/search.ts +4 -45
- package/src/adapters/dashboard/web/views.ts +2 -2
- package/src/adapters/fired.ts +430 -28
- package/src/adapters/host-wiring.ts +300 -0
- package/src/adapters/hosts.ts +11 -0
- package/src/adapters/lifecycle.ts +42 -2
- package/src/adapters/log/index.ts +9 -0
- package/src/adapters/mcp/CONTRACT.md +151 -11
- package/src/adapters/mcp/INTERFACE-GAPS.md +24 -2
- package/src/adapters/mcp/NOTES.md +313 -1
- package/src/adapters/mcp/bin/serve.ts +74 -1
- package/src/adapters/mcp/deliberate.ts +169 -651
- package/src/adapters/mcp/facts.ts +1094 -0
- package/src/adapters/mcp/index.ts +25 -7
- package/src/adapters/mcp/meaning.ts +1610 -0
- package/src/adapters/mcp/server.ts +835 -150
- package/src/adapters/mcp/stdio.ts +3 -1
- package/src/adapters/mcp/stood-down.ts +51 -0
- package/src/adapters/mcp/tools.ts +167 -41
- package/src/adapters/plugin-run.sh +133 -0
- package/src/adapters/plugin.ts +329 -0
- package/src/adapters/sessions.ts +18 -4
- package/src/core/associate/CONTRACT.md +2 -1
- package/src/core/associate/INTERFACE-GAPS.md +6 -1
- package/src/core/associate/NOTES.md +45 -0
- package/src/core/briefing.ts +12 -3
- package/src/core/contradictions.ts +184 -0
- package/src/core/counterpart.ts +797 -51
- package/src/core/dream/CONTRACT.md +36 -4
- package/src/core/dream/INTERFACE-GAPS.md +29 -6
- package/src/core/dream/NOTES.md +107 -0
- package/src/core/dream/feeling-weeks.ts +198 -0
- package/src/core/dream/index.ts +109 -18
- package/src/core/dream/reflect.ts +346 -87
- package/src/core/dream/tunables.ts +24 -4
- package/src/core/encode/INTERFACE-GAPS.md +3 -1
- package/src/core/encode/NOTES.md +7 -0
- package/src/core/encode/words.ts +45 -0
- package/src/core/fit/INTERFACE-GAPS.md +8 -2
- package/src/core/fit/NOTES.md +39 -1
- package/src/core/fit/index.ts +40 -0
- package/src/core/handoff/CONTRACT.md +37 -2
- package/src/core/handoff/INTERFACE-GAPS.md +10 -0
- package/src/core/handoff/NOTES.md +72 -0
- package/src/core/handoff/index.ts +214 -12
- package/src/core/handoff/last-here.ts +6 -4
- package/src/core/mint.ts +12 -2
- package/src/core/physics/CONTRACT.md +14 -2
- package/src/core/physics/NOTES.md +33 -1
- package/src/core/physics/index.ts +28 -5
- package/src/core/prospective/CONTRACT.md +45 -6
- package/src/core/prospective/INTERFACE-GAPS.md +4 -0
- package/src/core/prospective/NOTES.md +138 -0
- package/src/core/prospective/derive.ts +33 -5
- package/src/core/prospective/index.ts +90 -5
- package/src/core/prospective/windows.ts +72 -1
- package/src/core/recall/CONTRACT.md +31 -12
- package/src/core/recall/INTERFACE-GAPS.md +28 -4
- package/src/core/recall/NOTES.md +70 -1
- package/src/core/recall/feeling-ask.ts +10 -1
- package/src/core/recall/index.ts +3 -1
- package/src/core/recall/probe.ts +58 -0
- package/src/core/recall/session.ts +46 -2
- package/src/core/recall/time-ask.ts +487 -0
- package/src/core/remember/CONTRACT.md +4 -1
- package/src/core/remember/INTERFACE-GAPS.md +9 -1
- package/src/core/remember/NOTES.md +8 -0
- package/src/core/remember/proposals.ts +47 -5
- package/src/core/revision.ts +18 -1
- package/src/core/schemas/CONTRACT.md +21 -1
- package/src/core/schemas/INTERFACE-GAPS.md +20 -2
- package/src/core/schemas/NOTES.md +144 -0
- package/src/core/schemas/aliases.ts +55 -5
- package/src/core/schemas/index.ts +93 -1
- package/src/core/schemas/types.ts +2 -0
- package/src/core/self/CONTRACT.md +32 -5
- package/src/core/self/INTERFACE-GAPS.md +7 -2
- package/src/core/self/NOTES.md +102 -1
- package/src/core/self/behind.ts +43 -3
- package/src/core/self/briefing.ts +12 -2
- package/src/core/self/chapter-address.ts +254 -0
- package/src/core/self/episodes.ts +27 -0
- package/src/core/self/index.ts +83 -8
- package/src/core/self/page.ts +88 -0
- package/src/core/self/tunables.ts +5 -0
- package/src/core/self/work.ts +35 -2
- package/src/core/self/writer.ts +30 -0
- package/src/core/sleep/INTERFACE-GAPS.md +22 -3
- package/src/core/sleep/NOTES.md +20 -1
- package/src/core/sleep/consolidate.ts +59 -7
- package/src/core/sleep/index.ts +3 -0
- package/src/core/sleep/prune.ts +6 -2
- package/src/core/sleep/types.ts +7 -0
- package/src/core/store/CONTRACT.md +16 -0
- package/src/core/store/NOTES.md +66 -0
- package/src/core/store/feelings.ts +14 -1
- package/src/core/store/index.ts +483 -16
- package/src/core/store/operational.ts +95 -2
- package/src/core/store/owner-op-seam.ts +23 -0
- package/src/core/time.ts +152 -0
- package/tools/install-loop/run.sh +48 -12
- package/src/adapters/dashboard/web/pages/memories/fold.js +0 -53
|
@@ -25,21 +25,20 @@ export { DESKTOP_TOOLS, TOOLS, TOOL_NAMES, WAKE, renderDescription, toolDefiniti
|
|
|
25
25
|
export type { Privilege, ToolName, ToolSpec } from "./tools.js";
|
|
26
26
|
|
|
27
27
|
export {
|
|
28
|
-
DELIBERATE_DIM_CAP,
|
|
29
|
-
DELIBERATE_TIERS,
|
|
30
|
-
HARD_GATES,
|
|
31
28
|
RECALL_BODY_CHARS,
|
|
32
29
|
RECALL_EXCERPT_CHARS,
|
|
33
30
|
RECALL_ID_RESULT_CHARS,
|
|
34
31
|
RECALL_MAX_IDS,
|
|
35
32
|
RECALL_RESULT_CHARS,
|
|
36
|
-
|
|
33
|
+
FADED_RETAINED,
|
|
37
34
|
boundById,
|
|
38
|
-
|
|
35
|
+
hasFaded,
|
|
39
36
|
deliberateRecall,
|
|
37
|
+
embedQuestion,
|
|
40
38
|
expandHandle,
|
|
41
39
|
expandIds,
|
|
42
|
-
|
|
40
|
+
provenanceOf,
|
|
41
|
+
provenanceParts,
|
|
43
42
|
} from "./deliberate.js";
|
|
44
43
|
export type {
|
|
45
44
|
BoundedMemory,
|
|
@@ -49,15 +48,28 @@ export type {
|
|
|
49
48
|
DeliberateReason,
|
|
50
49
|
DeliberateResult,
|
|
51
50
|
Recalled,
|
|
52
|
-
Tier,
|
|
53
51
|
} from "./deliberate.js";
|
|
54
52
|
|
|
53
|
+
export {
|
|
54
|
+
FACTS_EARLIER_SHOWN,
|
|
55
|
+
FACTS_FADED_LINES,
|
|
56
|
+
FACTS_MEANING_CAP,
|
|
57
|
+
FACTS_PAGE_SIZE,
|
|
58
|
+
FACTS_WEAK_FRACTION,
|
|
59
|
+
factsRecall,
|
|
60
|
+
renderFacts,
|
|
61
|
+
} from "./facts.js";
|
|
62
|
+
export type { FactItem, FactsContext, FactsResult, FactsTime, FactWay } from "./facts.js";
|
|
63
|
+
export { meaningRecall, renderMeaning } from "./meaning.js";
|
|
64
|
+
export type { MeaningContext, MeaningResult } from "./meaning.js";
|
|
65
|
+
|
|
55
66
|
export {
|
|
56
67
|
DESKTOP_DREAM_NOTE,
|
|
57
68
|
DESKTOP_INSTRUCTIONS,
|
|
58
69
|
McpServer,
|
|
59
70
|
NO_DESKTOP_SESSION,
|
|
60
71
|
OWNER_FALSE_NOTE,
|
|
72
|
+
SEEN_SESSIONS,
|
|
61
73
|
SERVER_NAME,
|
|
62
74
|
SERVER_VERSION,
|
|
63
75
|
START_PROMPT,
|
|
@@ -84,6 +96,8 @@ import { McpServer } from "./server.js";
|
|
|
84
96
|
import type { McpServerOptions } from "./server.js";
|
|
85
97
|
|
|
86
98
|
export interface OpenServerOptions extends Omit<McpServerOptions, "counterpart"> {
|
|
99
|
+
/** `CounterpartOptions.bundlesAsOwner`: tests only — no host sets it (review of #318). */
|
|
100
|
+
bundlesAsOwner?: boolean;
|
|
87
101
|
/** Where the memory lives. Defaults to the store's own resolution. */
|
|
88
102
|
dir?: string;
|
|
89
103
|
observer?: boolean;
|
|
@@ -135,6 +149,7 @@ export function openServer(opts: OpenServerOptions = {}): McpServer {
|
|
|
135
149
|
...(opts.pageWriterMode === undefined ? {} : { pageWriterMode: opts.pageWriterMode }),
|
|
136
150
|
...(opts.observer === undefined ? {} : { observer: opts.observer }),
|
|
137
151
|
...(opts.owner === undefined ? {} : { owner: opts.owner }),
|
|
152
|
+
...(opts.bundlesAsOwner === undefined ? {} : { bundlesAsOwner: opts.bundlesAsOwner }),
|
|
138
153
|
...(opts.onCounterpartEvent === undefined ? {} : { onEvent: opts.onCounterpartEvent }),
|
|
139
154
|
});
|
|
140
155
|
return new McpServer({
|
|
@@ -148,6 +163,7 @@ export function openServer(opts: OpenServerOptions = {}): McpServer {
|
|
|
148
163
|
...(opts.registryDir === undefined ? {} : { registryDir: opts.registryDir }),
|
|
149
164
|
...(opts.scopesFile === undefined ? {} : { scopesFile: opts.scopesFile }),
|
|
150
165
|
...(opts.sessionTtlMs === undefined ? {} : { sessionTtlMs: opts.sessionTtlMs }),
|
|
166
|
+
...(opts.resultCeilingChars === undefined ? {} : { resultCeilingChars: opts.resultCeilingChars }),
|
|
151
167
|
// Which host, and what Claude Desktop's `wake` needs (2026-09-30) — carried
|
|
152
168
|
// through unchanged; the server decides what to do with them.
|
|
153
169
|
...(opts.host === undefined ? {} : { host: opts.host }),
|
|
@@ -156,6 +172,8 @@ export function openServer(opts: OpenServerOptions = {}): McpServer {
|
|
|
156
172
|
...(opts.manifestVersion === undefined ? {} : { manifestVersion: opts.manifestVersion }),
|
|
157
173
|
...(opts.env === undefined ? {} : { env: opts.env }),
|
|
158
174
|
...(opts.launchObserver === undefined ? {} : { launchObserver: opts.launchObserver }),
|
|
175
|
+
...(opts.ownerFrom === undefined ? {} : { ownerFrom: opts.ownerFrom }),
|
|
176
|
+
...(opts.codeTabOwner === undefined ? {} : { codeTabOwner: opts.codeTabOwner }),
|
|
159
177
|
...(opts.onEvent === undefined ? {} : { onEvent: opts.onEvent }),
|
|
160
178
|
...(opts.now === undefined ? {} : { now: opts.now }),
|
|
161
179
|
});
|