counterparts 0.3.49 → 0.3.52
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 +96 -0
- package/README.md +18 -10
- package/docs/QUICKSTART.md +46 -12
- package/docs/manual.md +2 -1
- package/docs/module-map.md +3 -0
- package/package.json +3 -2
- package/src/adapters/claude-code/NOTES.md +43 -0
- package/src/adapters/claude-code/child.ts +23 -2
- package/src/adapters/claude-code/doctor-growth.ts +269 -0
- package/src/adapters/claude-code/doctor-host.ts +19 -1
- package/src/adapters/claude-code/doctor-recall-steps.ts +84 -0
- package/src/adapters/claude-code/doctor.ts +26 -3
- package/src/adapters/claude-code/hooks.ts +7 -1
- package/src/adapters/cli/INTERFACE-GAPS.md +18 -0
- package/src/adapters/cli/NOTES.md +24 -0
- package/src/adapters/cli/commands-dashboard.ts +9 -1
- package/src/adapters/cli/commands-project.ts +2 -1
- package/src/adapters/cli/commands-readings.ts +19 -8
- package/src/adapters/cli/commands-verify.ts +1 -1
- package/src/adapters/cli/commands.ts +4 -2
- package/src/adapters/cli/export.ts +2 -1
- package/src/adapters/cli/install.ts +14 -6
- package/src/adapters/cli/mechanisms.ts +1 -1
- package/src/adapters/cli/wire.ts +22 -6
- package/src/adapters/dashboard/activity.ts +6 -3
- package/src/adapters/dashboard/registries.ts +11 -0
- package/src/adapters/dashboard/web/flow.ts +3 -0
- package/src/adapters/dashboard/web/lanes.ts +4 -0
- package/src/adapters/dashboard/web/narrate.ts +23 -0
- package/src/adapters/dashboard/web/views/activity.ts +4 -2
- package/src/adapters/dashboard/web/views/flow-view.ts +6 -0
- package/src/adapters/dashboard/web/views/memory.ts +13 -0
- package/src/adapters/dashboard/web/views/shared.ts +2 -1
- package/src/adapters/fired.ts +113 -11
- package/src/adapters/host-wiring.ts +3 -1
- package/src/adapters/lifecycle.ts +36 -9
- package/src/adapters/mcp/CONTRACT.md +22 -1
- package/src/adapters/mcp/server-args.ts +51 -0
- package/src/adapters/mcp/server-session-end.ts +8 -2
- package/src/adapters/mcp/server-words.ts +14 -1
- package/src/adapters/mcp/server.ts +117 -7
- package/src/adapters/mcp/tools.ts +4 -3
- package/src/adapters/plugin.ts +1 -0
- package/src/adapters/presence.ts +74 -0
- package/src/adapters/runtime.ts +258 -8
- package/src/adapters/scopes.ts +3 -2
- package/src/adapters/spawn.ts +3 -0
- package/src/adapters/update-check.ts +1 -1
- package/src/adapters/windows-shims.mjs +102 -0
- package/src/core/close-hint.ts +297 -0
- package/src/core/counterpart-boundary.ts +15 -0
- package/src/core/counterpart-deposit.ts +24 -3
- package/src/core/counterpart-events.ts +14 -0
- package/src/core/counterpart-types.ts +6 -0
- package/src/core/counterpart-wake-shape.ts +88 -19
- package/src/core/counterpart.ts +143 -7
- package/src/core/dream/index.ts +1 -1
- package/src/core/dream/reflect.ts +54 -34
- package/src/core/encode/NOTES.md +55 -0
- package/src/core/encode/secrets.ts +477 -3
- package/src/core/event-rollup.ts +175 -0
- package/src/core/handoff/CONTRACT.md +7 -0
- package/src/core/interference.ts +496 -0
- package/src/core/open-close.ts +583 -0
- package/src/core/prospective/CONTRACT.md +24 -0
- package/src/core/prospective/derive.ts +22 -1
- package/src/core/prospective/index.ts +115 -1
- package/src/core/recall/CONTRACT.md +9 -2
- package/src/core/recall/NOTES.md +99 -0
- package/src/core/recall/activate.ts +83 -6
- package/src/core/recall/index.ts +75 -5
- package/src/core/recall/probe.ts +134 -0
- package/src/core/recall/steps.ts +84 -0
- package/src/core/recall/tunables.ts +11 -0
- package/src/core/reconsolidation.ts +14 -4
- package/src/core/remember/CONTRACT.md +2 -1
- package/src/core/remember/NOTES.md +15 -0
- package/src/core/remember/spans.ts +44 -6
- package/src/core/self/NOTES.md +21 -0
- package/src/core/self/work.ts +9 -5
- package/src/core/sleep/CONTRACT.md +36 -2
- package/src/core/sleep/NOTES.md +35 -0
- package/src/core/sleep/close.ts +77 -0
- package/src/core/sleep/cycle.ts +44 -0
- package/src/core/sleep/index.ts +4 -0
- package/src/core/sleep/interfere.ts +73 -0
- package/src/core/sleep/log.ts +27 -2
- package/src/core/sleep/tunables.ts +19 -0
- package/src/core/sleep/types.ts +20 -0
- package/src/core/store/index.ts +157 -10
- package/src/core/store/operational.ts +22 -0
- package/src/core/store/owner-op-seam.ts +16 -0
- package/src/core/store/reads-history.ts +173 -7
- package/src/core/store/reads-memories.ts +253 -4
- package/src/core/store/shapes.ts +8 -0
|
@@ -112,6 +112,7 @@ import { joinHow, joinProposalOf, joinSentence, pairKey, proposeJoin } from "./p
|
|
|
112
112
|
import type { JoinProposal } from "./project-ask.js";
|
|
113
113
|
import type { CoreAsk, CoreDecided } from "./core-ask.js";
|
|
114
114
|
import { settlesWhenOf, THREAD_CLOSED_BY_META_KEY, THREAD_REOPENED_BY_META_KEY, UNRESOLVED_META_KEY } from "../mint.js";
|
|
115
|
+
import { nightClosedOf, reopenNightClosed, reopenedFromNight } from "../open-close.js";
|
|
115
116
|
import type { SettleOutcome } from "../reconsolidation.js";
|
|
116
117
|
import { isTold } from "../told.js";
|
|
117
118
|
|
|
@@ -1264,12 +1265,13 @@ export class Reflections {
|
|
|
1264
1265
|
: []),
|
|
1265
1266
|
...(bundle.staleOpen.length > 0
|
|
1266
1267
|
? [
|
|
1267
|
-
// CLOSE WHAT IS PLAINLY DONE,
|
|
1268
|
-
// experiment agreed with Mike
|
|
1269
|
-
//
|
|
1268
|
+
// CLOSE WHAT IS PLAINLY DONE, LIST THE REST (2026-10-20, an
|
|
1269
|
+
// experiment agreed with Mike; since 2026-11-07, SO1 step 1, the
|
|
1270
|
+
// unsure ones are no longer asked: they are listed as "may be
|
|
1271
|
+
// done" under `recall "still open"`, `open-close.ts#mayBeDoneOf`).
|
|
1270
1272
|
`- closeNow and close (optional, ids from staleOpen${(bundle.settlesOpen ?? []).length > 0 ? " or settlesOpen" : ""} only): staleOpen lists ${String(bundle.staleOpen.length)} open ${bundle.staleOpen.length === 1 ? "thread" : "threads"} nobody has touched for a while (untouched: lived days). Most are open only because nobody closed them. Read one whole with recall first if its line is not enough.`,
|
|
1271
1273
|
` closeNow: the ones a memory you have read plainly shows finished — each {id, why: what shows it done, in a line, shows: the id of the memory that shows it}. They close tonight; your share says which, and ${who} can have one reopened.`,
|
|
1272
|
-
` close: the ones that look done but you are not sure of — ids only. Nothing closes:
|
|
1274
|
+
` close: the ones that look done but you are not sure of — ids only. Nothing closes and nobody is asked: they are listed as "may be done" where ${who} looks at what is still open. When in doubt, list rather than close; never close one just because it is old, and leave out one you have no view on. A question to ${who} (status asked) closes only on ${who}'s answer: list it, never closeNow it.${bundle.staleOpen.some((x) => x.reopened === true) ? ` One marked reopened was reopened by ${who} after a reflection closed it: list it, never close.` : ""}${staleNamed === 0 ? "" : staleNamed === 1 ? " The one with settlesWhen names what would settle it: close it when a memory shows that happened." : " The ones with settlesWhen name what would settle them: close one when a memory shows that happened."}`,
|
|
1273
1275
|
]
|
|
1274
1276
|
: []),
|
|
1275
1277
|
// WHAT WOULD SETTLE IT (2026-10-27, S1; Ames's idea): open items that
|
|
@@ -1277,7 +1279,7 @@ export class Reflections {
|
|
|
1277
1279
|
// trigger plainly happened, through the same doors.
|
|
1278
1280
|
...((bundle.settlesOpen ?? []).length > 0
|
|
1279
1281
|
? [
|
|
1280
|
-
`- settlesOpen (optional; the same closeNow and close take these ids): ${String((bundle.settlesOpen ?? []).length)} open ${(bundle.settlesOpen ?? []).length === 1 ? "item names" : "items name"} what would settle ${(bundle.settlesOpen ?? []).length === 1 ? "it" : "them"} (settlesWhen) — an answer someone owes, a decision, an event. If a memory you have read plainly shows that it happened (the answer came, the decision was made, the event it waited on is past), closeNow it: {id, why: what happened, shows: the memory that shows it — a later one, not the item itself}. At most ${String(REFLECT_TUNABLES.SETTLES_CLOSE)} of these close or are asked a night. If it may have happened and you are not sure, put its id in close and
|
|
1282
|
+
`- settlesOpen (optional; the same closeNow and close take these ids): ${String((bundle.settlesOpen ?? []).length)} open ${(bundle.settlesOpen ?? []).length === 1 ? "item names" : "items name"} what would settle ${(bundle.settlesOpen ?? []).length === 1 ? "it" : "them"} (settlesWhen) — an answer someone owes, a decision, an event. If a memory you have read plainly shows that it happened (the answer came, the decision was made, the event it waited on is past), closeNow it: {id, why: what happened, shows: the memory that shows it — a later one, not the item itself}. At most ${String(REFLECT_TUNABLES.SETTLES_CLOSE)} of these close or are asked a night. If it may have happened and you are not sure, put its id in close: it is listed as "may be done", and nobody is asked. If nothing shows it, leave it open: a trigger not yet met is no reason to close, and age is none either.${(bundle.settlesOpen ?? []).some((x) => x.reopened === true) ? ` One marked reopened was reopened by ${who}: list it, never close.` : ""}`,
|
|
1281
1283
|
]
|
|
1282
1284
|
: []),
|
|
1283
1285
|
// NO LONGER CARRIED (2026-10-22, the open-threads brief): the count, once, never the list.
|
|
@@ -1891,7 +1893,8 @@ export class Reflections {
|
|
|
1891
1893
|
|
|
1892
1894
|
// ── (d) open threads: asked, or closed when plainly done ───────────────
|
|
1893
1895
|
// Only ids from the stale open list this reflection was shown. A proposal
|
|
1894
|
-
// (`close`, 2026-10-16, #489 D) closes nothing —
|
|
1896
|
+
// (`close`, 2026-10-16, #489 D) closes nothing — since SO1 step 1 (2026-11-07) it is listed as
|
|
1897
|
+
// "may be done" and nobody is asked; the owner's word, unasked,
|
|
1895
1898
|
// closes it (`close`). A self-close (`closeNow`, 2026-10-20, an experiment
|
|
1896
1899
|
// agreed with Mike) needs a why, keeps `closeThread`'s checks, and is said
|
|
1897
1900
|
// in the share with the way back (`reopen`); one the owner reopened is
|
|
@@ -1937,7 +1940,7 @@ export class Reflections {
|
|
|
1937
1940
|
continue;
|
|
1938
1941
|
}
|
|
1939
1942
|
if (proposed.includes(cid)) {
|
|
1940
|
-
closeRefused.push({ id: cid, reason: "already-
|
|
1943
|
+
closeRefused.push({ id: cid, reason: "already-listed" });
|
|
1941
1944
|
continue;
|
|
1942
1945
|
}
|
|
1943
1946
|
if (!offeredStale.has(cid)) {
|
|
@@ -1967,14 +1970,19 @@ export class Reflections {
|
|
|
1967
1970
|
// may, the yours/guest split removed). ASKED INSTEAD: one the owner
|
|
1968
1971
|
// reopened, from any session, is asked about, as a proposal; the
|
|
1969
1972
|
// owner's yes closes it.
|
|
1973
|
+
// A QUESTION TO THE OWNER (2026-11-07, SO1 step 1): only his answer
|
|
1974
|
+
// closes it, and the reflection reading for one is not his answer — it
|
|
1975
|
+
// is listed as "may be done", like any unsure one.
|
|
1970
1976
|
const guard =
|
|
1971
1977
|
typeof open.meta[THREAD_REOPENED_BY_META_KEY] === "string"
|
|
1972
1978
|
? "reopened-by-owner"
|
|
1973
|
-
:
|
|
1974
|
-
|
|
1979
|
+
: open.row.status === "asked"
|
|
1980
|
+
? "asked-of-the-owner"
|
|
1981
|
+
: threadGuard(open.row);
|
|
1982
|
+
if (guard === "reopened-by-owner" || guard === "asked-of-the-owner") {
|
|
1975
1983
|
proposed.push(cid);
|
|
1976
1984
|
askedInstead += 1;
|
|
1977
|
-
closeNotes.push(`${cid}:
|
|
1985
|
+
closeNotes.push(`${cid}: listed as may be done instead of closed (${guard}).`);
|
|
1978
1986
|
continue;
|
|
1979
1987
|
}
|
|
1980
1988
|
if (guard !== null) {
|
|
@@ -2020,11 +2028,14 @@ export class Reflections {
|
|
|
2020
2028
|
const reopenedSince = new Set(stringIds(parseDetail(row.detail)["reopened"]));
|
|
2021
2029
|
const closedAll = [...priorSelfClosed, ...toClose].filter((x) => !reopenedSince.has(x.id));
|
|
2022
2030
|
let closeLine: string | null = null;
|
|
2023
|
-
|
|
2031
|
+
// THE UNSURE ONES ARE NOT ASKED (2026-11-07, SO1 step 1): kept as
|
|
2032
|
+
// `closeProposed` and listed as "may be done" under `recall "still
|
|
2033
|
+
// open"`; the share says only what was closed.
|
|
2034
|
+
if (!shareLocked && closedAll.length > 0) {
|
|
2024
2035
|
if (priorCloseLine !== null) shareText = withoutLine(shareText, priorCloseLine);
|
|
2025
|
-
closeLine = this.closeSentences(closedAll
|
|
2036
|
+
closeLine = this.closeSentences(closedAll);
|
|
2026
2037
|
shareText = [shareText, closeLine ?? ""].filter((x) => x.length > 0).join(" ");
|
|
2027
|
-
share = { ...share, offered: true, reason: share.offered ? share.reason :
|
|
2038
|
+
share = { ...share, offered: true, reason: share.offered ? share.reason : "closed-said" };
|
|
2028
2039
|
}
|
|
2029
2040
|
// THE CORE LINE (2026-10-20, an experiment): what this reflection decided
|
|
2030
2041
|
// on the core — keep or retire, with why — in one generated line with the
|
|
@@ -2268,10 +2279,7 @@ export class Reflections {
|
|
|
2268
2279
|
// are written again without it.
|
|
2269
2280
|
if (failed.size > 0) {
|
|
2270
2281
|
selfClosed = selfClosed.filter((x) => !failed.has(x.id));
|
|
2271
|
-
const fixed = this.closeSentences(
|
|
2272
|
-
selfClosed.filter((x) => !reopenedSince.has(x.id)),
|
|
2273
|
-
proposed,
|
|
2274
|
-
);
|
|
2282
|
+
const fixed = this.closeSentences(selfClosed.filter((x) => !reopenedSince.has(x.id)));
|
|
2275
2283
|
if (closeLine !== null) shareText = [withoutLine(shareText, closeLine), fixed ?? ""].filter((x) => x.length > 0).join(" ");
|
|
2276
2284
|
closeLine = fixed;
|
|
2277
2285
|
if (shareText.length === 0) share = { offered: false, reason: "no-share" };
|
|
@@ -2964,6 +2972,28 @@ export class Reflections {
|
|
|
2964
2972
|
refused.push({ id, reason: "unreadable" });
|
|
2965
2973
|
continue;
|
|
2966
2974
|
}
|
|
2975
|
+
// CLOSED BY THE NIGHT ITSELF (2026-11-07, SO1 step 1): no reflection
|
|
2976
|
+
// row to confirm against; the memory's own `threadClosedBy` says so.
|
|
2977
|
+
// The same checks; recorded as a `thread.night.reopened` row.
|
|
2978
|
+
if (only === null && r !== undefined && (nightClosedOf(meta) !== null || reopenedFromNight(meta))) {
|
|
2979
|
+
if (meta[UNRESOLVED_META_KEY] === true) {
|
|
2980
|
+
already.push(id);
|
|
2981
|
+
continue;
|
|
2982
|
+
}
|
|
2983
|
+
const why = threadGuard(r);
|
|
2984
|
+
if (why !== null) {
|
|
2985
|
+
refused.push({ id, reason: why });
|
|
2986
|
+
continue;
|
|
2987
|
+
}
|
|
2988
|
+
try {
|
|
2989
|
+
if (nightClosedOf(meta) === null) already.push(id);
|
|
2990
|
+
else if (reopenNightClosed(this.store, id, { by: "reopen", session: input.session, restoreFlag: true })) reopened.push(id);
|
|
2991
|
+
else refused.push({ id, reason: notMine });
|
|
2992
|
+
} catch (err) {
|
|
2993
|
+
refused.push({ id, reason: `failed: ${String((err as Error).message ?? err).slice(0, 120)}` });
|
|
2994
|
+
}
|
|
2995
|
+
continue;
|
|
2996
|
+
}
|
|
2967
2997
|
// Which reflection closed it: the one given, else the one it names.
|
|
2968
2998
|
const named = isRecord(meta[THREAD_CLOSED_BY_META_KEY]) ? meta[THREAD_CLOSED_BY_META_KEY]["reflection"] : null;
|
|
2969
2999
|
const closer = only ?? (typeof named === "string" ? (this.store.reflection(named) ?? null) : null);
|
|
@@ -4015,8 +4045,8 @@ export class Reflections {
|
|
|
4015
4045
|
* #489 D): beside the share in the hand-back and the carried line (the
|
|
4016
4046
|
* owner-facing question rides in the share itself). Null when none.
|
|
4017
4047
|
*/
|
|
4018
|
-
private closeHow(reflection: string,
|
|
4019
|
-
if (
|
|
4048
|
+
private closeHow(reflection: string, _ids: readonly string[], closed: readonly string[] = []): string | null {
|
|
4049
|
+
if (closed.length === 0) return null;
|
|
4020
4050
|
const who = this.ctx.ownerName() ?? "the owner";
|
|
4021
4051
|
const out: string[] = [];
|
|
4022
4052
|
// WHAT IT CLOSED ITSELF (2026-10-20): told, with the way back.
|
|
@@ -4026,12 +4056,10 @@ export class Reflections {
|
|
|
4026
4056
|
`If ${who} says one is not done ("undo", "that one isn't"), now or in any later session, the counterparts reflect tool's phase "reopen", reopen: [that id], reopens it — the thread's id is enough.`,
|
|
4027
4057
|
);
|
|
4028
4058
|
}
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
);
|
|
4034
|
-
}
|
|
4059
|
+
// The unsure ones (`_ids`) are not asked since 2026-11-07 (SO1 step 1):
|
|
4060
|
+
// `recall "still open"` lists them as "may be done". Should the owner say
|
|
4061
|
+
// one is done, the phase "close" still closes it.
|
|
4062
|
+
void reflection;
|
|
4035
4063
|
return out.join(" ");
|
|
4036
4064
|
}
|
|
4037
4065
|
|
|
@@ -4056,7 +4084,7 @@ export class Reflections {
|
|
|
4056
4084
|
* for a settles close on weak evidence (S1), what was weak — then what it
|
|
4057
4085
|
* asks about. Null when neither.
|
|
4058
4086
|
*/
|
|
4059
|
-
private closeSentences(closed: readonly SelfClose[]
|
|
4087
|
+
private closeSentences(closed: readonly SelfClose[]): string | null {
|
|
4060
4088
|
const lines: string[] = [];
|
|
4061
4089
|
if (closed.length > 0) {
|
|
4062
4090
|
const named = closed
|
|
@@ -4068,14 +4096,6 @@ export class Reflections {
|
|
|
4068
4096
|
: `I closed ${countWord(closed.length)} open threads that looked done: ${named}. If one isn't, say so and I'll reopen it.`,
|
|
4069
4097
|
);
|
|
4070
4098
|
}
|
|
4071
|
-
if (asked.length > 0) {
|
|
4072
|
-
const named = asked.map((cid) => `"${this.handle(cid)}" (${cid})`).join("; ");
|
|
4073
|
-
lines.push(
|
|
4074
|
-
asked.length === 1
|
|
4075
|
-
? `One thing still listed as open looks done to me: ${named}. Shall I close it?`
|
|
4076
|
-
: `A few things still listed as open look done to me: ${named}. Shall I close them?`,
|
|
4077
|
-
);
|
|
4078
|
-
}
|
|
4079
4099
|
return lines.length === 0 ? null : lines.join(" ");
|
|
4080
4100
|
}
|
|
4081
4101
|
|
package/src/core/encode/NOTES.md
CHANGED
|
@@ -202,6 +202,61 @@ line 13: decisions are defaults).
|
|
|
202
202
|
- **Left**: a 40-character RELATIVE path beside a key id (`src/…`, review N2) is still
|
|
203
203
|
redacted — over-redaction, the safe direction.
|
|
204
204
|
|
|
205
|
+
21. **A password named in a sentence is its own family, `password`** (SX1, 2026-11-09; rebuilt in
|
|
206
|
+
the fix round of #788). A reviewer said a password in a sentence and it was kept word for
|
|
207
|
+
word, in the memory and in the raw buffer: every family above wants a shape, or a name with
|
|
208
|
+
`:` / `=` straight after it. The sentence stays: "my wifi password is [REDACTED:password]".
|
|
209
|
+
- **Anchor, then extent.** The first build put the value in the regex, and an adversarial
|
|
210
|
+
review measured it: 26 of 53 phrasings leaked (a multi-word passphrase, "password for the
|
|
211
|
+
router: <value>", "changed my password to <value>", "password? it's <value>") and 28 of 97
|
|
212
|
+
ordinary sentences were cut ("is sent over TLS", "is case-sensitive", "is argon2id",
|
|
213
|
+
"Password - Show"). A regex cannot say "a lowercase word with more of the clause after it
|
|
214
|
+
is the sentence" clearly. Now `re` finds only an ANCHOR (a name, an optional short clause,
|
|
215
|
+
a connector) and `SecretPattern.extent` reads what follows, in code (`proseValue`):
|
|
216
|
+
a quoted run that closes on the line within 64 characters; a passphrase or a run of
|
|
217
|
+
Capitalised words to the end of its clause; a short clause after a colon; otherwise one
|
|
218
|
+
token. After the fix: 4 of 53 kept, 2 of 97 cut, every row in
|
|
219
|
+
`test/secrets-prose-password.test.ts`.
|
|
220
|
+
- **The costs are not symmetric.** A missed password is stored (on a server, for a hosted
|
|
221
|
+
person); a false positive costs one word of a sentence about passwords. Where the choice
|
|
222
|
+
is between them, this takes the word ("the password is important" is cut).
|
|
223
|
+
- **Names**: password (and three typos), passwd, passcode, passphrase, pass code, PIN (code,
|
|
224
|
+
number), pw, a door / gate / alarm / lock … code, a wifi key, a pass followed by a colon where a field starts
|
|
225
|
+
(not "first pass: 74%"), and contraseña, mot de passe, mdp, Passwort, Kennwort, senha.
|
|
226
|
+
Not `pwd` (the working directory), not `code` or `key` alone.
|
|
227
|
+
- **Connectors**: is / was (es, est, ist, war, é, era, and "iz") with up to three adverbs,
|
|
228
|
+
"set to", "the word"; `'s`; a colon after a clause; `->`; a spaced dash; `?` (and "? it's");
|
|
229
|
+
`to` after change / set / reset; or none. A weak connector (none, a dash, an arrow, `?`,
|
|
230
|
+
`pass:`, a value on the next line) takes only a value that looks like a secret on its own
|
|
231
|
+
(a digit, or a symbol among letters). Three more anchors, same family: "it's <value>" and
|
|
232
|
+
"set it to <value>" with a password named on the same line, and "<value> is my password".
|
|
233
|
+
- **The guard** (`isProseWord`, `describes`): grammar words, a short list of what a password
|
|
234
|
+
IS (required, wrong, weak, …), irregular participles (sent, written, kept, overwritten, …),
|
|
235
|
+
endings (-ly -ed -ing -able -ible -less -ful -ous -ive -ic), a hyphenated word whose last
|
|
236
|
+
part is one of those ("case-sensitive", "base64-encoded"), algorithms (bcrypt, sha256,
|
|
237
|
+
argon2id, utf-8), paths, URLs, placeholders, and code (brackets, a call, a dotted
|
|
238
|
+
reference). A PIN or door code is 4–12 digits, and a year with a noun after it is not one.
|
|
239
|
+
- **Never across a line**, except one secret-looking token alone on the next line; a stray
|
|
240
|
+
apostrophe does not open a quoted run.
|
|
241
|
+
- **Linear.** Every newline search and lookbehind is bounded: a lookbehind before `pass` ran
|
|
242
|
+
at every position of a long run of spaces (43 s at 200 KB) until it moved after the word,
|
|
243
|
+
and the scaling shapes are in the test.
|
|
244
|
+
- **`:` and `=` straight after a name stay the catch-all's**, which has the code guards.
|
|
245
|
+
`pw` and `passcode` joined its password names, and `passcode` the PIN pattern.
|
|
246
|
+
- **The raw buffer crosses the same scan** (`remember/spans.ts`, injected by `Counterpart`).
|
|
247
|
+
- **Second review, fresh sentences** (20 of 70 kept, 11 of 88 cut; now 5 of 70 and 2 of 88,
|
|
248
|
+
both of those the catch-all's on master too; `test/secrets-prose-password-review2.test.ts`).
|
|
249
|
+
The causes: a Windows `\r` stayed on the last word and hid it from every list (the line is
|
|
250
|
+
now cut at `\r\n`); a passphrase or colon took a whole describing clause (now only a run that
|
|
251
|
+
reads as one: two to eight words, no function word, three not describing a password; a seed
|
|
252
|
+
or recovery phrase runs whole); measurements and versions ("1200ms", "12/15", "v2.1") and
|
|
253
|
+
password-manager names (1Password, LastPass, …) are words; "it's <value>" needs the name in
|
|
254
|
+
its own clause, not 80 characters away; `pwd` counts in a possessive or "the pwd for" frame;
|
|
255
|
+
an emoji or `**` before a value is stepped over; lock combinations and dashed codes are
|
|
256
|
+
digits; an aside (", if you need it," / "(case sensitive)") may sit before the verb; a
|
|
257
|
+
table cell or a comma may connect. A plain-word value is no longer carried to its other
|
|
258
|
+
copies ("my password is" a weekday took every copy of the weekday): only a secret-shaped one.
|
|
259
|
+
|
|
205
260
|
## Calibration status (scar §2.8, guarantee 13)
|
|
206
261
|
|
|
207
262
|
Every threshold in `tunables.ts` carries the v1 measurement it inherits and a
|