aegiscode 7.0.14 → 7.0.15

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.
Files changed (109) hide show
  1. package/SOURCE-OFFER.txt +9 -0
  2. package/package.json +3 -2
  3. package/scripts/check.mjs +1 -52
  4. package/scripts/demo.mjs +1 -94
  5. package/scripts/predist.mjs +1 -75
  6. package/scripts/runtests.mjs +1 -56
  7. package/scripts/seal-gate.mjs +1 -74
  8. package/src/agents.js +1 -139
  9. package/src/app.js +1 -2932
  10. package/src/art.js +1 -289
  11. package/src/chatflow.js +1 -3020
  12. package/src/checkpoint.js +1 -90
  13. package/src/clipboard.js +1 -424
  14. package/src/cloudsync.js +1 -528
  15. package/src/commands.js +1 -4003
  16. package/src/config.js +1 -581
  17. package/src/connect.js +1 -349
  18. package/src/credentials.js +1 -33
  19. package/src/deps.js +1 -232
  20. package/src/devrun.js +1 -187
  21. package/src/diff.js +1 -333
  22. package/src/diffview.js +1 -296
  23. package/src/engine.js +1 -297
  24. package/src/entitlement.js +1 -355
  25. package/src/events.js +1 -707
  26. package/src/export.js +1 -67
  27. package/src/fingerprint.js +1 -592
  28. package/src/format.js +1 -259
  29. package/src/fuzzy.js +1 -119
  30. package/src/history.js +1 -401
  31. package/src/init.js +1 -175
  32. package/src/input.js +1 -139
  33. package/src/keys.js +1 -183
  34. package/src/markdown.js +1 -306
  35. package/src/models.js +1 -487
  36. package/src/naming.js +1 -229
  37. package/src/overlays.js +1 -461
  38. package/src/panels.js +1 -1418
  39. package/src/ping.js +1 -226
  40. package/src/presence.js +1 -238
  41. package/src/render.js +1 -515
  42. package/src/screen.js +1 -518
  43. package/src/screens.js +1 -896
  44. package/src/secret.js +1 -59
  45. package/src/securefs.js +1 -359
  46. package/src/settings.js +1 -155
  47. package/src/shared.js +1 -52
  48. package/src/sharedpaths.js +1 -53
  49. package/src/signup.js +1 -156
  50. package/src/summarize.js +1 -95
  51. package/src/sysdiag.js +1 -585
  52. package/src/system.js +1 -40
  53. package/src/theme.js +1 -570
  54. package/src/title.js +1 -220
  55. package/src/todos.js +1 -115
  56. package/src/tokens.js +1 -263
  57. package/src/topup.js +1 -210
  58. package/src/update.js +1 -181
  59. package/vendor/client/aegis.js +1 -2179
  60. package/vendor/client/attest.js +1 -442
  61. package/vendor/client/authorship-key.js +1 -410
  62. package/vendor/client/auto-provision.js +1 -134
  63. package/vendor/client/brain-catalog.js +1 -268
  64. package/vendor/client/byok-catalog.js +1 -230
  65. package/vendor/client/credentials.js +1 -494
  66. package/vendor/client/device-fingerprint.js +1 -141
  67. package/vendor/client/drive-connect.js +1 -110
  68. package/vendor/client/drive-upload.js +1 -174
  69. package/vendor/client/env-file.js +1 -1273
  70. package/vendor/client/fingerprint.js +1 -1064
  71. package/vendor/client/foreign-memory.js +1 -669
  72. package/vendor/client/google-signin.js +1 -133
  73. package/vendor/client/hooks.js +1 -430
  74. package/vendor/client/model-discovery.js +1 -373
  75. package/vendor/client/platform.js +1 -937
  76. package/vendor/client/prefs.js +1 -351
  77. package/vendor/client/presence-constants.js +1 -107
  78. package/vendor/client/presence.js +1 -438
  79. package/vendor/client/record-vault.js +3 -1055
  80. package/vendor/client/session-store.js +1 -548
  81. package/vendor/client/topup.js +1 -297
  82. package/vendor/client/touch.js +1 -458
  83. package/vendor/client/update.js +1 -704
  84. package/vendor/client/user-models.js +1 -381
  85. package/vendor/desktop/lib/local/agents.js +1 -105
  86. package/vendor/desktop/lib/local/autonomous.js +1 -1045
  87. package/vendor/desktop/lib/local/claude-pro.js +1 -993
  88. package/vendor/desktop/lib/local/context.js +1 -95
  89. package/vendor/desktop/lib/local/engine.js +1 -3301
  90. package/vendor/desktop/lib/local/entitlement.js +1 -660
  91. package/vendor/desktop/lib/local/git-scope.js +1 -228
  92. package/vendor/desktop/lib/local/local.js +1 -2135
  93. package/vendor/desktop/lib/local/prompt.js +1 -275
  94. package/vendor/desktop/lib/local/queue.js +1 -560
  95. package/vendor/desktop/lib/local/session-rounds.js +1 -208
  96. package/vendor/desktop/lib/local/shell.js +1 -680
  97. package/vendor/desktop/lib/local/tools.js +1 -1238
  98. package/vendor/desktop/lib/local/turn-guard.js +1 -300
  99. package/vendor/desktop/lib/local/worktree-lock.js +1 -235
  100. package/vendor/desktop/lib/settings.js +1 -890
  101. package/vendor/desktop/renderer/usage.js +1 -1239
  102. package/vendor/hosts/install.js +1 -638
  103. package/vendor/hosts/openai-shim.js +1 -515
  104. package/vendor/hosts/spec.js +1 -164
  105. package/vendor/hosts/targets.js +1 -346
  106. package/vendor/mcp/server.js +1 -221
  107. package/vendor/mcp/tools.js +1 -408
  108. package/vendor/one/src/child.js +1 -285
  109. package/vendor/one/src/permissions.js +1 -369
package/src/export.js CHANGED
@@ -1,69 +1,3 @@
1
1
  // SPDX-License-Identifier: AGPL-3.0-or-later
2
2
  // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
- // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
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
- * Transcript → markdown/json export for /export, and the last-response
10
- * extraction for /copy. Exports are written to the current directory (or the
11
- * clipboard) and the resulting path is reported in the transcript.
12
- *
13
- * Ported from the upstream engine reference (ESM → CommonJS). Output strings
14
- * (the # Aegiscodex session header, the ## Claude / ## User role headers, the
15
- * aegiscodex-export- filename) are kept as in the reference.
16
- */
17
-
18
- const fs = require('node:fs');
19
- const path = require('node:path');
20
-
21
- /** Render the transcript as a markdown document. */
22
- function transcriptToMarkdown(transcript) {
23
- const lines = ['# Aegiscodex session', '', `> exported ${new Date().toISOString()}`, ''];
24
- for (const m of transcript) {
25
- const text = (m.text || '').replace(/\n{3,}/g, '\n\n').trim();
26
- if (m.role === 'user') lines.push(`## User\n\n${text || '_(empty)_'}`, '');
27
- else if (m.role === 'assistant') lines.push(`## Claude\n\n${text || '_(empty)_'}`, '');
28
- else if (m.role === 'note') lines.push(`> ${text}`, '');
29
- }
30
- return lines.join('\n');
31
- }
32
-
33
- /** Render the transcript as a JSON document (array of messages). */
34
- function transcriptToJSON(transcript) {
35
- const clean = transcript.map((m) => ({
36
- role: m.role,
37
- text: m.text || '',
38
- ...(m.tool ? { tool: m.tool } : {}),
39
- }));
40
- return JSON.stringify(clean, null, 2);
41
- }
42
-
43
- /**
44
- * Write exported text to a file. target: absolute path, 'clipboard' handled by
45
- * the caller (clipboard.js) — here we only do files.
46
- * Returns the absolute path written.
47
- */
48
- function writeExportFile(text, format, cwd = process.cwd()) {
49
- const ext = format === 'json' ? 'json' : 'md';
50
- const ts = new Date().toISOString().replace(/[:.]/g, '-').slice(0, 19);
51
- const name = `aegiscodex-export-${ts}.${ext}`;
52
- const p = path.join(cwd, name);
53
- fs.writeFileSync(p, text, 'utf8');
54
- return p;
55
- }
56
-
57
- /** The most recent assistant response (last N when given a count). */
58
- function lastAssistantText(transcript, count = 1) {
59
- const asst = transcript.filter((m) => m.role === 'assistant');
60
- const n = Math.max(1, Math.min(count, asst.length));
61
- return asst.slice(asst.length - n).map((m) => m.text || '').join('\n\n');
62
- }
63
-
64
- module.exports = {
65
- transcriptToMarkdown,
66
- transcriptToJSON,
67
- writeExportFile,
68
- lastAssistantText,
69
- };
3
+ const t=require("node:fs"),e=require("node:path");module.exports={transcriptToMarkdown:function(t){const e=["# Aegiscodex session","",`> exported ${(new Date).toISOString()}`,""];for(const n of t){const t=(n.text||"").replace(/\n{3,}/g,"\n\n").trim();"user"===n.role?e.push(`## User\n\n${t||"_(empty)_"}`,""):"assistant"===n.role?e.push(`## Claude\n\n${t||"_(empty)_"}`,""):"note"===n.role&&e.push(`> ${t}`,"")}return e.join("\n")},transcriptToJSON:function(t){const e=t.map((t=>({role:t.role,text:t.text||"",...t.tool?{tool:t.tool}:{}})));return JSON.stringify(e,null,2)},writeExportFile:function(n,o,r=process.cwd()){const s="json"===o?"json":"md",i=`aegiscodex-export-${(new Date).toISOString().replace(/[:.]/g,"-").slice(0,19)}.${s}`,l=e.join(r,i);return t.writeFileSync(l,n,"utf8"),l},lastAssistantText:function(t,e=1){const n=t.filter((t=>"assistant"===t.role)),o=Math.max(1,Math.min(e,n.length));return n.slice(n.length-o).map((t=>t.text||"")).join("\n\n")}};