@pcircle/memesh 4.9.3 → 4.10.1
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/AGENTS.md +35 -4
- package/README.de.md +3 -3
- package/README.md +3 -3
- package/README.zh-TW.md +3 -3
- package/dashboard/dist/index.html +8 -8
- package/dist/cli/view-live.d.ts.map +1 -1
- package/dist/cli/view-live.js +0 -427
- package/dist/cli/view-live.js.map +1 -1
- package/dist/core/briefing-index.d.ts +30 -0
- package/dist/core/briefing-index.d.ts.map +1 -0
- package/dist/core/briefing-index.js +140 -0
- package/dist/core/briefing-index.js.map +1 -0
- package/dist/core/briefing.d.ts +4 -0
- package/dist/core/briefing.d.ts.map +1 -1
- package/dist/core/briefing.js +42 -4
- package/dist/core/briefing.js.map +1 -1
- package/dist/core/capture-liveness.d.ts +136 -0
- package/dist/core/capture-liveness.d.ts.map +1 -0
- package/dist/core/capture-liveness.js +447 -0
- package/dist/core/capture-liveness.js.map +1 -0
- package/dist/core/config.d.ts +1 -0
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +3 -1
- package/dist/core/config.js.map +1 -1
- package/dist/core/delegation.d.ts +47 -0
- package/dist/core/delegation.d.ts.map +1 -0
- package/dist/core/delegation.js +174 -0
- package/dist/core/delegation.js.map +1 -0
- package/dist/core/doctor-fixes.d.ts +1 -0
- package/dist/core/doctor-fixes.d.ts.map +1 -1
- package/dist/core/doctor-fixes.js +21 -0
- package/dist/core/doctor-fixes.js.map +1 -1
- package/dist/core/doctor.d.ts +8 -0
- package/dist/core/doctor.d.ts.map +1 -1
- package/dist/core/doctor.js +148 -3
- package/dist/core/doctor.js.map +1 -1
- package/dist/core/note-derive.d.ts +14 -0
- package/dist/core/note-derive.d.ts.map +1 -0
- package/dist/core/note-derive.js +66 -0
- package/dist/core/note-derive.js.map +1 -0
- package/dist/core/note-ingest.d.ts +34 -0
- package/dist/core/note-ingest.d.ts.map +1 -0
- package/dist/core/note-ingest.js +445 -0
- package/dist/core/note-ingest.js.map +1 -0
- package/dist/core/operations.d.ts +10 -1
- package/dist/core/operations.d.ts.map +1 -1
- package/dist/core/operations.js +129 -14
- package/dist/core/operations.js.map +1 -1
- package/dist/core/paths.d.ts.map +1 -1
- package/dist/core/paths.js.map +1 -1
- package/dist/core/schema-export.d.ts.map +1 -1
- package/dist/core/schema-export.js +10 -4
- package/dist/core/schema-export.js.map +1 -1
- package/dist/core/serializer.d.ts.map +1 -1
- package/dist/core/serializer.js +3 -0
- package/dist/core/serializer.js.map +1 -1
- package/dist/core/session-insight.d.ts +44 -0
- package/dist/core/session-insight.d.ts.map +1 -0
- package/dist/core/session-insight.js +216 -0
- package/dist/core/session-insight.js.map +1 -0
- package/dist/core/task-state-store.d.ts +4 -0
- package/dist/core/task-state-store.d.ts.map +1 -1
- package/dist/core/task-state-store.js +18 -5
- package/dist/core/task-state-store.js.map +1 -1
- package/dist/core/turn-signal.d.ts +22 -0
- package/dist/core/turn-signal.d.ts.map +1 -0
- package/dist/core/turn-signal.js +89 -0
- package/dist/core/turn-signal.js.map +1 -0
- package/dist/core/types.d.ts +12 -3
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/update-entrypoint.d.ts +19 -0
- package/dist/core/update-entrypoint.d.ts.map +1 -0
- package/dist/core/update-entrypoint.js +222 -0
- package/dist/core/update-entrypoint.js.map +1 -0
- package/dist/core/update-notice.d.ts +69 -0
- package/dist/core/update-notice.d.ts.map +1 -0
- package/dist/core/update-notice.js +188 -0
- package/dist/core/update-notice.js.map +1 -0
- package/dist/host-runtime/codex-session.d.ts +10 -0
- package/dist/host-runtime/codex-session.d.ts.map +1 -1
- package/dist/host-runtime/codex-session.js +1 -1
- package/dist/host-runtime/codex-session.js.map +1 -1
- package/dist/knowledge-graph.d.ts.map +1 -1
- package/dist/knowledge-graph.js +24 -3
- package/dist/knowledge-graph.js.map +1 -1
- package/dist/mcp/THIRD_PARTY_NOTICES.txt +2 -2
- package/dist/mcp/server.js +1079 -90
- package/dist/mcp/server.js.map +3 -3
- package/dist/skills-manifest.json +49 -24
- package/dist/transports/cli/cli.d.ts.map +1 -1
- package/dist/transports/cli/cli.js +7702 -5764
- package/dist/transports/cli/cli.js.map +3 -3
- package/dist/transports/http/server.d.ts.map +1 -1
- package/dist/transports/http/server.js +38 -27
- package/dist/transports/http/server.js.map +1 -1
- package/dist/transports/mcp/handlers.d.ts +25 -5
- package/dist/transports/mcp/handlers.d.ts.map +1 -1
- package/dist/transports/mcp/handlers.js +43 -5
- package/dist/transports/mcp/handlers.js.map +1 -1
- package/dist/transports/schemas.d.ts +4 -2
- package/dist/transports/schemas.d.ts.map +1 -1
- package/dist/transports/schemas.js +29 -3
- package/dist/transports/schemas.js.map +1 -1
- package/docs/platforms/README.md +1 -0
- package/docs/platforms/agent-messaging.md +22 -5
- package/package.json +17 -4
- package/scripts/check-plugin-hook-artifact.mjs +212 -0
- package/scripts/hooks/_generated/briefing-index.js +147 -0
- package/scripts/hooks/_generated/capture-liveness.js +454 -0
- package/scripts/hooks/_generated/update-notice.js +195 -0
- package/scripts/hooks/_shared.js +302 -14
- package/scripts/hooks/_stop-notes.js +504 -0
- package/scripts/hooks/auto-update-runner.mjs +22 -0
- package/scripts/hooks/decision-nudge.js +32 -5
- package/scripts/hooks/guard-check.js +30 -3
- package/scripts/hooks/post-commit.js +329 -133
- package/scripts/hooks/pre-compact.js +17 -2
- package/scripts/hooks/pre-edit-recall.js +32 -1
- package/scripts/hooks/session-start.js +361 -78
- package/scripts/hooks/session-summary.js +217 -41
- package/scripts/hooks/user-prompt-intent.js +89 -19
- package/scripts/lib/npm-bin.mjs +123 -0
- package/scripts/upgrade-plugin.sh +24 -0
- package/skills/memesh/SKILL.md +20 -8
- package/dist/cli/assets/d3.v7.min.js +0 -2
- package/dist/core/graph.d.ts +0 -26
- package/dist/core/graph.d.ts.map +0 -1
- package/dist/core/graph.js +0 -74
- package/dist/core/graph.js.map +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { NAMESPACES } from '../core/types.js';
|
|
3
3
|
import { TITLE_MAX_LENGTH } from '../core/title.js';
|
|
4
|
+
import { deriveNote, NOTE_MAX_CHARS, NOTE_MAX_OBSERVATIONS } from '../core/note-derive.js';
|
|
4
5
|
import { AGENT_MESSAGE_JSON_MAX_BYTES, AGENT_NATIVE_MESSAGE_MAX_BYTES } from '../core/agent-messaging.js';
|
|
5
6
|
import { AGENT_SCOPE_ID_MAX_LENGTH, agentScopeIdRejection, canonicalAgentScopeId, } from '../core/agent-scope-id.js';
|
|
6
7
|
const sanitizeName = (s) => s.replace(/[\r\n\t]+/g, ' ').trim();
|
|
@@ -54,17 +55,42 @@ export const WorkPackageSchema = z.discriminatedUnion('action', [
|
|
|
54
55
|
}).strict(),
|
|
55
56
|
]);
|
|
56
57
|
export const RememberSchema = z.object({
|
|
57
|
-
name: nameField,
|
|
58
|
-
type: z.string().min(1).max(100),
|
|
58
|
+
name: nameField.optional(),
|
|
59
|
+
type: z.string().min(1).max(100).optional(),
|
|
59
60
|
title: titleField,
|
|
60
61
|
observations: z.array(observationField).max(100).optional(),
|
|
62
|
+
note: z.string().max(NOTE_MAX_CHARS).optional(),
|
|
63
|
+
replace: z.boolean().optional(),
|
|
61
64
|
tags: z.array(z.string().max(255)).max(50).optional(),
|
|
62
65
|
relations: z
|
|
63
66
|
.array(z.object({ to: z.string().min(1).max(255), type: z.string().min(1).max(100) }).strict())
|
|
64
67
|
.max(50)
|
|
65
68
|
.optional(),
|
|
66
69
|
namespace: z.enum(NAMESPACES).optional(),
|
|
67
|
-
}).strict()
|
|
70
|
+
}).strict().superRefine((data, ctx) => {
|
|
71
|
+
if (data.note === undefined) {
|
|
72
|
+
if (data.name === undefined)
|
|
73
|
+
ctx.addIssue({ code: 'custom', path: ['name'], message: 'name is required (or pass `note` to have it derived)' });
|
|
74
|
+
if (data.type === undefined && !(data.replace && data.name !== undefined))
|
|
75
|
+
ctx.addIssue({ code: 'custom', path: ['type'], message: 'type is required (or pass `note`, which defaults it to "note", or `replace: true` with a `name` to keep the type that memory already has)' });
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
for (const key of ['title', 'observations']) {
|
|
79
|
+
if (data[key] !== undefined) {
|
|
80
|
+
ctx.addIssue({ code: 'custom', path: [key], message: `${key} cannot be combined with note — note derives it; to correct the derived ${key}, call again with name, replace: true and a structured ${key} (pass \`type\` only to also change the memory's type)` });
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
if (data.replace && data.name === undefined) {
|
|
84
|
+
ctx.addIssue({ code: 'custom', path: ['name'], message: 'replace with note needs an explicit name — a derived name changes with the text, so there is nothing to replace' });
|
|
85
|
+
}
|
|
86
|
+
const derived = deriveNote(data.note);
|
|
87
|
+
if (!derived) {
|
|
88
|
+
ctx.addIssue({ code: 'custom', path: ['note'], message: 'note must contain some text' });
|
|
89
|
+
}
|
|
90
|
+
else if (derived.observations.length > NOTE_MAX_OBSERVATIONS) {
|
|
91
|
+
ctx.addIssue({ code: 'custom', path: ['note'], message: `note yields ${derived.observations.length} observations; at most ${NOTE_MAX_OBSERVATIONS} are stored per memory` });
|
|
92
|
+
}
|
|
93
|
+
});
|
|
68
94
|
export const RecallSchema = z.object({
|
|
69
95
|
query: z.string().max(1000).optional(),
|
|
70
96
|
tag: z.string().max(255).optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/transports/schemas.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,4BAA4B,EAAE,8BAA8B,EAAE,MAAM,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Aa,CAAC;QAChC,GAAG,kBAAkB;QACrB,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;QACnF,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;KAC/C,CAAC,CAAC,MAAM,EAAE;IACX,CAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC;QAC/B,GAAG,kBAAkB;QACrB,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,QAAQ,CAAC,CAAC;QAChF,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;KAC/C,CAAC,CAAC,MAAM,EAAE;IACX,CAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;QAC7B,OAAO,EAAE,cAAc;QACvB,SAAS,EAAE,gBAAgB;QAC3B,UAAU,EAAE,SAAS;KACtB,CAAC,CAAC,MAAM,EAAE;CACZ,CAAC,CAAC"}
|
package/docs/platforms/README.md
CHANGED
|
@@ -16,6 +16,7 @@ If your goal is cross-agent collaboration rather than memory alone, start with t
|
|
|
16
16
|
| **Other MCP coding agents (Cursor, Cline…)** | MCP Server | Point the client at `memesh-mcp` | See root [README](../../README.md) |
|
|
17
17
|
| **Local agent messaging across hosts** | MCP / HTTP / CLI; native path where documented | Explicit exact-recipient local messaging today; ordinary Codex CLI has active-session native delivery, while other host behavior remains adapter-specific | [agent-messaging.md](./agent-messaging.md) |
|
|
18
18
|
| **Hermes Agent (NousResearch)** | Native `MemoryProvider` plugin | Drop `plugins/memory/memesh/` into a Hermes Agent checkout; `hermes memory setup memesh` | [hermes-agent.md](./hermes-agent.md) |
|
|
19
|
+
| **Delegate workers (DeepSeek worker)** | Orchestrator-side CLI record; the worker never writes | `memesh delegation record --envelope <file> --prompt-file <file>` | [deepseek-worker.md](./deepseek-worker.md) |
|
|
19
20
|
| **OpenClaw** | Native memory plugin (source; not live-tested or published) | `openclaw plugins install @pcircle/openclaw-memory-memesh` when published, or drop into OpenClaw checkout; configure `plugins.slots.memory` | [openclaw.md](./openclaw.md) |
|
|
20
21
|
| **Custom apps / scripts** | HTTP API | Run `memesh serve` and call `/v1/*` | [universal.md](./universal.md) |
|
|
21
22
|
| **ChatGPT / Custom GPT experiments** | HTTP API | Use a local connector/proxy that can reach localhost | [chatgpt.md](./chatgpt.md) |
|
|
@@ -245,12 +245,28 @@ close that gap by requiring evidence that could only have come out of a running
|
|
|
245
245
|
model.
|
|
246
246
|
|
|
247
247
|
```bash
|
|
248
|
+
TMPDIR=/private/tmp npm run qa:live-journey -- --core-only --out .qa/core-report.json
|
|
248
249
|
MEMESH_CODEX_QA_HOME="$(mktemp -d /private/tmp/memesh-codex-qa.XXXXXX)"
|
|
249
250
|
CODEX_HOME="$MEMESH_CODEX_QA_HOME" codex login
|
|
250
251
|
TMPDIR=/private/tmp npm run qa:live-journey -- --host codex --codex-home "$MEMESH_CODEX_QA_HOME" --out .qa/codex-report.json
|
|
251
252
|
TMPDIR=/private/tmp npm run qa:live-journey -- --host claude --out .qa/claude-report.json
|
|
252
253
|
```
|
|
253
254
|
|
|
255
|
+
The v4 report begins with five common product journeys before it reaches the
|
|
256
|
+
host-specific delivery path:
|
|
257
|
+
|
|
258
|
+
| Journey | Exercised boundary | Required readback and failure |
|
|
259
|
+
|---|---|---|
|
|
260
|
+
| memory round trip | built CLI in a fresh process | the exact observation is recalled; an invalid write is rejected and an absent query stays empty |
|
|
261
|
+
| SessionStart briefing | shipped SessionStart hook | seeded memory appears in `hookSpecificOutput`; an unusable database produces the visible failure banner |
|
|
262
|
+
| quiet commit capture | real temporary Git repository plus shipped PostToolUse hook | `git commit -q` becomes a recallable commit entity; unchanged `HEAD` records a named skip |
|
|
263
|
+
| Stop session insight | realistic JSONL transcript plus shipped Stop hook | the insight is recallable; a missing transcript records a named skip without a false entity |
|
|
264
|
+
| packed upgrade | npm-packed candidate installed over public baseline versions | version and pre-existing memory survive success; a forced installer failure reports failure and preserves both package and data |
|
|
265
|
+
|
|
266
|
+
Every row must also prove its temporary state was removed. `--core-only` is the
|
|
267
|
+
credential-free entry point for this catalogue. It does not create a Codex or
|
|
268
|
+
Claude registration and therefore cannot satisfy either host's release claim.
|
|
269
|
+
|
|
254
270
|
`.qa/` is where `npm run release:finish` looks for release receipts. Codex and
|
|
255
271
|
Claude are separate delivery claims, so **both** must PASS within 24 hours
|
|
256
272
|
against the exact clean commit being released, with current `dist/`, ordered
|
|
@@ -267,9 +283,10 @@ database inside the temporary directory, and `AF_UNIX` caps a socket path at
|
|
|
267
283
|
the check adds anything. The script measures its own socket path and refuses
|
|
268
284
|
with this hint rather than starting a router that cannot bind.
|
|
269
285
|
|
|
270
|
-
`scripts/qa/live-journey.mjs`
|
|
271
|
-
|
|
272
|
-
|
|
286
|
+
`scripts/qa/live-journey.mjs` refuses real-host modes when `CI` is set, because
|
|
287
|
+
one needs the owner's Codex login and the other needs a person at an
|
|
288
|
+
interactive Claude session. The isolated `--core-only` catalogue is designed
|
|
289
|
+
to run unattended. Its argument
|
|
273
290
|
parsing, its refusals, and every **pure** assertion it makes are unit-tested in
|
|
274
291
|
`tests/qa/live-journey.test.ts`, which does run in CI against recorded
|
|
275
292
|
fixtures; the orchestration around them is exercised only by a live run.
|
|
@@ -303,10 +320,10 @@ The proof rejects other command/tool activity except the narrowly allowed
|
|
|
303
320
|
installed-skill read and failed work-package prepare probe; neither may contain
|
|
304
321
|
proof identifiers. After SessionEnd retirement, the next send must return
|
|
305
322
|
`recipient_unavailable` while the durable payload remains fetchable.
|
|
306
|
-
Its
|
|
323
|
+
Its v4 report requires registration from `codex_plugin_session_start` with
|
|
307
324
|
`plugin_loader_verified: true`, including a renewed lease after resume supersedes
|
|
308
325
|
the startup generation. `release:finish` requires separate current-candidate
|
|
309
|
-
|
|
326
|
+
v4 receipts for both Codex and Claude; an old harness-injected report does not
|
|
310
327
|
prove automatic installed-plugin registration and is rejected.
|
|
311
328
|
|
|
312
329
|
**`--host claude`** starts the router, runs `memesh agent setup claude`, writes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pcircle/memesh",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.10.1",
|
|
4
4
|
"description": "MeMesh — agentic memory for coding agents. Captured from the agent's real work via hooks, recalled when it acts. One SQLite file, zero cloud required.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -27,10 +27,12 @@
|
|
|
27
27
|
"README.md",
|
|
28
28
|
"LICENSE",
|
|
29
29
|
"llms-install.md",
|
|
30
|
+
"scripts/check-plugin-hook-artifact.mjs",
|
|
31
|
+
"scripts/lib/npm-bin.mjs",
|
|
30
32
|
"AGENTS.md"
|
|
31
33
|
],
|
|
32
34
|
"scripts": {
|
|
33
|
-
"build": "node scripts/check-schema-drift.mjs && tsc && node scripts/build-mcp-bundle.mjs && node scripts/build-cli-bundle.mjs && node scripts/generate-hook-core.mjs && node scripts/
|
|
35
|
+
"build": "node scripts/check-schema-drift.mjs && tsc && node scripts/build-mcp-bundle.mjs && node scripts/build-cli-bundle.mjs && node scripts/generate-hook-core.mjs && node scripts/set-executable-bits.mjs && node scripts/generate-skills-manifest.mjs && npm run build:dashboard && node scripts/smoke-test.mjs",
|
|
34
36
|
"build:dashboard": "node scripts/build-dashboard.mjs",
|
|
35
37
|
"test": "vitest",
|
|
36
38
|
"test:e2e-dashboard": "node scripts/dashboard-e2e-smoke.mjs",
|
|
@@ -48,8 +50,10 @@
|
|
|
48
50
|
"check:surface-parity": "node scripts/check-readme-tool-parity.mjs && node scripts/check-codemap-parity.mjs",
|
|
49
51
|
"audit:prod": "node scripts/check-consumer-audit.mjs",
|
|
50
52
|
"audit:memory": "node scripts/audit/memory-invariants.mjs",
|
|
53
|
+
"audit:hook-outcomes": "node scripts/audit/hook-outcome-gate.mjs",
|
|
51
54
|
"check:entry-points-start": "node scripts/check-entry-points-start.mjs",
|
|
52
|
-
"
|
|
55
|
+
"check:plugin-hook-artifact": "node scripts/check-plugin-hook-artifact.mjs",
|
|
56
|
+
"verify:release": "npm run lint && npm run typecheck && node scripts/check-version-coherence.mjs && node scripts/check-generated-mirror.mjs && node scripts/check-agent-message-sync.mjs && npm run check:surface-parity && node scripts/check-doc-claims.mjs && node scripts/audit/verification-audit.mjs && npm run audit:hook-outcomes && npm run audit:prod && npm run check:entry-points-start && npm run check:plugin-hook-artifact",
|
|
53
57
|
"release:finish": "node scripts/finish-release.mjs",
|
|
54
58
|
"verify:artifact": "npm run verify:release && npm run test:isolated && npm run test:packaged && npm run test:packaged:upgrade",
|
|
55
59
|
"prepublishOnly": "npm run build && npm run verify:artifact",
|
|
@@ -58,12 +62,21 @@
|
|
|
58
62
|
"lint:fix": "eslint src/ scripts/ tests/ dashboard/src/ --fix",
|
|
59
63
|
"start": "node dist/mcp/server.js",
|
|
60
64
|
"bench:longmemeval": "node benchmarks/longmemeval/run.mjs --mode A --dataset /tmp/longmemeval_s.json",
|
|
65
|
+
"bench:token:validate": "node benchmarks/token/validate.mjs",
|
|
61
66
|
"qa:live-journey": "node scripts/qa/live-journey.mjs",
|
|
62
67
|
"qa:pre-release": "node scripts/qa/pre-release.mjs",
|
|
63
68
|
"qa:ui-review": "node scripts/qa/ui-review.mjs",
|
|
64
69
|
"qa:post-release": "node scripts/qa/post-release.mjs",
|
|
65
70
|
"test:isolated": "node scripts/run-tests-isolated.mjs",
|
|
66
|
-
"test:coverage": "node scripts/run-tests-isolated.mjs --coverage"
|
|
71
|
+
"test:coverage": "node scripts/run-tests-isolated.mjs --coverage",
|
|
72
|
+
"verify": "node scripts/verify.mjs",
|
|
73
|
+
"verify:journeys": "node scripts/verify.mjs --journeys",
|
|
74
|
+
"verify:receipt": "node scripts/verify-receipt.mjs",
|
|
75
|
+
"sdlc:next": "node scripts/sdlc/next-stage.mjs --human",
|
|
76
|
+
"sdlc:test": "node --test scripts/sdlc/agent.test.mjs scripts/sdlc/git-gate.test.mjs scripts/sdlc/lib.test.mjs scripts/sdlc/monitor.test.mjs scripts/sdlc/next-stage.test.mjs scripts/sdlc/run-stage.test.mjs scripts/sdlc/smoke-public.test.mjs scripts/verify.test.mjs .claude/hooks/hooks.test.mjs",
|
|
77
|
+
"sdlc:smoke": "node scripts/sdlc/smoke-public.mjs",
|
|
78
|
+
"sdlc:monitor": "node scripts/sdlc/monitor.mjs",
|
|
79
|
+
"prepare": "node -e \"const f=require('fs'),c=require('child_process');f.existsSync('scripts/sdlc/install-git-hooks.mjs')?c.execFileSync(process.execPath,['scripts/sdlc/install-git-hooks.mjs'],{stdio:'inherit'}):console.error('sdlc git hooks: installer not in this package; skipped')\""
|
|
67
80
|
},
|
|
68
81
|
"author": "PCIRCLE-AI",
|
|
69
82
|
"license": "MIT",
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/** Verify plugin hooks and host entrypoints before a cache/artifact swap. */
|
|
3
|
+
import fs from 'node:fs';
|
|
4
|
+
import os from 'node:os';
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
import { fileURLToPath } from 'node:url';
|
|
7
|
+
import { npmSync, envWithNpmCache } from './lib/npm-bin.mjs';
|
|
8
|
+
|
|
9
|
+
export const CLAUDE_PLUGIN_ROOT_PREFIX = '${CLAUDE_PLUGIN_ROOT}/';
|
|
10
|
+
|
|
11
|
+
function isSubpath(parent, child) {
|
|
12
|
+
const relative = path.relative(parent, child);
|
|
13
|
+
return relative === '' || (!relative.startsWith('..') && !path.isAbsolute(relative));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function hookTargetsFromManifest(manifest) {
|
|
17
|
+
const targets = [];
|
|
18
|
+
for (const [event, entries] of Object.entries(manifest?.hooks ?? {})) {
|
|
19
|
+
if (!Array.isArray(entries)) throw new Error(`${event} is not an array in hooks/hooks.json`);
|
|
20
|
+
for (const entry of entries) {
|
|
21
|
+
for (const hook of entry?.hooks ?? []) {
|
|
22
|
+
if (hook?.type !== 'command') continue;
|
|
23
|
+
if (typeof hook.command !== 'string' || !hook.command.startsWith(CLAUDE_PLUGIN_ROOT_PREFIX)) {
|
|
24
|
+
throw new Error(`${event} command must start with ${CLAUDE_PLUGIN_ROOT_PREFIX}`);
|
|
25
|
+
}
|
|
26
|
+
const relative = hook.command.slice(CLAUDE_PLUGIN_ROOT_PREFIX.length);
|
|
27
|
+
if (!relative || /\s/.test(relative) || path.posix.normalize(relative) !== relative || relative.startsWith('../')) {
|
|
28
|
+
throw new Error(`${event} command is not a single safe plugin-relative path: ${hook.command}`);
|
|
29
|
+
}
|
|
30
|
+
targets.push({ event, relative });
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if (targets.length === 0) throw new Error('hooks/hooks.json declares no command hooks');
|
|
35
|
+
return targets;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function readHookManifest(root) {
|
|
39
|
+
return JSON.parse(fs.readFileSync(path.join(root, 'hooks', 'hooks.json'), 'utf8'));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function validateHookTargets(root, manifest = readHookManifest(root)) {
|
|
43
|
+
const rootPath = path.resolve(root);
|
|
44
|
+
const targets = hookTargetsFromManifest(manifest);
|
|
45
|
+
const missing = [];
|
|
46
|
+
for (const target of targets) {
|
|
47
|
+
const resolved = path.resolve(rootPath, target.relative);
|
|
48
|
+
try {
|
|
49
|
+
if (isContainedRegularFile(rootPath, resolved)) continue;
|
|
50
|
+
} catch {
|
|
51
|
+
// Report the same bounded finding for missing and unreadable targets.
|
|
52
|
+
}
|
|
53
|
+
missing.push({ ...target, resolved });
|
|
54
|
+
}
|
|
55
|
+
return { targets, missing, ok: missing.length === 0 };
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* True only for a regular file whose every path component lives inside root.
|
|
60
|
+
* `lstat` rejects a symlink as the last component; `realpathSync` on both
|
|
61
|
+
* sides rejects a symlinked directory ABOVE it — `scripts/hooks -> /elsewhere`
|
|
62
|
+
* passed the lstat-only check and would have let a staged cache execute
|
|
63
|
+
* ambient bytes. Throws on a missing path, like the fs calls it wraps.
|
|
64
|
+
*/
|
|
65
|
+
function isContainedRegularFile(rootPath, resolved) {
|
|
66
|
+
if (!isSubpath(rootPath, resolved) || !fs.lstatSync(resolved).isFile()) return false;
|
|
67
|
+
return isSubpath(fs.realpathSync(rootPath), fs.realpathSync(resolved));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function safeRelativePath(value, label) {
|
|
71
|
+
if (typeof value !== 'string' || !value.startsWith('./')) {
|
|
72
|
+
throw new Error(`${label} must be a ./ relative path`);
|
|
73
|
+
}
|
|
74
|
+
const relative = value.slice(2);
|
|
75
|
+
if (!relative || path.posix.normalize(relative) !== relative || relative.startsWith('../') || path.isAbsolute(relative)) {
|
|
76
|
+
throw new Error(`${label} is not a safe plugin-relative path: ${value}`);
|
|
77
|
+
}
|
|
78
|
+
return relative;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function regularFile(root, relative, label) {
|
|
82
|
+
const rootPath = path.resolve(root);
|
|
83
|
+
const resolved = path.resolve(rootPath, relative);
|
|
84
|
+
if (!isSubpath(rootPath, resolved)) throw new Error(`${label} escapes plugin root: ${relative}`);
|
|
85
|
+
try {
|
|
86
|
+
if (isContainedRegularFile(rootPath, resolved)) return relative;
|
|
87
|
+
} catch {
|
|
88
|
+
// Fall through to one bounded diagnostic.
|
|
89
|
+
}
|
|
90
|
+
throw new Error(`${label} is missing or not a regular file: ${relative}`);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function validatePluginEntrypoints(root) {
|
|
94
|
+
const packageJson = JSON.parse(fs.readFileSync(path.join(root, 'package.json'), 'utf8'));
|
|
95
|
+
const targets = [];
|
|
96
|
+
for (const [relativeManifest, expectedPrefix] of [
|
|
97
|
+
['.claude-plugin/plugin.json', '${CLAUDE_PLUGIN_ROOT}/'],
|
|
98
|
+
['.codex-plugin/plugin.json', './'],
|
|
99
|
+
]) {
|
|
100
|
+
regularFile(root, relativeManifest, relativeManifest);
|
|
101
|
+
const plugin = JSON.parse(fs.readFileSync(path.join(root, relativeManifest), 'utf8'));
|
|
102
|
+
if (plugin.name !== 'memesh') throw new Error(`${relativeManifest} has unexpected plugin name`);
|
|
103
|
+
if (plugin.version !== packageJson.version) throw new Error(`${relativeManifest} version does not match package.json`);
|
|
104
|
+
const mcpManifest = safeRelativePath(plugin.mcpServers, `${relativeManifest} mcpServers`);
|
|
105
|
+
regularFile(root, mcpManifest, `${relativeManifest} mcpServers`);
|
|
106
|
+
targets.push({ kind: 'manifest', relative: relativeManifest });
|
|
107
|
+
targets.push({ kind: 'manifest', relative: mcpManifest });
|
|
108
|
+
const manifest = JSON.parse(fs.readFileSync(path.join(root, mcpManifest), 'utf8'));
|
|
109
|
+
const entry = manifest.mcpServers?.memesh;
|
|
110
|
+
if (!entry || entry.command !== 'node' || !Array.isArray(entry.args) || typeof entry.args[0] !== 'string') {
|
|
111
|
+
throw new Error(`${mcpManifest} has no valid mcpServers.memesh node entry`);
|
|
112
|
+
}
|
|
113
|
+
const rawTarget = entry.args[0];
|
|
114
|
+
if (!rawTarget.startsWith(expectedPrefix)) {
|
|
115
|
+
throw new Error(`${mcpManifest} entry must start with ${expectedPrefix}`);
|
|
116
|
+
}
|
|
117
|
+
const target = rawTarget.slice(expectedPrefix.length);
|
|
118
|
+
if (path.posix.normalize(target) !== target || target.startsWith('../') || path.isAbsolute(target)) {
|
|
119
|
+
throw new Error(`${mcpManifest} entry is not a safe plugin-relative path: ${rawTarget}`);
|
|
120
|
+
}
|
|
121
|
+
regularFile(root, target, `${mcpManifest} entrypoint`);
|
|
122
|
+
targets.push({ kind: 'entrypoint', relative: target });
|
|
123
|
+
}
|
|
124
|
+
return { targets };
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function validateArtifactPaths(targets, files) {
|
|
128
|
+
const shipped = new Set(files.map((file) => typeof file === 'string' ? file : file.path));
|
|
129
|
+
const missing = targets.filter((target) => !shipped.has(target.relative));
|
|
130
|
+
return { missing, ok: missing.length === 0 };
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function packFiles(root) {
|
|
134
|
+
const npmCache = fs.mkdtempSync(path.join(os.tmpdir(), 'memesh-pack-cache-'));
|
|
135
|
+
try {
|
|
136
|
+
const stdout = npmSync(['pack', '--dry-run', '--json', '--ignore-scripts'], {
|
|
137
|
+
cwd: root,
|
|
138
|
+
encoding: 'utf8',
|
|
139
|
+
env: envWithNpmCache(npmCache),
|
|
140
|
+
});
|
|
141
|
+
let report;
|
|
142
|
+
try { report = JSON.parse(String(stdout)); } catch { throw new Error('npm pack --dry-run did not return valid JSON'); }
|
|
143
|
+
const entry = Array.isArray(report) ? report[0] : report;
|
|
144
|
+
if (!entry || !Array.isArray(entry.files)) throw new Error('npm pack --dry-run returned no file list');
|
|
145
|
+
return entry.files;
|
|
146
|
+
} catch (error) {
|
|
147
|
+
if (error instanceof Error && /npm pack --dry-run (?:did not return|returned no)/.test(error.message)) throw error;
|
|
148
|
+
const record = error && typeof error === 'object' ? /** @type {Record<string, unknown>} */ (error) : {};
|
|
149
|
+
const status = typeof record.status === 'number' ? record.status : 'unknown';
|
|
150
|
+
const stderr = typeof record.stderr === 'string' ? record.stderr.trim() : '';
|
|
151
|
+
throw new Error(
|
|
152
|
+
`npm pack --dry-run failed (exit ${status}): ${stderr || (error instanceof Error ? error.message : String(error))}`,
|
|
153
|
+
{ cause: error },
|
|
154
|
+
);
|
|
155
|
+
} finally {
|
|
156
|
+
fs.rmSync(npmCache, { recursive: true, force: true });
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export function checkPluginHookArtifact(root, { checkPack = true } = {}) {
|
|
161
|
+
const source = validateHookTargets(root);
|
|
162
|
+
const plugin = validatePluginEntrypoints(root);
|
|
163
|
+
const allTargets = [...source.targets, ...plugin.targets];
|
|
164
|
+
if (!checkPack) return { ...source, plugin, artifact: null };
|
|
165
|
+
return { ...source, plugin, artifact: validateArtifactPaths(allTargets, packFiles(root)) };
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
function main(argv) {
|
|
169
|
+
const rootIndex = argv.indexOf('--root');
|
|
170
|
+
if (rootIndex !== -1 && (!argv[rootIndex + 1] || argv[rootIndex + 1].startsWith('--'))) {
|
|
171
|
+
console.error('plugin hook integrity: --root requires a directory argument');
|
|
172
|
+
process.exit(2);
|
|
173
|
+
}
|
|
174
|
+
const root = path.resolve(rootIndex === -1 ? process.cwd() : argv[rootIndex + 1]);
|
|
175
|
+
const checkPack = !argv.includes('--skip-pack');
|
|
176
|
+
try {
|
|
177
|
+
const result = checkPluginHookArtifact(root, { checkPack });
|
|
178
|
+
if (!result.ok) {
|
|
179
|
+
for (const item of result.missing) console.error(`Missing hook target: ${item.event} -> ${item.resolved}`);
|
|
180
|
+
process.exit(1);
|
|
181
|
+
}
|
|
182
|
+
if (result.artifact && !result.artifact.ok) {
|
|
183
|
+
for (const item of result.artifact.missing) console.error(`Target omitted from npm artifact: ${item.event ?? item.kind} -> ${item.relative}`);
|
|
184
|
+
process.exit(1);
|
|
185
|
+
}
|
|
186
|
+
console.log(`plugin artifact integrity: PASS (${result.targets.length} hook targets, ${result.plugin.targets.length} plugin/MCP targets${checkPack ? ', npm artifact checked' : ''})`);
|
|
187
|
+
} catch (error) {
|
|
188
|
+
console.error(`plugin hook integrity: ${error instanceof Error ? error.message : String(error)}`);
|
|
189
|
+
process.exit(1);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Run `main` only when this file is the entrypoint. Both sides go through
|
|
195
|
+
* realpath: Node resolves symlinks in `import.meta.url` but not in argv[1],
|
|
196
|
+
* so `node /var/folders/.../check-plugin-hook-artifact.mjs` (macOS tmp is a
|
|
197
|
+
* symlink) compared unequal, skipped `main`, and exited 0 with no output — a
|
|
198
|
+
* silent PASS from a checker that had checked nothing. Pinned by the tarball
|
|
199
|
+
* test in tests/plugin-hook-artifact.test.ts, which asserts on the output.
|
|
200
|
+
*/
|
|
201
|
+
function isEntrypoint(argv1) {
|
|
202
|
+
if (!argv1) return false;
|
|
203
|
+
const self = fileURLToPath(import.meta.url);
|
|
204
|
+
const given = path.resolve(argv1);
|
|
205
|
+
if (self === given) return true;
|
|
206
|
+
// A realpath failure must not become "not the entrypoint": that is exit 0
|
|
207
|
+
// with nothing checked, the fail-closed guard's caller only reads the exit
|
|
208
|
+
// code, and a staged plugin would swap in unverified. Let it throw.
|
|
209
|
+
return fs.realpathSync(self) === fs.realpathSync(given);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
if (isEntrypoint(process.argv[1])) main(process.argv.slice(2));
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// AUTO-GENERATED from src/core/briefing-index.ts — DO NOT EDIT BY HAND.
|
|
3
|
+
// Regenerate with: npm run build (scripts/generate-hook-core.mjs)
|
|
4
|
+
//
|
|
5
|
+
// Claude Code hooks import this committed copy instead of dist/, so the
|
|
6
|
+
// always-on capture path survives a missing or stale dist/ while staying
|
|
7
|
+
// byte-locked to core — eliminating the hand-mirror drift behind the P0 FTS bug.
|
|
8
|
+
// ============================================================================
|
|
9
|
+
import { redactSecrets, redactUserPaths } from './core-paths.js';
|
|
10
|
+
import { EVIDENCE_LAYER_TYPES, isAutoInjectable, topologyLine } from './work-topology.js';
|
|
11
|
+
export const INDEX_MAX_LINES = 40;
|
|
12
|
+
export const INDEX_MAX_BYTES = 3072;
|
|
13
|
+
export const INDEX_STALE_DAYS = 180;
|
|
14
|
+
export const INDEX_LINE_MAX_CHARS = 120;
|
|
15
|
+
export const INDEX_SNIPPET_FETCH_CHARS = 4000;
|
|
16
|
+
export const INDEX_CANDIDATE_CAP = 2000;
|
|
17
|
+
export const INDEX_EXCLUDED_TYPES = [...EVIDENCE_LAYER_TYPES, 'task-state'];
|
|
18
|
+
export function isIndexableType(type) {
|
|
19
|
+
return !INDEX_EXCLUDED_TYPES.includes(type || 'memory');
|
|
20
|
+
}
|
|
21
|
+
const DAY_MS = 24 * 60 * 60 * 1000;
|
|
22
|
+
function byteLength(text) {
|
|
23
|
+
return new TextEncoder().encode(text).length;
|
|
24
|
+
}
|
|
25
|
+
function sectionBytes(lines) {
|
|
26
|
+
return lines.reduce((sum, line) => sum + byteLength(line) + 1, 0);
|
|
27
|
+
}
|
|
28
|
+
function parseActivity(value) {
|
|
29
|
+
if (!value)
|
|
30
|
+
return Number.NaN;
|
|
31
|
+
const iso = /[zZ]|[+-]\d\d:?\d\d$/.test(value) ? value : `${value.replace(' ', 'T')}Z`;
|
|
32
|
+
return Date.parse(iso);
|
|
33
|
+
}
|
|
34
|
+
function compareIndexCandidates(a, b) {
|
|
35
|
+
const at = parseActivity(a.lastActivity);
|
|
36
|
+
const bt = parseActivity(b.lastActivity);
|
|
37
|
+
const av = Number.isNaN(at) ? -Infinity : at;
|
|
38
|
+
const bv = Number.isNaN(bt) ? -Infinity : bt;
|
|
39
|
+
if (av !== bv)
|
|
40
|
+
return bv - av;
|
|
41
|
+
return b.id - a.id;
|
|
42
|
+
}
|
|
43
|
+
function candidateIsAutoInjectable(metadata) {
|
|
44
|
+
if (metadata == null)
|
|
45
|
+
return true;
|
|
46
|
+
if (typeof metadata === 'string') {
|
|
47
|
+
let parsed;
|
|
48
|
+
try {
|
|
49
|
+
parsed = JSON.parse(metadata);
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
return parsed !== null && typeof parsed === 'object' && isAutoInjectable(parsed);
|
|
55
|
+
}
|
|
56
|
+
return isAutoInjectable(metadata);
|
|
57
|
+
}
|
|
58
|
+
function redact(text) {
|
|
59
|
+
if (!text)
|
|
60
|
+
return '';
|
|
61
|
+
return redactUserPaths(redactSecrets(String(text))).replace(/\s+/g, ' ').trim();
|
|
62
|
+
}
|
|
63
|
+
function indexLine(candidate) {
|
|
64
|
+
const title = redact(candidate.title);
|
|
65
|
+
const snippet = redact(candidate.snippet);
|
|
66
|
+
const repeats = title && snippet && snippet.toLowerCase().startsWith(title.replace(/…$/, '').toLowerCase());
|
|
67
|
+
const text = title && snippet && !repeats ? `${title} — ${snippet}` : (title || snippet);
|
|
68
|
+
return topologyLine({ name: String(candidate.id), id: candidate.id, type: candidate.type || 'memory', title: text || null }, INDEX_LINE_MAX_CHARS);
|
|
69
|
+
}
|
|
70
|
+
function indexHeading(projectName) {
|
|
71
|
+
return `Index of durable memories for "${projectName}" (newest first):`;
|
|
72
|
+
}
|
|
73
|
+
function indexEmptyLine(projectName) {
|
|
74
|
+
return `- No durable memories (decisions, lessons, patterns, references) for "${projectName}" yet.`;
|
|
75
|
+
}
|
|
76
|
+
function moreLine(n, truncated) {
|
|
77
|
+
return `- ${n}${truncated ? '+' : ''} more — memesh recall --tag "project:…"`;
|
|
78
|
+
}
|
|
79
|
+
function olderLine(n, truncated) {
|
|
80
|
+
return `- ${n}${truncated ? '+' : ''} older memor${n === 1 ? 'y' : 'ies'} (no change in ${INDEX_STALE_DAYS} days) — recall to see`;
|
|
81
|
+
}
|
|
82
|
+
function footerLine(shown, bytes, tokens) {
|
|
83
|
+
return `(index cost: ${shown} line${shown === 1 ? '' : 's'}, ${bytes} bytes ≈ ${tokens} tokens; cap ${INDEX_MAX_LINES} lines / ${INDEX_MAX_BYTES} bytes)`;
|
|
84
|
+
}
|
|
85
|
+
function closeWithFooter(lines, shown) {
|
|
86
|
+
const above = sectionBytes(lines);
|
|
87
|
+
let footer = footerLine(shown, above, Math.ceil(above / 4));
|
|
88
|
+
for (let step = 0; step < 8; step++) {
|
|
89
|
+
const bytes = above + byteLength(footer) + 1;
|
|
90
|
+
const tokens = Math.ceil(bytes / 4);
|
|
91
|
+
const next = footerLine(shown, bytes, tokens);
|
|
92
|
+
if (next === footer)
|
|
93
|
+
return { lines: [...lines, footer], bytes, tokens };
|
|
94
|
+
footer = next;
|
|
95
|
+
}
|
|
96
|
+
throw new Error('briefing index: the footer cost did not converge');
|
|
97
|
+
}
|
|
98
|
+
export function buildBriefingIndex(candidates, projectName, now, options = {}) {
|
|
99
|
+
const truncated = options.truncated === true;
|
|
100
|
+
const cutoff = now - INDEX_STALE_DAYS * DAY_MS;
|
|
101
|
+
const eligible = candidates
|
|
102
|
+
.filter((c) => isIndexableType(c.type) && candidateIsAutoInjectable(c.metadata))
|
|
103
|
+
.slice()
|
|
104
|
+
.sort(compareIndexCandidates);
|
|
105
|
+
const current = [];
|
|
106
|
+
let older = 0;
|
|
107
|
+
for (const c of eligible) {
|
|
108
|
+
const at = parseActivity(c.lastActivity);
|
|
109
|
+
if (!Number.isNaN(at) && at < cutoff)
|
|
110
|
+
older++;
|
|
111
|
+
else
|
|
112
|
+
current.push(c);
|
|
113
|
+
}
|
|
114
|
+
const heading = indexHeading(projectName);
|
|
115
|
+
if (current.length === 0 && older === 0) {
|
|
116
|
+
const closed = closeWithFooter([heading, indexEmptyLine(projectName)], 0);
|
|
117
|
+
return { ...closed, shown: 0, more: 0, older: 0, truncated, ids: [] };
|
|
118
|
+
}
|
|
119
|
+
const reserve = sectionBytes([
|
|
120
|
+
moreLine(current.length, truncated),
|
|
121
|
+
olderLine(older, truncated),
|
|
122
|
+
footerLine(INDEX_MAX_LINES, INDEX_MAX_BYTES, INDEX_MAX_BYTES),
|
|
123
|
+
]);
|
|
124
|
+
const budget = INDEX_MAX_BYTES - reserve - sectionBytes([heading]);
|
|
125
|
+
const rendered = [];
|
|
126
|
+
const ids = [];
|
|
127
|
+
let used = 0;
|
|
128
|
+
for (const c of current) {
|
|
129
|
+
if (rendered.length >= INDEX_MAX_LINES)
|
|
130
|
+
break;
|
|
131
|
+
const line = indexLine(c);
|
|
132
|
+
const cost = byteLength(line) + 1;
|
|
133
|
+
if (used + cost > budget)
|
|
134
|
+
break;
|
|
135
|
+
rendered.push(line);
|
|
136
|
+
ids.push(c.id);
|
|
137
|
+
used += cost;
|
|
138
|
+
}
|
|
139
|
+
const more = current.length - rendered.length;
|
|
140
|
+
const above = [heading, ...rendered];
|
|
141
|
+
if (more > 0)
|
|
142
|
+
above.push(moreLine(more, truncated));
|
|
143
|
+
if (older > 0)
|
|
144
|
+
above.push(olderLine(older, truncated));
|
|
145
|
+
const closed = closeWithFooter(above, rendered.length);
|
|
146
|
+
return { ...closed, shown: rendered.length, more, older, truncated, ids };
|
|
147
|
+
}
|