aegiscode 7.0.26 → 7.0.27
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/SOURCE-OFFER.txt +9 -0
- package/package.json +4 -7
- package/scripts/check.mjs +1 -52
- package/scripts/demo.mjs +1 -94
- package/scripts/predist.mjs +1 -75
- package/scripts/runtests.mjs +1 -56
- package/scripts/seal-gate.mjs +1 -74
- package/src/agents.js +1 -139
- package/src/app.js +1 -2957
- package/src/art.js +1 -289
- package/src/chatflow.js +1 -3023
- package/src/checkpoint.js +1 -90
- package/src/clipboard.js +1 -424
- package/src/cloudsync.js +1 -528
- package/src/commands.js +1 -4089
- package/src/config.js +1 -581
- package/src/connect.js +1 -349
- package/src/credentials.js +1 -33
- package/src/deps.js +1 -232
- package/src/devrun.js +1 -187
- package/src/diff.js +1 -333
- package/src/diffview.js +1 -296
- package/src/engine.js +1 -297
- package/src/entitlement.js +1 -355
- package/src/events.js +1 -707
- package/src/export.js +1 -67
- package/src/filepreview.js +1 -153
- package/src/fingerprint.js +1 -592
- package/src/format.js +1 -259
- package/src/fuzzy.js +1 -119
- package/src/history.js +1 -423
- package/src/init.js +1 -175
- package/src/input.js +1 -139
- package/src/keys.js +1 -183
- package/src/markdown.js +1 -306
- package/src/models.js +1 -507
- package/src/naming.js +1 -57
- package/src/overlays.js +1 -462
- package/src/panels.js +1 -1418
- package/src/ping.js +1 -226
- package/src/presence.js +1 -238
- package/src/render.js +1 -516
- package/src/screen.js +1 -518
- package/src/screens.js +1 -896
- package/src/secret.js +1 -59
- package/src/securefs.js +1 -359
- package/src/settings.js +1 -155
- package/src/shared.js +1 -52
- package/src/sharedpaths.js +1 -53
- package/src/signup.js +1 -156
- package/src/summarize.js +1 -95
- package/src/sysdiag.js +1 -585
- package/src/system.js +1 -40
- package/src/theme.js +1 -570
- package/src/title.js +1 -220
- package/src/todos.js +1 -115
- package/src/tokens.js +1 -263
- package/src/topup.js +1 -210
- package/src/update.js +1 -191
- package/vendor/client/aegis.js +1 -2441
- package/vendor/client/attest.js +1 -518
- package/vendor/client/authorship-key.js +1 -410
- package/vendor/client/auto-provision.js +1 -134
- package/vendor/client/brain-catalog.js +1 -268
- package/vendor/client/byok-catalog.js +1 -199
- package/vendor/client/catalog-client.js +1 -487
- package/vendor/client/conversation-export.js +1 -177
- package/vendor/client/credentials.js +1 -494
- package/vendor/client/device-fingerprint.js +1 -141
- package/vendor/client/drive-connect.js +1 -110
- package/vendor/client/drive-upload.js +1 -234
- package/vendor/client/env-file.js +1 -1273
- package/vendor/client/fingerprint.js +1 -1064
- package/vendor/client/foreign-memory.js +1 -669
- package/vendor/client/google-signin.js +1 -133
- package/vendor/client/hooks.js +1 -430
- package/vendor/client/model-discovery.js +1 -373
- package/vendor/client/naming.js +1 -283
- package/vendor/client/platform.js +1 -937
- package/vendor/client/prefs.js +1 -351
- package/vendor/client/presence-constants.js +1 -107
- package/vendor/client/presence.js +1 -438
- package/vendor/client/record-vault.js +3 -1055
- package/vendor/client/session-store.js +1 -575
- package/vendor/client/topup.js +1 -297
- package/vendor/client/touch.js +1 -458
- package/vendor/client/update.js +1 -763
- package/vendor/client/user-models.js +1 -381
- package/vendor/desktop/lib/local/agents.js +1 -105
- package/vendor/desktop/lib/local/attachments.js +1 -276
- package/vendor/desktop/lib/local/autonomous.js +1 -1045
- package/vendor/desktop/lib/local/claude-pro.js +1 -1028
- package/vendor/desktop/lib/local/context.js +1 -125
- package/vendor/desktop/lib/local/engine.js +1 -3666
- package/vendor/desktop/lib/local/entitlement.js +1 -660
- package/vendor/desktop/lib/local/exec-plan.js +1 -269
- package/vendor/desktop/lib/local/git-scope.js +1 -228
- package/vendor/desktop/lib/local/integrity.js +1 -163
- package/vendor/desktop/lib/local/local.js +1 -2145
- package/vendor/desktop/lib/local/prompt.js +1 -280
- package/vendor/desktop/lib/local/queue.js +1 -560
- package/vendor/desktop/lib/local/session-rounds.js +1 -238
- package/vendor/desktop/lib/local/shell.js +1 -712
- package/vendor/desktop/lib/local/spill.js +1 -75
- package/vendor/desktop/lib/local/tools.js +1 -1328
- package/vendor/desktop/lib/local/turn-guard.js +1 -300
- package/vendor/desktop/lib/local/worktree-lock.js +1 -235
- package/vendor/desktop/lib/settings.js +1 -890
- package/vendor/desktop/main.js +3 -4890
- package/vendor/desktop/renderer/usage.js +1 -1239
- package/vendor/hosts/install.js +1 -638
- package/vendor/hosts/openai-shim.js +1 -515
- package/vendor/hosts/spec.js +1 -164
- package/vendor/hosts/targets.js +1 -346
- package/vendor/mcp/server.js +1 -221
- package/vendor/mcp/tools.js +1 -408
- package/vendor/one/src/child.js +1 -285
- package/vendor/one/src/permissions.js +1 -383
|
@@ -1,77 +1,3 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
2
|
// Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
|
|
3
|
-
|
|
4
|
-
// Conveying a modified copy, or running one as a network service, owes the
|
|
5
|
-
// corresponding source under this licence (§5/§13) — see LICENSING.md.
|
|
6
|
-
'use strict';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* spill.js — what an oversized tool result becomes instead of nothing.
|
|
10
|
-
*
|
|
11
|
-
* `tools.js` (readFile/grep/glob/exec-one-shot) and `shell.js` (the persistent
|
|
12
|
-
* session `exec`) each cut their output at OUTPUT_CAP. That was lossless for the
|
|
13
|
-
* model only as long as the answer was in the first 30 000 chars — and for the
|
|
14
|
-
* commands that overflow it usually is not: a wide grep, a full test log, a
|
|
15
|
-
* `find` over a big tree. The model's only recovery was to re-run a narrower
|
|
16
|
-
* command, which re-sends the whole prefix and bills a fresh round for
|
|
17
|
-
* information it had already paid to produce. Pi spilled the overflow to a file
|
|
18
|
-
* and told the model where it was; this is the same behaviour, in one place,
|
|
19
|
-
* because two copies would drift.
|
|
20
|
-
*
|
|
21
|
-
* Why it lives in its own module rather than in either caller: `shell.js` may
|
|
22
|
-
* not require `tools.js` (tools.js requires shell.js), so a shared helper is the
|
|
23
|
-
* only arrangement where both sides spill identically.
|
|
24
|
-
*
|
|
25
|
-
* Bounded on purpose — this is reachable from a tool call:
|
|
26
|
-
* · one temp dir per process (`mkdtemp`, 0700), lazily created;
|
|
27
|
-
* · at most SPILL_MAX_FILES files, after which `spill` returns null and the
|
|
28
|
-
* caller degrades to its old "… (truncated)" behaviour;
|
|
29
|
-
* · every failure path returns null rather than throwing, because this runs
|
|
30
|
-
* inside executors whose contract is "never throw".
|
|
31
|
-
*
|
|
32
|
-
* Cleanup is left to the OS temp reaper on purpose: a file the model may still
|
|
33
|
-
* read on the next round must not disappear when the turn ends (the queue and
|
|
34
|
-
* resume paths make "the turn" a fuzzy boundary), and a bounded set of 40 files
|
|
35
|
-
* per process in the temp dir is not a leak worth that risk.
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
const fs = require('node:fs');
|
|
39
|
-
const os = require('node:os');
|
|
40
|
-
const path = require('node:path');
|
|
41
|
-
|
|
42
|
-
const SPILL_MAX_FILES = 40;
|
|
43
|
-
|
|
44
|
-
let spillDir = null;
|
|
45
|
-
let spillCount = 0;
|
|
46
|
-
|
|
47
|
-
/** Write `text` to a fresh temp file and return its path, or null when
|
|
48
|
-
* spilling is unavailable (no cap left, no temp dir, read-only fs). */
|
|
49
|
-
function spill(text) {
|
|
50
|
-
try {
|
|
51
|
-
if (spillCount >= SPILL_MAX_FILES) return null;
|
|
52
|
-
if (!spillDir) spillDir = fs.mkdtempSync(path.join(os.tmpdir(), 'aegiscode-tool-'));
|
|
53
|
-
spillCount += 1;
|
|
54
|
-
const file = path.join(spillDir, `output-${spillCount}.txt`);
|
|
55
|
-
fs.writeFileSync(file, String(text), 'utf8');
|
|
56
|
-
return file;
|
|
57
|
-
} catch {
|
|
58
|
-
return null;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/** Cut `text` at `cap` chars, keeping the full text reachable on disk. The
|
|
63
|
-
* returned string stays within cap + ~200 chars so callers (and the tests in
|
|
64
|
-
* test/shell-buffer-bound.test.mjs) that budget on the cap keep their bound. */
|
|
65
|
-
function cap(text, limit) {
|
|
66
|
-
const s = String(text == null ? '' : text);
|
|
67
|
-
if (s.length <= limit) return s;
|
|
68
|
-
const head = s.slice(0, limit);
|
|
69
|
-
const file = spill(s);
|
|
70
|
-
if (!file) return `${head}\n… (truncated)`;
|
|
71
|
-
return (
|
|
72
|
-
`${head}\n… (truncated after ${limit} of ${s.length} chars — full output: ${file} ` +
|
|
73
|
-
`— grep or readFile that path)`
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
module.exports = { spill, cap, SPILL_MAX_FILES };
|
|
3
|
+
"use strict";const fs=require("node:fs"),os=require("node:os"),path=require("node:path"),SPILL_MAX_FILES=40;let spillDir=null,spillCount=0;function spill(t){try{if(spillCount>=SPILL_MAX_FILES)return null;spillDir||(spillDir=fs.mkdtempSync(path.join(os.tmpdir(),"aegiscode-tool-"))),spillCount+=1;const l=path.join(spillDir,`output-${spillCount}.txt`);return fs.writeFileSync(l,String(t),"utf8"),l}catch{return null}}function cap(t,l){const n=String(null==t?"":t);if(n.length<=l)return n;const i=n.slice(0,l),r=spill(n);return r?`${i}\n… (truncated after ${l} of ${n.length} chars — full output: ${r} — grep or readFile that path)`:`${i}\n… (truncated)`}module.exports={spill:spill,cap:cap,SPILL_MAX_FILES:SPILL_MAX_FILES};
|