sumo-agents 0.1.0 → 0.4.0
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/AGENTS.md +3 -2
- package/README.md +102 -611
- package/bin/sumo.mjs +3 -1
- package/guides/delegation.md +8 -7
- package/package.json +3 -2
- package/prompts/agent.md +3 -3
- package/prompts/dream.md +1 -0
- package/prompts/scribe.md +1 -0
- package/src/apply.mjs +79 -19
- package/src/card.mjs +11 -6
- package/src/chat.mjs +318 -54
- package/src/cli.mjs +120 -31
- package/src/cost.mjs +128 -0
- package/src/db.mjs +40 -1
- package/src/editor.mjs +110 -9
- package/src/export.mjs +1 -1
- package/src/herdr.mjs +5 -2
- package/src/hooks.mjs +13 -3
- package/src/jobs.mjs +606 -59
- package/src/jobtools.mjs +10 -7
- package/src/loop.mjs +358 -53
- package/src/mcp.mjs +44 -14
- package/src/memory.mjs +39 -4
- package/src/model.mjs +6 -5
- package/src/page.mjs +3 -1
- package/src/paths.mjs +9 -2
- package/src/prime.mjs +14 -5
- package/src/projects.mjs +18 -0
- package/src/render.mjs +1 -0
- package/src/route.mjs +110 -12
- package/src/sandbox.mjs +173 -0
- package/src/scribe.mjs +7 -5
- package/src/sessions.mjs +12 -8
- package/src/setup.mjs +76 -7
- package/src/sqlite.mjs +66 -0
- package/src/text.mjs +8 -3
- package/src/tools.mjs +562 -31
- package/src/tty.mjs +293 -43
- package/src/ui.mjs +507 -98
- package/src/verify.mjs +51 -8
- package/src/worktree.mjs +128 -0
package/bin/sumo.mjs
CHANGED
|
@@ -3,8 +3,10 @@ import tls from 'node:tls';
|
|
|
3
3
|
|
|
4
4
|
// Node reads the environment setting at startup. Add system CAs to this process
|
|
5
5
|
// before loading the CLI, and enable the startup setting for its descendants.
|
|
6
|
+
// Bun has no setDefaultCACertificates: the binary it builds is started with
|
|
7
|
+
// --use-system-ca instead (scripts/build-bin.mjs).
|
|
6
8
|
process.env.NODE_USE_SYSTEM_CA = '1';
|
|
7
|
-
tls.setDefaultCACertificates([
|
|
9
|
+
tls.setDefaultCACertificates?.([
|
|
8
10
|
...tls.getCACertificates('default'),
|
|
9
11
|
...tls.getCACertificates('system'),
|
|
10
12
|
]);
|
package/guides/delegation.md
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
# Delegation
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
and its report is the result.
|
|
3
|
+
One `delegate` call: a brief and a fresh context, on its own route; its report is the result.
|
|
5
4
|
|
|
6
|
-
**Who.** `scout` (no edit tools): finding, tracing, auditing,
|
|
5
|
+
**Who.** `scout` (no edit tools): finding, tracing, auditing, web lookups — cheapest; tracing, not judging → say
|
|
7
6
|
"describe only". `worker`: building and fixing. `reviewer` (no edit tools): judging a change it did not
|
|
8
7
|
write (`reviews`: the worker job; without it, the uncommitted change). The local router picks every route; if it fails, no job exists — tell the user.
|
|
9
8
|
|
|
@@ -19,14 +18,16 @@ Rules and commands come from memory. One job = the smallest piece with its own c
|
|
|
19
18
|
feature carries that guide in. Existing tests must change → `tests_may_change`.
|
|
20
19
|
|
|
21
20
|
**2. Several at once.** Independent pieces → several `delegate` calls in one reply; they run side by side
|
|
22
|
-
and each result arrives when its job ends.
|
|
21
|
+
and each result arrives when its job ends. A second worker on a git project gets its own worktree.
|
|
22
|
+
Hard, with a check → `attempts: 2` or 3: the best verified is kept (2–3× the cost).
|
|
23
23
|
|
|
24
24
|
**3. The result:** a STATUS line, the cost, then the report. A worker's DONE means code ran the project's
|
|
25
25
|
checks against a baseline; `UNVERIFIED` or `look at:` → read the report closely. Relay its Concerns and
|
|
26
26
|
Decisions. Work that matters → a reviewer with `reviews`, then guides/review.md.
|
|
27
27
|
No STATUS (`never closed`) → `sumo job finish <id> --status DONE|FAILED` from its report.
|
|
28
|
-
|
|
28
|
+
Code retries a failed first attempt once, a step up, and reviews risky work.
|
|
29
|
+
Failed again, or `important >= 3` → `sumo job retry <id>`, then `delegate` with that `job`.
|
|
29
30
|
|
|
30
|
-
**A job from an earlier session
|
|
31
|
-
`delegate` with only `job`: it
|
|
31
|
+
**A job from an earlier session:** `sumo job show <id>`. Worth finishing →
|
|
32
|
+
`delegate` with only `job`: it resumes from its brief and notes. Not worth it → `sumo job abandon <id>`.
|
|
32
33
|
Stopped on a question (rare): `sumo search` first, else ask the user once → `sumo job answer <id>`, then `delegate` with `job`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sumo-agents",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "One repo you talk to: a local memory engine and working process for coding agents.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
"node": "^22.19.0 || >=24.6.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
|
-
"test": "node --disable-warning=ExperimentalWarning --test \"test/*.test.mjs\""
|
|
36
|
+
"test": "node --disable-warning=ExperimentalWarning --test \"test/*.test.mjs\"",
|
|
37
|
+
"build:bin": "node scripts/build-bin.mjs"
|
|
37
38
|
},
|
|
38
39
|
"dependencies": {
|
|
39
40
|
"@anthropic-ai/sdk": "^0.131.0",
|
package/prompts/agent.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
You work inside one project on the user's machine, on the job whose brief follows: do what it asks, no more
|
|
1
|
+
You work inside one project on the user's machine, on the job whose brief follows: do what it asks, no more.
|
|
2
2
|
|
|
3
3
|
Tools: `bash` runs in the project directory, a fresh shell each call — a cd, an export, or `set -a; source .env; set +a` goes in the command that needs it; `str_replace_based_edit_tool` views and edits files — change the lines that change, never a whole file. Absolute paths. Grep first, then view a line range, then callers; whole files only when small. Output is capped: narrow the command, do not page.
|
|
4
4
|
|
|
5
|
-
Your shell has the user's environment: use a secret a check needs, never print it. Some commands are refused
|
|
5
|
+
Your shell has the user's environment: use a secret a check needs, never print it. Some commands are refused (wiping trees, resetting history, printing secrets or the whole environment), and writes outside your project are blocked. A refusal is final: carry on another way, or say so in the report.
|
|
6
6
|
|
|
7
|
-
Every message and the report: short, facts only, no preamble. When the work is done
|
|
7
|
+
Every message and the report: short, facts only, each backed by a tool result from this run; no preamble. When the work is done or cannot be, close the job with `finish` and stop.
|
package/prompts/dream.md
CHANGED
|
@@ -8,5 +8,6 @@ Each conversation was already filed as it happened. Your job is only what become
|
|
|
8
8
|
- gotcha, checkpoint — only when one is clearly missing.
|
|
9
9
|
|
|
10
10
|
Write every `body` as one plain standing sentence. Scope: `project:<name>` when it is about that project or was said while working in it; `global` only for how the user wants things done everywhere.
|
|
11
|
+
`keys`: up to 6 search terms a memory is about that its `body` does not use (a rule about eslint: lint, linter), or [].
|
|
11
12
|
|
|
12
13
|
Be conservative: a wrong memory costs more than a missing one. Most passes change nothing. Then return {"ops": []}.
|
package/prompts/scribe.md
CHANGED
|
@@ -6,6 +6,7 @@ From the USER's turns only:
|
|
|
6
6
|
- add — a standing preference, rule, decision or durable fact the user stated. Supply `type`, `scope`, `topic`, `body`, `turn` and `quote`. `type` is preference (how they want things done), decision (a choice that was made, with its reason if given) or fact (something true about them, their setup or a project that the code itself cannot tell you).
|
|
7
7
|
- supersede — the same fields, plus `old`: the number of the existing memory it replaces.
|
|
8
8
|
One memory per statement: a sentence that gives three rules becomes three operations. `turn` is the N in [tN]; `quote` is an exact, contiguous run of words copied from that turn, long enough to be unmistakable. Write `body` as one plain standing sentence ("Never push to main; always open a pull request"), never as a report of the conversation ("the user said…").
|
|
9
|
+
`keys`: up to 6 search terms a memory is about that its `body` does not use (a rule about eslint: lint, linter), or [].
|
|
9
10
|
|
|
10
11
|
From the ASSISTANT's replies only:
|
|
11
12
|
- gotcha — a trap found while working that would cost time again: supply `scope` and `body`. Not what was built, and nothing the code or its tests already record.
|
package/src/apply.mjs
CHANGED
|
@@ -25,6 +25,16 @@ const SAME_STATEMENT = 0.8;
|
|
|
25
25
|
/** "use eslint for linting" / "use biome for linting": three words of four. Close enough to ask about, too different to call a repeat. */
|
|
26
26
|
const LOOKS_ALIKE = 0.7;
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* How much of memory the slow pass may retire in one go. A playbook a model was asked to rewrite whole shrank to a
|
|
30
|
+
* fraction of itself, and the agent did worse with it than with none. A few replacements a pass — a correction the user
|
|
31
|
+
* kept repeating — are its job; past either bound it is rewriting, and none of its replacements is taken.
|
|
32
|
+
*/
|
|
33
|
+
const MAX_RETIRED = 10;
|
|
34
|
+
const MAX_RETIRED_SHARE = 0.25;
|
|
35
|
+
/** What retires a memory. Everything else a pass may do only adds. */
|
|
36
|
+
const RETIRING = ['supersede'];
|
|
37
|
+
|
|
28
38
|
const OPS_BY_SOURCE = {
|
|
29
39
|
scribe: ['add', 'supersede', 'gotcha', 'checkpoint'],
|
|
30
40
|
dream: ['add', 'supersede', 'gotcha', 'checkpoint', 'contradiction', 'procedure'],
|
|
@@ -114,6 +124,12 @@ function lookalike(db, scope, body, exclude) {
|
|
|
114
124
|
return alike ? { memory: alike, same: false } : null;
|
|
115
125
|
}
|
|
116
126
|
|
|
127
|
+
/** A guess already put to the user in other words — still waiting, or refused: asked once is enough. */
|
|
128
|
+
function askedBefore(db, scope, body) {
|
|
129
|
+
const asked = db.prepare(`SELECT * FROM memories WHERE scope = ? AND type != 'procedure' AND state IN ('unconfirmed', 'rejected')`).all(scope);
|
|
130
|
+
return asked.find((m) => statementOf(m.body) !== statementOf(body) && overlap(body, m.body) >= LOOKS_ALIKE) ?? null;
|
|
131
|
+
}
|
|
132
|
+
|
|
117
133
|
/**
|
|
118
134
|
* The same sentence is often proposed twice from one turn — once by a retry, once by the chat model saving it directly.
|
|
119
135
|
* A repeat quotes the same words; two rules given in one sentence quote different ones, and are both kept.
|
|
@@ -161,6 +177,12 @@ function addStated(db, op, ctx, { supersedes } = {}) {
|
|
|
161
177
|
// No scope given: what was said in the middle of work on a project belongs to that project.
|
|
162
178
|
const focus = op.scope === undefined && turn ? currentProject(db, turn.session_id) : null;
|
|
163
179
|
const { scope, project } = resolveScope(db, focus ? `project:${focus}` : op.scope);
|
|
180
|
+
// Nor is a guess kept that shares nothing with the turn it names: that is the assistant's reply, or what is remembered already,
|
|
181
|
+
// said in the user's name. The slow pass alone may guess past that — a pattern across conversations is what it reads for.
|
|
182
|
+
const aboutTurn = ctx.source === 'dream' || (turn !== null && overlap(body, turn.text) >= BODY_MATCHES_TURN);
|
|
183
|
+
if (!verified && !aboutTurn) throw new Rejected(`a guess about nothing the user typed, not kept — ${why}`);
|
|
184
|
+
const asked = verified ? null : askedBefore(db, scope, body);
|
|
185
|
+
if (asked) throw new Rejected(`a guess like m${asked.id}, which is ${asked.state} — not kept`);
|
|
164
186
|
|
|
165
187
|
const again = savedFromTurn(db, turn?.id ?? null, scope, body, supersedes, op.quote);
|
|
166
188
|
if (again) throw new Rejected(`already saved from this turn as m${again.id}`);
|
|
@@ -186,6 +208,8 @@ function addStated(db, op, ctx, { supersedes } = {}) {
|
|
|
186
208
|
body,
|
|
187
209
|
project,
|
|
188
210
|
topic: typeof op.topic === 'string' ? op.topic : undefined,
|
|
211
|
+
// Search terms only, checked where they are stored: a bad one is dropped there, never the memory.
|
|
212
|
+
keys: op.keys,
|
|
189
213
|
provenance: verified ? 'stated' : 'inferred',
|
|
190
214
|
// A guess must never be able to hide something true: only a verified statement supersedes.
|
|
191
215
|
supersedes: verified ? supersedes : undefined,
|
|
@@ -231,9 +255,10 @@ const HANDLERS = {
|
|
|
231
255
|
gotcha(db, op, ctx) {
|
|
232
256
|
const body = cleanBody(op);
|
|
233
257
|
const { scope, project } = resolveScope(db, op.scope);
|
|
258
|
+
// A trap met twice is written up twice, in other words: the one already here stands for both.
|
|
234
259
|
const twin = lookalike(db, scope, body);
|
|
235
|
-
if (twin
|
|
236
|
-
const { memory: saved } = memory.add(db, { type: 'gotcha', body, project, provenance: 'observed', writtenBy: ctx.source, now: ctx.now });
|
|
260
|
+
if (twin) throw new Rejected(`already known as m${twin.memory.id}`);
|
|
261
|
+
const { memory: saved } = memory.add(db, { type: 'gotcha', body, project, keys: op.keys, provenance: 'observed', writtenBy: ctx.source, now: ctx.now });
|
|
237
262
|
return `saved ${line(saved)}`;
|
|
238
263
|
},
|
|
239
264
|
|
|
@@ -280,29 +305,64 @@ const HANDLERS = {
|
|
|
280
305
|
},
|
|
281
306
|
};
|
|
282
307
|
|
|
308
|
+
/** Each operation in turn. With `refused` — why — every one that would retire a memory is dropped for that reason. */
|
|
309
|
+
function applyEach(db, ops, ctx, refused = null) {
|
|
310
|
+
const applied = [];
|
|
311
|
+
const dropped = [];
|
|
312
|
+
const allowed = OPS_BY_SOURCE[ctx.source] ?? [];
|
|
313
|
+
for (const op of ops) {
|
|
314
|
+
const name = op?.op;
|
|
315
|
+
try {
|
|
316
|
+
if (!allowed.includes(name)) throw new Rejected(`operation "${name}" is not allowed from ${ctx.source}`);
|
|
317
|
+
if (refused && RETIRING.includes(name)) {
|
|
318
|
+
const old = idOf(op.old);
|
|
319
|
+
throw new Rejected(`${Number.isNaN(old) ? 'what it replaces' : `m${old}`} is left as it is — ${refused}`);
|
|
320
|
+
}
|
|
321
|
+
applied.push(HANDLERS[name](db, op, ctx));
|
|
322
|
+
} catch (cause) {
|
|
323
|
+
// Rejected and UsageError are verdicts on the model's suggestion; anything else is a bug and must surface.
|
|
324
|
+
if (!(cause instanceof Rejected) && !(cause instanceof memory.UsageError)) throw cause;
|
|
325
|
+
dropped.push(`${name ?? '?'}: ${cause.message}`);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
return { applied, dropped };
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
/** Why the memories retired since `before` (id → scope of every active memory then) are too many to take, or null. */
|
|
332
|
+
function tooWide(db, before) {
|
|
333
|
+
const still = new Set(db.prepare(`SELECT id FROM memories WHERE state = 'active'`).all().map((m) => m.id));
|
|
334
|
+
const retired = [...before].filter(([id]) => !still.has(id)).map(([, scope]) => scope);
|
|
335
|
+
const wide = ': a rewrite that wide is not taken from a model';
|
|
336
|
+
if (retired.length > MAX_RETIRED) return `this pass would retire ${retired.length} memories at once, more than ${MAX_RETIRED}${wide}`;
|
|
337
|
+
const had = [...before.values()];
|
|
338
|
+
for (const scope of new Set(retired)) {
|
|
339
|
+
const gone = retired.filter((s) => s === scope).length;
|
|
340
|
+
const total = had.filter((s) => s === scope).length;
|
|
341
|
+
// One at a time is never a rewrite: a scope of three must still be able to have one of them replaced.
|
|
342
|
+
if (gone > 1 && gone > total * MAX_RETIRED_SHARE) return `this pass would retire ${gone} of the ${total} memories in ${scope}, more than a quarter${wide}`;
|
|
343
|
+
}
|
|
344
|
+
return null;
|
|
345
|
+
}
|
|
346
|
+
|
|
283
347
|
/**
|
|
284
348
|
* @param ops what the model returned
|
|
285
349
|
* @param ctx.source 'scribe' | 'dream' — decides which operations are even allowed
|
|
286
350
|
* @param ctx.turns Map of turn id → user_turns row the model was shown
|
|
287
351
|
*/
|
|
288
352
|
export function applyOps(db, ops, ctx) {
|
|
289
|
-
|
|
290
|
-
const dropped = [];
|
|
291
|
-
if (!Array.isArray(ops)) return { applied, dropped: ['the answer had no list of operations'] };
|
|
292
|
-
const allowed = OPS_BY_SOURCE[ctx.source] ?? [];
|
|
353
|
+
if (!Array.isArray(ops)) return { applied: [], dropped: ['the answer had no list of operations'] };
|
|
293
354
|
|
|
294
|
-
tx(db, () => {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
355
|
+
return tx(db, () => {
|
|
356
|
+
if (ctx.source !== 'dream') return applyEach(db, ops, ctx);
|
|
357
|
+
// The slow pass's answer is tried first and counted, then kept or undone: what it would retire is known exactly
|
|
358
|
+
// that way — a replacement that is only a guess, or aimed at the wrong memory, retires nothing. Too wide, it is
|
|
359
|
+
// applied again without what retires anything, and what it adds is kept.
|
|
360
|
+
const before = new Map(db.prepare(`SELECT id, scope FROM memories WHERE state = 'active'`).all().map((m) => [m.id, m.scope]));
|
|
361
|
+
db.exec('SAVEPOINT dream_ops');
|
|
362
|
+
const tried = applyEach(db, ops, ctx);
|
|
363
|
+
const refused = tooWide(db, before);
|
|
364
|
+
if (refused) db.exec('ROLLBACK TO dream_ops');
|
|
365
|
+
db.exec('RELEASE dream_ops');
|
|
366
|
+
return refused ? applyEach(db, ops, ctx, refused) : tried;
|
|
306
367
|
});
|
|
307
|
-
return { applied, dropped };
|
|
308
368
|
}
|
package/src/card.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { markHits } from './memory.mjs';
|
|
1
2
|
import { aliasesOf, getProject, isScratch, scratchRules } from './projects.mjs';
|
|
2
3
|
import { clip, estimateTokens } from './text.mjs';
|
|
3
4
|
|
|
@@ -32,17 +33,18 @@ export function card(db, nameOrAlias, { budget = CARD_BUDGET_TOKENS, now = new D
|
|
|
32
33
|
|
|
33
34
|
const candidates = [];
|
|
34
35
|
let order = 0;
|
|
35
|
-
|
|
36
|
+
// A line that is a memory carries its id, so what the card shows can be counted as used.
|
|
37
|
+
const offer = (priority, text, id = null) => candidates.push({ priority, order: order++, text: clip(text, LINE_MAX), id });
|
|
36
38
|
|
|
37
|
-
for (const m of rows.filter((r) => r.scan_key)) offer(SCAN_PRIORITY[m.scan_key] ?? 11, m.body);
|
|
38
|
-
for (const m of rows.filter((r) => !r.scan_key && (r.type === 'preference' || r.type === 'decision'))) offer(PRIORITY.rule, `rule m${m.id}: ${m.body}
|
|
39
|
+
for (const m of rows.filter((r) => r.scan_key)) offer(SCAN_PRIORITY[m.scan_key] ?? 11, m.body, m.id);
|
|
40
|
+
for (const m of rows.filter((r) => !r.scan_key && (r.type === 'preference' || r.type === 'decision'))) offer(PRIORITY.rule, `rule m${m.id}: ${m.body}`, m.id);
|
|
39
41
|
|
|
40
42
|
const last = db.prepare('SELECT * FROM checkpoints WHERE project = ? ORDER BY ts DESC, id DESC LIMIT 1').get(project.slug);
|
|
41
43
|
if (last) offer(PRIORITY.last, `last (${ago(last.ts, now)}): ${last.done}${last.next_step ? ` → next: ${last.next_step}` : ''}`);
|
|
42
44
|
|
|
43
|
-
for (const m of rows.filter((r) => r.type === 'gotcha')) offer(PRIORITY.gotcha, `gotcha m${m.id}: ${m.body}
|
|
44
|
-
for (const m of rows.filter((r) => r.type === 'procedure')) offer(PRIORITY.workflow, `workflow m${m.id}: "${m.title}"${m.cue ? ` (when: ${m.cue})` : ''} — follow it: sumo show m${m.id}
|
|
45
|
-
for (const m of rows.filter((r) => !r.scan_key && r.type === 'fact')) offer(PRIORITY.fact, `fact m${m.id}: ${m.body}
|
|
45
|
+
for (const m of rows.filter((r) => r.type === 'gotcha')) offer(PRIORITY.gotcha, `gotcha m${m.id}: ${m.body}`, m.id);
|
|
46
|
+
for (const m of rows.filter((r) => r.type === 'procedure')) offer(PRIORITY.workflow, `workflow m${m.id}: "${m.title}"${m.cue ? ` (when: ${m.cue})` : ''} — follow it: sumo show m${m.id}`, m.id);
|
|
47
|
+
for (const m of rows.filter((r) => !r.scan_key && r.type === 'fact')) offer(PRIORITY.fact, `fact m${m.id}: ${m.body}`, m.id);
|
|
46
48
|
|
|
47
49
|
const aliases = aliasesOf(db, project.slug);
|
|
48
50
|
const header = `<project ${project.slug}${project.status === 'archived' ? ' (archived)' : ''}> ${project.path}${aliases.length ? ` · also called: ${aliases.join(', ')}` : ''}`;
|
|
@@ -61,6 +63,9 @@ export function card(db, nameOrAlias, { budget = CARD_BUDGET_TOKENS, now = new D
|
|
|
61
63
|
kept.push(line);
|
|
62
64
|
}
|
|
63
65
|
|
|
66
|
+
// What the card puts in front of someone is used; what it leaves out is not, and stays a search away.
|
|
67
|
+
markHits(db, kept.flatMap((l) => (l.id === null ? [] : [l.id])), now);
|
|
68
|
+
|
|
64
69
|
const dropped = candidates.length - kept.length;
|
|
65
70
|
const body = kept.sort((a, b) => a.priority - b.priority || a.order - b.order).map((l) => l.text);
|
|
66
71
|
return [header, ...body, ...(dropped > 0 ? [more(dropped)] : []), footer].join('\n');
|