aegisone 1.0.35 → 1.0.37

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 (152) hide show
  1. package/README.md +1 -1
  2. package/bin/aegis.js +1 -1
  3. package/package.json +1 -1
  4. package/scripts/predist.mjs +1 -1
  5. package/src/iface/paths.js +3 -0
  6. package/src/iface/pty.js +3 -0
  7. package/src/iface/update.js +3 -0
  8. package/src/iface/window.js +3 -0
  9. package/src/protocol.js +3 -0
  10. package/src/selfhost.js +3 -0
  11. package/vendor/cli/package.json +1 -1
  12. package/vendor/cli/vendor/desktop/lib/local/integrity.js +1 -1
  13. package/vendor/cli/vendor/desktop/main.js +67 -1
  14. package/vendor/cli/vendor/one/src/selfhost.js +3 -0
  15. package/vendor/desktop/lib/local/integrity.js +1 -1
  16. package/vendor/desktop/main.js +67 -1
  17. package/vendor/desktop/package.json +1 -1
  18. package/vendor/desktop/vendor/faces/cli/LICENSE +661 -0
  19. package/vendor/desktop/vendor/faces/cli/README.md +784 -0
  20. package/vendor/desktop/vendor/faces/cli/bin/aegiscode.js +20 -0
  21. package/vendor/desktop/vendor/faces/cli/package.json +44 -0
  22. package/vendor/desktop/vendor/faces/cli/scripts/check.mjs +4 -0
  23. package/vendor/desktop/vendor/faces/cli/scripts/demo.mjs +4 -0
  24. package/vendor/desktop/vendor/faces/cli/scripts/predist.mjs +4 -0
  25. package/vendor/desktop/vendor/faces/cli/scripts/runtests.mjs +4 -0
  26. package/vendor/desktop/vendor/faces/cli/scripts/seal-gate.mjs +3 -0
  27. package/vendor/desktop/vendor/faces/cli/src/agents.js +3 -0
  28. package/vendor/desktop/vendor/faces/cli/src/app.js +3 -0
  29. package/vendor/desktop/vendor/faces/cli/src/art.js +3 -0
  30. package/vendor/desktop/vendor/faces/cli/src/autonomous.js +3 -0
  31. package/vendor/desktop/vendor/faces/cli/src/caps.js +3 -0
  32. package/vendor/desktop/vendor/faces/cli/src/chatflow.js +3 -0
  33. package/vendor/desktop/vendor/faces/cli/src/checkpoint.js +3 -0
  34. package/vendor/desktop/vendor/faces/cli/src/clipboard.js +3 -0
  35. package/vendor/desktop/vendor/faces/cli/src/cloudsync.js +3 -0
  36. package/vendor/desktop/vendor/faces/cli/src/commands.js +3 -0
  37. package/vendor/desktop/vendor/faces/cli/src/config.js +3 -0
  38. package/vendor/desktop/vendor/faces/cli/src/connect.js +3 -0
  39. package/vendor/desktop/vendor/faces/cli/src/credentials.js +3 -0
  40. package/vendor/desktop/vendor/faces/cli/src/deps.js +3 -0
  41. package/vendor/desktop/vendor/faces/cli/src/devrun.js +3 -0
  42. package/vendor/desktop/vendor/faces/cli/src/diff.js +3 -0
  43. package/vendor/desktop/vendor/faces/cli/src/diffview.js +3 -0
  44. package/vendor/desktop/vendor/faces/cli/src/engine.js +3 -0
  45. package/vendor/desktop/vendor/faces/cli/src/entitlement.js +3 -0
  46. package/vendor/desktop/vendor/faces/cli/src/events.js +3 -0
  47. package/vendor/desktop/vendor/faces/cli/src/export.js +3 -0
  48. package/vendor/desktop/vendor/faces/cli/src/filepreview.js +3 -0
  49. package/vendor/desktop/vendor/faces/cli/src/fingerprint.js +3 -0
  50. package/vendor/desktop/vendor/faces/cli/src/format.js +3 -0
  51. package/vendor/desktop/vendor/faces/cli/src/fuzzy.js +3 -0
  52. package/vendor/desktop/vendor/faces/cli/src/gate.js +3 -0
  53. package/vendor/desktop/vendor/faces/cli/src/history.js +3 -0
  54. package/vendor/desktop/vendor/faces/cli/src/init.js +3 -0
  55. package/vendor/desktop/vendor/faces/cli/src/input.js +3 -0
  56. package/vendor/desktop/vendor/faces/cli/src/keys.js +3 -0
  57. package/vendor/desktop/vendor/faces/cli/src/limits.js +3 -0
  58. package/vendor/desktop/vendor/faces/cli/src/markdown.js +3 -0
  59. package/vendor/desktop/vendor/faces/cli/src/mcp.js +3 -0
  60. package/vendor/desktop/vendor/faces/cli/src/models.js +3 -0
  61. package/vendor/desktop/vendor/faces/cli/src/naming.js +3 -0
  62. package/vendor/desktop/vendor/faces/cli/src/overlays.js +3 -0
  63. package/vendor/desktop/vendor/faces/cli/src/panels.js +3 -0
  64. package/vendor/desktop/vendor/faces/cli/src/permissions.js +3 -0
  65. package/vendor/desktop/vendor/faces/cli/src/ping.js +3 -0
  66. package/vendor/desktop/vendor/faces/cli/src/presence.js +3 -0
  67. package/vendor/desktop/vendor/faces/cli/src/provenance.js +58 -0
  68. package/vendor/desktop/vendor/faces/cli/src/provenance.lock.json +36 -0
  69. package/vendor/desktop/vendor/faces/cli/src/render.js +3 -0
  70. package/vendor/desktop/vendor/faces/cli/src/screen.js +3 -0
  71. package/vendor/desktop/vendor/faces/cli/src/screens.js +3 -0
  72. package/vendor/desktop/vendor/faces/cli/src/secret.js +3 -0
  73. package/vendor/desktop/vendor/faces/cli/src/securefs.js +3 -0
  74. package/vendor/desktop/vendor/faces/cli/src/settings.js +3 -0
  75. package/vendor/desktop/vendor/faces/cli/src/shared.js +3 -0
  76. package/vendor/desktop/vendor/faces/cli/src/sharedpaths.js +3 -0
  77. package/vendor/desktop/vendor/faces/cli/src/signup.js +3 -0
  78. package/vendor/desktop/vendor/faces/cli/src/summarize.js +3 -0
  79. package/vendor/desktop/vendor/faces/cli/src/sysdiag.js +3 -0
  80. package/vendor/desktop/vendor/faces/cli/src/system.js +3 -0
  81. package/vendor/desktop/vendor/faces/cli/src/theme.js +3 -0
  82. package/vendor/desktop/vendor/faces/cli/src/title.js +3 -0
  83. package/vendor/desktop/vendor/faces/cli/src/todos.js +3 -0
  84. package/vendor/desktop/vendor/faces/cli/src/tokens.js +3 -0
  85. package/vendor/desktop/vendor/faces/cli/src/topup.js +3 -0
  86. package/vendor/desktop/vendor/faces/cli/src/update.js +3 -0
  87. package/vendor/desktop/vendor/faces/cli/vendor/client/aegis.js +4 -0
  88. package/vendor/desktop/vendor/faces/cli/vendor/client/attest.js +3 -0
  89. package/vendor/desktop/vendor/faces/cli/vendor/client/authorship-key.js +3 -0
  90. package/vendor/desktop/vendor/faces/cli/vendor/client/auto-provision.js +3 -0
  91. package/vendor/desktop/vendor/faces/cli/vendor/client/brain-catalog.js +3 -0
  92. package/vendor/desktop/vendor/faces/cli/vendor/client/byok-catalog.js +3 -0
  93. package/vendor/desktop/vendor/faces/cli/vendor/client/catalog-client.js +3 -0
  94. package/vendor/desktop/vendor/faces/cli/vendor/client/conversation-export.js +3 -0
  95. package/vendor/desktop/vendor/faces/cli/vendor/client/credentials.js +3 -0
  96. package/vendor/desktop/vendor/faces/cli/vendor/client/device-fingerprint.js +3 -0
  97. package/vendor/desktop/vendor/faces/cli/vendor/client/drive-connect.js +3 -0
  98. package/vendor/desktop/vendor/faces/cli/vendor/client/drive-upload.js +3 -0
  99. package/vendor/desktop/vendor/faces/cli/vendor/client/env-file.js +3 -0
  100. package/vendor/desktop/vendor/faces/cli/vendor/client/fingerprint.js +3 -0
  101. package/vendor/desktop/vendor/faces/cli/vendor/client/foreign-memory.js +3 -0
  102. package/vendor/desktop/vendor/faces/cli/vendor/client/google-signin.js +3 -0
  103. package/vendor/desktop/vendor/faces/cli/vendor/client/hooks.js +3 -0
  104. package/vendor/desktop/vendor/faces/cli/vendor/client/model-discovery.js +3 -0
  105. package/vendor/desktop/vendor/faces/cli/vendor/client/naming.js +3 -0
  106. package/vendor/desktop/vendor/faces/cli/vendor/client/platform.js +3 -0
  107. package/vendor/desktop/vendor/faces/cli/vendor/client/prefs.js +3 -0
  108. package/vendor/desktop/vendor/faces/cli/vendor/client/presence-constants.js +3 -0
  109. package/vendor/desktop/vendor/faces/cli/vendor/client/presence.js +3 -0
  110. package/vendor/desktop/vendor/faces/cli/vendor/client/record-vault.js +105 -0
  111. package/vendor/desktop/vendor/faces/cli/vendor/client/session-store.js +3 -0
  112. package/vendor/desktop/vendor/faces/cli/vendor/client/topup.js +3 -0
  113. package/vendor/desktop/vendor/faces/cli/vendor/client/touch.js +3 -0
  114. package/vendor/desktop/vendor/faces/cli/vendor/client/update.js +3 -0
  115. package/vendor/desktop/vendor/faces/cli/vendor/client/user-models.js +3 -0
  116. package/vendor/desktop/vendor/faces/cli/vendor/covenant/README.md +21 -0
  117. package/vendor/desktop/vendor/faces/cli/vendor/covenant/aegis.seal +177 -0
  118. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/aegis-seal.mjs +241 -0
  119. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/agents.js +3 -0
  120. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/attachments.js +3 -0
  121. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/autonomous.js +3 -0
  122. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/claude-pro.js +3 -0
  123. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/context.js +3 -0
  124. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/covenant.js +567 -0
  125. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/engine.js +3 -0
  126. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/entitlement.js +3 -0
  127. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/exec-plan.js +3 -0
  128. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/git-scope.js +3 -0
  129. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/integrity.js +3 -0
  130. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/local.js +3 -0
  131. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/prompt.js +3 -0
  132. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/queue.js +3 -0
  133. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/session-rounds.js +3 -0
  134. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/shell.js +3 -0
  135. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/spill.js +3 -0
  136. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/tools.js +3 -0
  137. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/turn-guard.js +3 -0
  138. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/worktree-lock.js +3 -0
  139. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/settings.js +3 -0
  140. package/vendor/desktop/vendor/faces/cli/vendor/desktop/main.js +4 -0
  141. package/vendor/desktop/vendor/faces/cli/vendor/desktop/renderer/usage.js +3 -0
  142. package/vendor/desktop/vendor/faces/cli/vendor/hosts/install.js +1 -0
  143. package/vendor/desktop/vendor/faces/cli/vendor/hosts/openai-shim.js +2 -0
  144. package/vendor/desktop/vendor/faces/cli/vendor/hosts/spec.js +1 -0
  145. package/vendor/desktop/vendor/faces/cli/vendor/hosts/targets.js +1 -0
  146. package/vendor/desktop/vendor/faces/cli/vendor/mcp/server.js +4 -0
  147. package/vendor/desktop/vendor/faces/cli/vendor/mcp/tools.js +3 -0
  148. package/vendor/desktop/vendor/faces/cli/vendor/one/src/child.js +3 -0
  149. package/vendor/desktop/vendor/faces/cli/vendor/one/src/permissions.js +3 -0
  150. package/vendor/desktop/vendor/faces/cli/vendor/one/src/selfhost.js +3 -0
  151. package/vendor/desktop/vendor/faces/cli/vendor/tools/agent-gate.mjs +1203 -0
  152. package/vendor/desktop/vendor/selfhost.js +3 -0
@@ -0,0 +1,105 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ "use strict";
4
+ /**
5
+ * record-vault.js — put a sealed φ(α) record where a human can find it, and
6
+ * never put the key there.
7
+ *
8
+ * ## The problem this file exists for
9
+ *
10
+ * A sealed record is only worth minting if someone can look at it later. Kept
11
+ * at `$AEGIS_HOME/fingerprints/`, it is visible on exactly one machine, and the
12
+ * question a record answers ("what was this session, and who sealed it?") is
13
+ * asked from elsewhere. So the record is published to a shared folder — here,
14
+ * `gdrive:AEGIS-AGPL` — and the local record is *linked* to the copy that
15
+ * lives there.
16
+ *
17
+ * The opposite is true of the key, and that asymmetry is the whole design.
18
+ * A record is evidence meant to travel: it carries a 12-hex derived
19
+ * `keyFingerprint` and an HMAC tag, and nothing in it is secret. The key is an
20
+ * HMAC secret: whoever holds it can mint records indistinguishable from the
21
+ * owner's, which means a key in cloud storage is not a backup, it is a forgery
22
+ * kit with a share link. `AEGIS-AGPL/README` says exactly this about the copy
23
+ * already sitting there, and that copy is the reason this module refuses
24
+ * anything key-shaped rather than trusting the caller to pass the right path.
25
+ *
26
+ * ## What "linked" means, precisely
27
+ *
28
+ * Publishing writes two objects and flips one local file:
29
+ *
30
+ * <root>/records/<fp>-<behaviour>.<stamp>.json the sealed bytes,
31
+ * byte-identical to
32
+ * the local file
33
+ * <root>/records/<fp>-<behaviour>.<stamp>.anchor.json the link: Drive id,
34
+ * url, sha256 of the
35
+ * exact bytes, and the
36
+ * record's own id +
37
+ * attestation
38
+ * <root>/records/index.jsonl append-only ledger
39
+ * <local record>.anchor.json same anchor, beside
40
+ * the record, so
41
+ * `anchor` can check
42
+ * the copy later
43
+ *
44
+ * The published record is the *unmodified* sealed bytes. That is deliberate and
45
+ * it is the point of the sha256 in the anchor: anyone who downloads the copy and
46
+ * gets the same digest is holding exactly what was sealed, and can re-run
47
+ * `fingerprint verify` on it. An earlier shape put the Drive link *inside* the
48
+ * record, which cannot work — the digest of the file would change when the link
49
+ * was added to it — and would have been worse than not working: an un-attested
50
+ * field inside a signed object reads as if the seal covered it. It does not. The
51
+ * seal covers `ATTESTED_FIELDS_V3` and nothing else, so the link lives outside
52
+ * the record, where `fp.verify` cannot be misread as vouching for it.
53
+ *
54
+ * ## The refusal, and why it is here rather than in an instruction
55
+ *
56
+ * `publish` re-checks every byte before it leaves the machine, using the
57
+ * sealer's own rule (`fp.assertNoLeak` from the vendored module) plus the shapes
58
+ * a *file* can have that a record cannot: a bare high-entropy token, a PEM
59
+ * private key, a 64-hex key, a path named `keys/agent.key`. It throws rather
60
+ * than warning, for the same reason `fingerprint.mint` throws: a warning is
61
+ * something a scripted publish never reads. `audit` is the other half — it
62
+ * inspects what is *already* in the vault and names it, so the answer to "is a
63
+ * key in there?" is a command rather than a memory.
64
+ *
65
+ * ## Two backends: `aegiscloud` (default) and `rclone`
66
+ *
67
+ * The vault used to be rclone-or-nothing, and the default target
68
+ * (`gdrive:AEGIS-AGPL`) assumed a Drive remote the user had already
69
+ * configured by hand. On a fresh install that remote does not exist, so the
70
+ * first `fingerprint publish` failed with rclone's "didn't find section in
71
+ * config file" — the default was a folder the user could not have.
72
+ *
73
+ * So the *default* backend is now `aegiscloud`: the account this machine
74
+ * already registered for with `POST /api/v1/auth/register-device` (see
75
+ * client/auto-provision.js — the same device key every other cloud feature
76
+ * uses, so publishing needs no second sign-in). The bytes are stored per
77
+ * account, addressed by the same `<keyFingerprint>-<behaviour>.<stamp>` name,
78
+ * and read back through the same three-claim check (`present` / `unchanged` /
79
+ * `attested`) — a remote vault is only worth anything if the copy can be
80
+ * fetched and re-verified later.
81
+ *
82
+ * `rclone` remains a first-class backend for anyone who wants the record in
83
+ * *their own* Google Drive / S3 / whatever (`--backend rclone`, or simply
84
+ * `--remote gdrive`), because "where do my records live" is the user's
85
+ * decision and a vendor account is a default, not a requirement.
86
+ *
87
+ * ## Testing
88
+ *
89
+ * Every remote operation goes through one dispatcher (`transportFor`), which is
90
+ * either the rclone adapter (`rcloneBinary()` overridable via
91
+ * `AEGIS_VAULT_RCLONE`) or the aegiscloud adapter (whose `fetch` is injectable
92
+ * through `o.fetch`). `test/cli-fingerprint-vault.test.mjs` drives the whole
93
+ * surface against a stub rclone, and `test/cli-fingerprint-cloud.test.mjs`
94
+ * against a stub HTTP vault, so the suite is hermetic and never touches the
95
+ * user's Drive or their account. The remote/root are overridable the same way
96
+ * (`AEGIS_VAULT_REMOTE`/`AEGIS_VAULT_ROOT`, `AEGIS_VAULT_BACKEND`), which is
97
+ * also what keeps a misconfigured vault from writing into an unrelated folder.
98
+ */const crypto=require("node:crypto"),fs=require("node:fs"),os=require("node:os"),path=require("node:path"),{execFileSync:execFileSync}=require("node:child_process"),fp=require("./fingerprint.js"),authorship=require("./authorship-key.js"),BACKEND_CLOUD="aegiscloud",BACKEND_RCLONE="rclone",DEFAULT_BACKEND=BACKEND_CLOUD,DEFAULT_REMOTE="gdrive",DEFAULT_ROOT="AEGIS-AGPL",RECORDS_DIR="records",INDEX_NAME="index.jsonl",ANCHOR_SUFFIX=".anchor.json",ANCHOR_VERSION=1,ANCHOR_KIND="aegiscode.record.anchor",INDEX_KIND="aegiscode.record.index",RCLONE_ENV="AEGIS_VAULT_RCLONE",REMOTE_ENV="AEGIS_VAULT_REMOTE",ROOT_ENV="AEGIS_VAULT_ROOT",BACKEND_ENV="AEGIS_VAULT_BACKEND",API_BASE_ENV="AEGIS_API_BASE",CLOUD_PREFIX="/api/v1/vault",RCLONE_TIMEOUT_MS=6e4,MAX_INSPECT_BYTES=2097152,MAX_AUDIT_FILES=500,KEY_PATH_PATTERNS=[/(^|\/)keys?\//i,/\.key$/i,/\.pem$/i,/(^|\/)id_(rsa|dsa|ecdsa|ed25519)(\.|$)/i,/(^|\/)agent\.key(\.|$)/i],BARE_TOKEN=/^[A-Za-z0-9_\-+/=]{40,}$/,BARE_HEX=/^[0-9a-fA-F]{32,}$/,PEM_PRIVATE=/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----/;function flag(e,t,r=null){const n=Array.isArray(e)?e:[],o=n.indexOf(t);return-1===o||void 0===n[o+1]||String(n[o+1]).startsWith("--")?r:n[o+1]}function has(e,t){return(Array.isArray(e)?e:[]).includes(t)}function rcloneBinary(e=process.env,t=[]){return flag(t,"--rclone")||e[RCLONE_ENV]||"rclone"}function vaultTarget(e=process.env,t=[],r=null){const n=flag(t,"--remote")||e[REMOTE_ENV]||r&&r.remote||DEFAULT_REMOTE;return{backend:backendFor(e,t,n,r),remote:n,root:flag(t,"--root")||e[ROOT_ENV]||r&&r.root||DEFAULT_ROOT,apiBase:String(flag(t,"--base")||e[API_BASE_ENV]||"https://aegiscloud.org").replace(/\/+$/,""),rclone:rcloneBinary(e,t),env:e}}function backendFor(e,t,r,n=null){const o=String(flag(t,"--backend")||e[BACKEND_ENV]||"").trim().toLowerCase();if(o){if(o!==BACKEND_CLOUD&&o!==BACKEND_RCLONE)throw new Error(`vault: unknown backend "${o}" — expected ${BACKEND_CLOUD} or ${BACKEND_RCLONE}`);return o}return flag(t,"--remote")||e[REMOTE_ENV]?BACKEND_RCLONE:!n||n.backend!==BACKEND_CLOUD&&n.backend!==BACKEND_RCLONE?n&&void 0===n.backend&&n.remote&&n.remote!==DEFAULT_REMOTE?BACKEND_RCLONE:DEFAULT_BACKEND:n.backend}function remoteSpec(e,...t){return`${e.remote}:${[e.root,...t].filter(Boolean).join("/")}`
99
+ /**
100
+ * A path *below* the root, however it was written: `records/x.json`,
101
+ * `<root>/records/x.json`, or an absolute `remote:…` spec. Everything that
102
+ * reads tolerates all three, because the anchor stores the browsable
103
+ * root-prefixed form (a human reads `AEGIS-AGPL/records/x.json`) while rclone
104
+ * wants it relative.
105
+ */}function relativeToRoot(e,t){let r=String(t||"").replace(/^\/+/,"");const n=`${e.remote}:`;return r.startsWith(n)&&(r=r.slice(n.length)),r===e.root?"":(r.startsWith(`${e.root}/`)&&(r=r.slice(e.root.length+1)),r)}function remoteSpecOf(e,t){const r=relativeToRoot(e,t);return r?remoteSpec(e,r):remoteSpec(e)}function rcloneRun(e,t,{timeout:r=RCLONE_TIMEOUT_MS}={}){try{return execFileSync(e.rclone,t,{encoding:"utf8",timeout:r,stdio:["ignore","pipe","pipe"],maxBuffer:33554432,env:e.env?{...process.env,...e.env}:process.env})}catch(e){const r=String(e&&e.stderr||"").trim().split("\n").filter((e=>!/NOTICE:/.test(e))).pop()||e&&e.message||String(e),n=new Error(`vault: rclone ${t[0]} failed — ${r}`);throw n.code="ERCLONE",n.stderr=String(e&&e.stderr||""),n}}function tempDir(){return fs.mkdtempSync(path.join(os.tmpdir(),"aegis-vault-"))}function cloudApiKey(e={}){if(e.apiKey)return String(e.apiKey).trim();const t=e.env||process.env;try{const e=require("./credentials.js");return String(e.resolveApiKey({env:t,dir:e.aegisHome(t)}).key||"").trim()}catch{return""}}async function cloudRun(e,t,r,{body:n=null,raw:o=!1,timeout:a=RCLONE_TIMEOUT_MS,fetchImpl:s=null,apiKey:i=null}={}){const c=i||"";if(!c){const e=new Error("vault: no AEGIS account key on this machine — the aegiscloud vault is the account you already have. Run `aegiscode login`, or publish to a folder you own with `--backend rclone --remote <name>`.");throw e.code="ENOKEY",e}const l=s||("function"==typeof fetch?fetch:null);if(!l){const e=new Error("vault: this Node has no global fetch — upgrade to Node 22+ to use the aegiscloud vault");throw e.code="ENOFETCH",e}const u=new AbortController,d=setTimeout((()=>u.abort()),a);let h;try{h=await l(`${e.apiBase}${CLOUD_PREFIX}${r}`,{method:t,headers:{"Content-Type":"application/json","X-API-Key":c,Authorization:`Bearer ${c}`},body:null===n?void 0:JSON.stringify(n),signal:u.signal})}catch(t){const r=new Error(`vault: could not reach ${e.apiBase} — ${t&&t.message||t}`);throw r.code="ENETWORK",r}finally{clearTimeout(d)}const E=await h.text();let p=null;try{p=E?JSON.parse(E):null}catch{p=null}if(!h.ok){if(404===h.status&&(""===r||r.startsWith("?"))){const t=new Error(`vault: ${e.apiBase} does not serve the account vault yet (${CLOUD_PREFIX} is missing on this server). Publish to a folder you own instead: \`--backend rclone --remote <name> --root <folder>\`.`);throw t.code="ENOVAULT",t.status=404,t}const n=p&&(p.error||p.message)||E.slice(0,200)||`HTTP ${h.status}`,o=new Error(`vault: ${t} ${CLOUD_PREFIX}${r} failed — ${n}`);throw o.code="ECLOUD",o.status=h.status,o}return o?E:null===p?{}:p}function cloudObject(e,t){return`/${String(t||"").split("/").filter(Boolean).map((e=>encodeURIComponent(e))).join("/")}`}function transportFor(e,t={}){if(e.backend===BACKEND_CLOUD){const r=cloudApiKey(t),n=(n,o,a)=>cloudRun(e,n,o,{...a,fetchImpl:t.fetch,apiKey:r});return{backend:BACKEND_CLOUD,async put(t,r){await n("PUT",cloudObject(e,remoteObjectName(t)),{body:{content:r}})},async putFile(e,t){await this.put(e,fs.readFileSync(t,"utf8"))},async cat(t){try{const r=await n("GET",cloudObject(e,remoteObjectName(t)));return r&&"string"==typeof r.content?r.content:null}catch(e){if(404===e.status)return null;throw e}},async list(t){const r=await n("GET",`?dir=${encodeURIComponent(relativeToRoot(e,t))}`);return Array.isArray(r&&r.files)?r.files:[]},async listRecursive(t){const r=await n("GET",`?dir=${encodeURIComponent(relativeToRoot(e,t))}&recursive=1`);return Array.isArray(r&&r.files)?r.files:[]},describe:`${e.apiBase} (account vault)`}}return{backend:BACKEND_RCLONE,async put(t,r,{name:n="object"}={}){const o=tempDir();try{const a=path.join(o,n);fs.writeFileSync(a,r),rcloneRun(e,["copyto",a,remoteSpecOf(e,t)])}finally{fs.rmSync(o,{recursive:!0,force:!0})}},async putFile(t,r){rcloneRun(e,["copyto",r,remoteSpecOf(e,t)])},async cat(t){try{return rcloneRun(e,["cat",remoteSpecOf(e,t)])}catch(e){if("ERCLONE"===e.code&&/not found|does not exist|error 404/i.test(e.stderr||e.message))return null;throw e}},list:async t=>listRaw(e,t),listRecursive:async t=>rcloneLsjsonRecursive(e,t),describe:`${e.remote}:${e.root}`}}function remoteObjectName(e){return relativeToRoot({remote:"",root:""},e).replace(/^\/+/,"")}function inspect(e,t,{secret:r=null,keyPath:n=null}={}){const o=String(e||"");for(const e of KEY_PATH_PATTERNS)if(e.test(o))return{dangerous:!0,reason:`the path looks like key material (${e})`};if(n&&path.resolve(o)===path.resolve(n))return{dangerous:!0,reason:"this path IS the authorship key"};const a=String(null==t?"":t),s=a.trim();if(r&&s.includes(String(r)))return{dangerous:!0,reason:"the content carries the authorship key verbatim"};if(PEM_PRIVATE.test(a))return{dangerous:!0,reason:"the content is a PEM private key"};const i=1===s.split("\n").length;if(i&&BARE_TOKEN.test(s)&&!BARE_HEX.test(s))return{dangerous:!0,reason:"the content is a bare high-entropy token (a raw secret)"};if(i&&BARE_HEX.test(s))return{dangerous:!0,reason:"the content is an unlabelled hex blob (a raw digest or key)"};let c=null;try{c=JSON.parse(a)}catch{c=null}if(c&&"object"==typeof c&&!Array.isArray(c)){if("string"==typeof c.kind&&c.kind.startsWith("aegiscode."))return inspectArtifact(c,r);try{fp.assertNoLeak(c,r||"")}catch(e){return{dangerous:!0,reason:e&&e.message||"failed the leak check"}}}return{dangerous:!1,reason:null}}function inspectArtifact(e,t){const r=new Set(["sha256","attestation","code"]);for(const[n,o]of Object.entries(e)){if(null==o)continue;const e=Array.isArray(o)?o.join("\0"):String(o);if(t&&e.includes(String(t)))return{dangerous:!0,reason:`the link carries the authorship key verbatim in "${n}"`};if(!r.has(n)&&fp.longHexRun(e))return{dangerous:!0,reason:`the link carries a long hex run in "${n}"`}}return void 0===e.sha256||/^[0-9a-f]{64}$/.test(String(e.sha256))?void 0===e.attestation||/^[0-9a-f]{32}$/.test(String(e.attestation))?{dangerous:!1,reason:null}:{dangerous:!0,reason:"the link's attestation is not a 32-hex tag"}:{dangerous:!0,reason:"the link's sha256 is not a 64-hex digest"}}function assertPublishable(e,t,r={}){const n=inspect(e,t,r);if(n.dangerous)throw new Error(`vault: refusing to publish ${e} — ${n.reason}. The vault carries sealed records only: a key that reaches cloud storage can mint records indistinguishable from yours, so it is never a backup. Keep it in ${authorship.defaultKeyPath(r.env||process.env)} (0600) and back it up to a local disk or a password manager.`);return!0}function baseName(e,t=null){const r=e&&e.behaviour?String(e.behaviour):"unobserved",n=String(t||e&&e.createdAt||(new Date).toISOString()).replace(/[:.]/g,"-");return`${e.keyFingerprint}-${r}.${n}`}function driveUrl(e){return e?`https://drive.google.com/open?id=${encodeURIComponent(e)}`:null}function sha256(e){return crypto.createHash("sha256").update(e,"utf8").digest("hex")}function readRecord({file:e=null,record:t=null,secret:r=null,env:n=process.env}){if(e){const t=path.resolve(e);if(!fs.existsSync(t))throw new Error(`vault: no record at ${t}`);const o=fs.readFileSync(t,"utf8");let a;assertPublishable(t,o,{secret:r,keyPath:authorship.defaultKeyPath(n),env:n});try{a=JSON.parse(o)}catch(e){throw new Error(`vault: ${t} is not JSON — ${e.message}`)}return{text:o,record:a,file:t,serialised:o}}if(t){const e=JSON.stringify(t,null,2)+"\n";return{text:e,record:t,file:null,serialised:e}}throw new Error("vault: publish needs a record file or a record")}async function publish(e={}){const t=e.env||process.env,r=e.argv||[],n=vaultTarget(t,r),o=Boolean(e.dryRun)||has(r,"--dry-run"),a=void 0===e.index?!has(r,"--no-index"):Boolean(e.index),s=e.secret||null,{text:i,record:c,file:l}=readRecord({...e,secret:s,env:t});let u;try{u=fp.id(c)}catch(e){throw new Error(`vault: not a sealed φ(α) record — ${e&&e.message||e}`)}const d=authorship.defaultKeyPath(t);assertPublishable(path.basename(l||"record.json"),i,{secret:s,keyPath:d,env:t});const h=`${baseName(c)}.json`,E=`${h}${ANCHOR_SUFFIX}`,p=`${RECORDS_DIR}/${h}`,f=`${RECORDS_DIR}/${E}`,N=sha256(i),y={v:1,kind:ANCHOR_KIND,id:u,keyFingerprint:c.keyFingerprint,behaviour:c.behaviour||null,code:c.code||null,createdAt:c.createdAt,attestation:c.attestation,sha256:N,bytes:Buffer.byteLength(i,"utf8"),backend:n.backend,remote:n.remote,root:n.root,path:n.backend===BACKEND_CLOUD?`${CLOUD_PREFIX}/${p}`:`${n.root}/${p}`,key:p,emittedAt:new Date(e.now||Date.now()).toISOString(),driveId:null,url:null,index:a?`${n.root}/${RECORDS_DIR}/${INDEX_NAME}`:null},A=transportFor(n,e);if(o)return{ok:!0,dryRun:!0,backend:n.backend,anchor:y,url:null,remotePath:y.path,commands:n.backend===BACKEND_CLOUD?[`PUT ${n.apiBase}${CLOUD_PREFIX}/${p}`,`PUT ${n.apiBase}${CLOUD_PREFIX}/${f}`]:[`rclone copyto ${l||"<record>"} ${remoteSpec(n,p)}`,`rclone copyto <anchor> ${remoteSpec(n,f)}`]};l?await A.putFile(p,l):await A.put(p,i,{name:h});const g=(await A.list(RECORDS_DIR)).find((e=>String(e.Name)===h))||null;g&&(y.driveId=g.ID||null,y.url=g.url||(n.backend===BACKEND_CLOUD?null:driveUrl(g.ID)));const O=l?`${l}${ANCHOR_SUFFIX}`:null,R=JSON.stringify(y,null,2)+"\n";await A.put(f,R,{name:E}),O&&fs.writeFileSync(O,R);let _=null;return a&&(_=await appendIndex(n,y,A)),{ok:!0,dryRun:!1,backend:n.backend,anchor:y,url:y.url,localAnchor:O,remotePath:y.path,bytes:y.bytes,sha256:N,indexLines:_}}function rcloneCat(e,t){try{return rcloneRun(e,["cat",remoteSpecOf(e,t)])}catch(e){if("ERCLONE"===e.code&&/not found|does not exist|error 404/i.test(e.stderr||e.message))return null;throw e}}function listRaw(e,t){let r;try{r=rcloneRun(e,["lsjson",remoteSpecOf(e,t),"--files-only"])}catch(e){if("ERCLONE"===e.code&&/not found|does not exist|error 404|directory not found/i.test(e.stderr||e.message))return[];throw e}const n=String(r).trim();if(!n)return[];const o=JSON.parse(n);return Array.isArray(o)?o:[]}async function appendIndex(e,t,r=transportFor(e)){const n=`${RECORDS_DIR}/${INDEX_NAME}`,o=await r.cat(n)||"",a=JSON.stringify({kind:INDEX_KIND,id:t.id,keyFingerprint:t.keyFingerprint,sha256:t.sha256,path:t.path,url:t.url,driveId:t.driveId,emittedAt:t.emittedAt});return await r.put(n,o+a+"\n",{name:INDEX_NAME}),(o.trim()?o.trim().split("\n").length:0)+1}function localAnchor(e){const t=`${path.resolve(e)}${ANCHOR_SUFFIX}`;if(!fs.existsSync(t))return null;try{return JSON.parse(fs.readFileSync(t,"utf8"))}catch{return null}}async function checkAnchor(e={}){const t=e.env||process.env,r=e.argv||[],n=e.anchor||(e.file?localAnchor(e.file):null);if(!n)return{ok:!1,reason:"not linked — no anchor beside this record (publish it first)",present:!1,unchanged:null,attested:null};const o=transportFor(vaultTarget(t,r,n),e),a=await o.cat(n.key||n.path);if(null===a)return{ok:!1,reason:`no copy at ${n.path}`,present:!1,unchanged:!1,attested:null,anchor:n};const s=sha256(a)===n.sha256;let i=null,c=null;try{const n=e.key||authorship.resolveKey({argv:r,env:t});if(n.secret){const e=fp.verify(JSON.parse(a),n.secret);i=e.ok,c=e.reason}else c="no authorship key on this machine to recompute with"}catch(e){c=e&&e.message||String(e)}return{ok:s&&!1!==i,anchor:n,present:!0,unchanged:s,attested:i,attestationReason:c,remotePath:n.path,url:n.url,reason:s?!1===i?`the published copy does not verify: ${c}`:null:"the published copy is not the bytes that were sealed (sha256 differs)"}}async function list(e={}){const t=vaultTarget(e.env||process.env,e.argv||[]),r=transportFor(t,e),n=RECORDS_DIR,o=await r.list(n),a=o.filter((e=>String(e.Name).endsWith(ANCHOR_SUFFIX))),s=o.filter((e=>!String(e.Name).endsWith(ANCHOR_SUFFIX)&&String(e.Name).endsWith(".json")&&e.Name!==INDEX_NAME)),i=[];for(const e of s){const t=a.find((t=>String(t.Name)===`${e.Name}${ANCHOR_SUFFIX}`));let o=null;if(t){const e=await r.cat(`${n}/${t.Name}`);try{o=JSON.parse(e)}catch{o={unreadable:!0}}}i.push({name:e.Name,bytes:e.Size,emittedAt:e.ModTime,id:o?o.id:null,keyFingerprint:o?o.keyFingerprint:null,sha256:o?o.sha256:null,driveId:o&&o.driveId||e.ID||null,url:o&&o.url||e.url||driveUrl(e.ID),linked:Boolean(o)})}return{ok:!0,backend:t.backend,remote:t.remote,root:t.root,where:r.describe,records:i}}async function audit(e={}){const t=e.env||process.env,r=e.argv||[],n=vaultTarget(t,r),o=transportFor(n,e),a=Number(flag(r,"--max"))||500;let s;try{s=await o.listRecursive("")}catch(e){return{ok:!1,backend:n.backend,where:o.describe,error:e&&e.message||String(e),findings:[],checked:0}}const i=e.secret||null,c=[],l=[];let u=0;for(const t of s){const r=String(t.Path||t.Name);if(u>=a){l.push({path:r,reason:`stopped after ${a} files`});continue}if(Number(t.Size)>2097152){l.push({path:r,reason:"larger than 2097152 bytes"});continue}let n;u+=1;try{n=await o.cat(r)}catch(e){l.push({path:r,reason:e&&e.message||String(e)});continue}const s=inspect(r,n,{secret:i});s.dangerous&&c.push({path:r,reason:s.reason})}return{ok:0===c.length,backend:n.backend,remote:n.remote,root:n.root,where:o.describe,checked:u,files:s.length,uninspected:l,findings:c}}function rcloneLsjsonRecursive(e,t){const r=rcloneRun(e,["lsjson",remoteSpecOf(e,t),"--files-only","--recursive"]),n=String(r).trim();if(!n)return[];const o=JSON.parse(n);return Array.isArray(o)?o:[]}module.exports={DEFAULT_REMOTE:DEFAULT_REMOTE,DEFAULT_ROOT:DEFAULT_ROOT,DEFAULT_BACKEND:DEFAULT_BACKEND,BACKEND_CLOUD:BACKEND_CLOUD,BACKEND_RCLONE:BACKEND_RCLONE,CLOUD_PREFIX:CLOUD_PREFIX,BACKEND_ENV:BACKEND_ENV,API_BASE_ENV:API_BASE_ENV,RECORDS_DIR:RECORDS_DIR,INDEX_NAME:INDEX_NAME,ANCHOR_SUFFIX:ANCHOR_SUFFIX,ANCHOR_KIND:ANCHOR_KIND,INDEX_KIND:INDEX_KIND,RCLONE_ENV:RCLONE_ENV,REMOTE_ENV:REMOTE_ENV,ROOT_ENV:ROOT_ENV,inspect:inspect,assertPublishable:assertPublishable,publish:publish,checkAnchor:checkAnchor,list:list,audit:audit,localAnchor:localAnchor,relativeToRoot:relativeToRoot,remoteSpecOf:remoteSpecOf,baseName:baseName,driveUrl:driveUrl,vaultTarget:vaultTarget,rcloneBinary:rcloneBinary,rcloneCat:rcloneCat,transportFor:transportFor,cloudApiKey:cloudApiKey,backendFor:backendFor,sha256:sha256,flag:flag,has:has};
@@ -0,0 +1,3 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ "use strict";const fs=require("node:fs"),path=require("node:path"),{aegisHome:aegisHome}=require("./credentials.js"),STORE_FILE="sessions.json",STORE_VERSION=2,MAX_MESSAGES_PER_SESSION=2e3;function storeDir(e){return e||aegisHome()}function storeFile(e){return path.join(storeDir(e),STORE_FILE)}function nextSeq(e){const t=("number"==typeof e.__seq?e.__seq:0)+1;return e.__seq=t,t}function toEpochMs(e){if("number"==typeof e&&Number.isFinite(e))return e;if("string"==typeof e&&e.trim()){const t=Date.parse(e);if(Number.isFinite(t))return t}return 0}function load(e){try{const t=JSON.parse(fs.readFileSync(storeFile(e),"utf8"));if(t&&"object"==typeof t&&!Array.isArray(t))return t}catch{}return{}}function atomicWrite(e,t){fs.mkdirSync(path.dirname(e),{recursive:!0});const n=`${e}.tmp-${process.pid}`;fs.writeFileSync(n,JSON.stringify(t,null,2),{mode:384}),fs.renameSync(n,e);try{fs.chmodSync(e,384)}catch{}}const LOCK_STALE_MS=2e3,LOCK_WAIT_MS=500;function lockFile(e){return`${storeFile(e)}.lock`}function acquireLock(e){const t=lockFile(e);try{fs.mkdirSync(path.dirname(t),{recursive:!0})}catch{return!1}const n=Date.now()+LOCK_WAIT_MS;for(let e=0;e<200;e++)try{const e=fs.openSync(t,"wx");return fs.writeSync(e,String(process.pid)),fs.closeSync(e),!0}catch{let e=null;try{e=Date.now()-fs.statSync(t).mtimeMs}catch{continue}if(e>LOCK_STALE_MS){try{fs.unlinkSync(t)}catch{}continue}if(Date.now()>=n)return!1;const s=Date.now()+5;for(;Date.now()<s;);}return!1}function releaseLock(e){try{fs.unlinkSync(lockFile(e))}catch{}}function mutate(e,t){const n=acquireLock(e);try{const n=load(e),s=t(n);return save(e,n),s}finally{n&&releaseLock(e)}}function save(e,t){atomicWrite(storeFile(e),t)}function trimMessages(e){return Array.isArray(e)?e.length<=MAX_MESSAGES_PER_SESSION?e:e.slice(e.length-MAX_MESSAGES_PER_SESSION):[]}function upsertSession(e,t){const n=t&&t.id;if(!n)throw new Error("session.id is required");return mutate(e,(e=>{const s=e[n]||{messages:[]};return e[n]={...s,...t,id:n,version:2},!0===s.named&&"string"==typeof s.title&&s.title&&(e[n].title=s.title,e[n].named=!0),!1!==t.pending&&(e[n].pending=!0),e[n].updatedAt||(e[n].updatedAt=Date.now()),e[n].seq=nextSeq(e),e[n]}))}function appendMessage(e,t,n){if(!t)throw new Error("sessionId is required");return mutate(e,(e=>{const s=e[t]||{id:t,messages:[]},r=Array.isArray(s.messages)?s.messages:[];return s.messages=trimMessages(r.concat(n)),s.updatedAt=Date.now(),s.pending=!0,s.seq=nextSeq(e),e[t]=s,s}))}function recordExchange(e,t){const n=t||{};if(!n.sessionId)return null;const s=n.sessionId;return mutate(e,(e=>{const t=e[s]||{id:s,messages:[]},r=Array.isArray(t.messages)?t.messages:[],o=n.ts||(new Date).toISOString(),i={role:"user",content:null==n.prompt?"":String(n.prompt),ts:o},a={role:"assistant",content:null==n.reply?"":String(n.reply),ts:o};return n.tokens&&(a.tokens=n.tokens),"number"==typeof n.costUsd&&(a.costUsd=n.costUsd),n.status&&(a.status=n.status),n.model&&(a.model=n.model),n.provider&&(a.provider=n.provider),n.origin&&(i.origin=n.origin,a.origin=n.origin),t.messages=trimMessages(r.concat([i,a])),t.title=t.title||String(n.prompt||"").slice(0,60),n.cwd&&(t.cwd=n.cwd),t.origin=n.origin||t.origin||"unknown",t.updatedAt=Date.now(),t.pending=!0===n.pending,t.seq=nextSeq(e),e[s]=t,t}))}function setTitle(e,t,n,s){const r=String(null==n?"":n).trim().slice(0,200);if(!t||!r)return null;const o=s&&!0===s.named;return mutate(e,(e=>{const n=e[t];return n?(n.title=r,o&&(n.named=!0),n.updatedAt=Date.now(),n.seq=nextSeq(e),n):null}))}function listSessions(e){const t=load(e);return Object.values(t).filter((e=>e&&e.id)).sort(((e,t)=>(t.updatedAt||0)-(e.updatedAt||0)||(t.seq||0)-(e.seq||0)))}function getSession(e,t){return load(e)[t]||null}function deleteSession(e,t){return mutate(e,(e=>(delete e[t],{ok:!0})))}function markSynced(e,t,n){return mutate(e,(e=>{const s=e[t];return s?(s.pending=!1,s.lastSyncedAt=Date.now(),n&&n.remoteId&&(s.remoteId=n.remoteId),s.seq=nextSeq(e),s):null}))}function markPending(e,t){return mutate(e,(e=>{const n=e[t];return n?(n.pending=!0,n.seq=nextSeq(e),n):null}))}function listPending(e){return listSessions(e).filter((e=>!1!==e.pending))}function mergeRemoteSessions(e,t){const n=Array.isArray(t)?t:[];return n.length?mutate(e,(e=>{let t=0;for(const s of n){const n=s&&(s.session_id||s.id);if(!n)continue;const r=e[n],o=toEpochMs(s.updated_at??s.updatedAt);r&&(r.pending||(r.updatedAt||0)>=o)||(e[n]={id:n,title:s.title||r&&r.title||"",messages:Array.isArray(s.messages)?s.messages:[],updatedAt:o||Date.now(),pending:!1,lastSyncedAt:Date.now(),remoteId:s.session_id||s.id,origin:s.source||r&&r.origin||"cloud",version:2},e[n].seq=nextSeq(e),t+=1)}return t})):0}function listSummaries(e,t=8){return listSessions(e).slice(0,t).map((e=>{const t=Array.isArray(e.messages)?e.messages:[],n=t.find((e=>e&&"user"===e.role));return{id:e.id,cwd:(e.cwd||"").split(/[\\/]/).filter(Boolean).pop()||"~",summary:String(e.title||n&&n.content||"").slice(0,60),time:new Date(e.updatedAt||Date.now()).toISOString(),own:!0,origin:e.origin||"unknown",messages:t.length,pending:!0===e.pending,dir:String(e.cwd||"")}}))}function readTranscript(e,t){const n=getSession(e,t);return n?(Array.isArray(n.messages)?n.messages:[]).filter((e=>e&&("user"===e.role||"assistant"===e.role))).map((e=>({role:e.role,text:null==e.content?"":String(e.content)}))):[]}function adopt(e,t){const n=storeFile(t);if(!(()=>{try{return fs.existsSync(n)}catch{return!1}})())return{adopted:!1,sessions:0,from:n,reason:"no legacy store"};const s=(()=>{try{const e=JSON.parse(fs.readFileSync(n,"utf8"));return e&&"object"==typeof e&&!Array.isArray(e)?e:{}}catch{return{}}})(),r=Object.values(s).filter((e=>e&&e.id));return r.length?listSessions(e).length?{adopted:!1,sessions:0,from:n,reason:"store already has sessions"}:(mutate(e,(e=>{for(const t of r)e[t.id]={...t,adoptedFrom:n,version:2},e[t.id].seq=nextSeq(e);return e.__seq=Math.max(e.__seq||0,s.__seq||0),e.version=2,null})),{adopted:!0,sessions:r.length,from:n}):{adopted:!1,sessions:0,from:n,reason:"legacy store empty"}}function toMarkdown(e){const t=e&&(e.title||e.id)||"session",n=e&&Array.isArray(e.messages)?e.messages:[],s=[`# ${t}`,""];for(const e of n){const t=e&&e.role||"unknown",n=t.charAt(0).toUpperCase()+t.slice(1),r=e&&(e.content||e.text)||"";s.push(`## ${n}`,"",r,"")}return s.join("\n")}function toJson(e){return JSON.stringify(e,null,2)}module.exports={STORE_FILE:STORE_FILE,STORE_VERSION:2,MAX_MESSAGES_PER_SESSION:MAX_MESSAGES_PER_SESSION,storeDir:storeDir,storeFile:storeFile,lockFile:lockFile,LOCK_STALE_MS:LOCK_STALE_MS,LOCK_WAIT_MS:LOCK_WAIT_MS,toEpochMs:toEpochMs,load:load,save:save,upsertSession:upsertSession,appendMessage:appendMessage,recordExchange:recordExchange,setTitle:setTitle,listSessions:listSessions,getSession:getSession,deleteSession:deleteSession,markSynced:markSynced,markPending:markPending,listPending:listPending,mergeRemoteSessions:mergeRemoteSessions,listSummaries:listSummaries,readTranscript:readTranscript,adopt:adopt,toMarkdown:toMarkdown,toJson:toJson};
@@ -0,0 +1,3 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ "use strict";const TOPUP_MIN_EUR=2,TOPUP_MAX_EUR=1e3,TOPUP_DEFAULT_EUR=10,TOPUP_POLL_MS=4e3,TOPUP_POLL_TRIES=30;function bankAmount(e){if(null==e)return null;if("number"==typeof e)return isFinite(e)?e:null;if("string"==typeof e){const t=Number(e.trim());return""!==e.trim()&&isFinite(t)?t:null}if("object"!=typeof e)return null;if(null!=e.balance_micros){const t=Number(e.balance_micros);return isFinite(t)?t/1e6:null}for(const t of["balance_eur","balance","bank","balance_eur_cents"]){if(!(t in e))continue;const n=Number(e[t]);if(isFinite(n))return"balance_eur_cents"===t?n/100:n}return e.data?bankAmount(e.data):null}function parseTopupAmount(e,t){const n=String(null==e?"":e).trim();if(!n)return{ok:!0,amount:null==t?10:Number(t),message:null};const u=n.replace(/[€$]|eur(o|os)?\b/gi,"").trim(),r=Number(u);return isFinite(r)&&""!==u?Number.isInteger(r)?r<TOPUP_MIN_EUR||r>TOPUP_MAX_EUR?{ok:!1,amount:null,message:`${r} EUR is outside the accepted range — top-ups are ${TOPUP_MIN_EUR}..${TOPUP_MAX_EUR} EUR`}:{ok:!0,amount:r,message:null}:{ok:!1,amount:null,message:`${r} EUR is not whole — Stripe charges whole euro here (e.g. /topup 20)`}:{ok:!1,amount:null,message:`"${n}" is not an amount — give a number of euro, e.g. /topup 20`}}function classifyTopupError(e){const t=e&&(e.status||e.response&&e.response.status)||0,n=e&&e.data||{},u=e&&e.message?e.message:String(e);return Boolean(n.setup_required)||503===t?{status:t||503,message:u,hint:"this deployment has no payment provider configured — top-ups are unavailable here, not on your side",setupRequired:!0}:400===t?{status:t,message:u,hint:`pick an amount between ${TOPUP_MIN_EUR} and ${TOPUP_MAX_EUR} EUR`,setupRequired:!1}:401===t||403===t?{status:t,message:u,hint:"the account key was refused — save a fresh one (aegiscode login) and try again",setupRequired:!1}:402===t?{status:t,message:u,hint:"the server refused the checkout for this account — see /billing for the account state",setupRequired:!1}:t?{status:t,message:u,hint:null,setupRequired:!1}:{status:0,message:u,hint:"the server could not be reached — check the connection and retry",setupRequired:!1}}async function startTopup(e,t){const n=null==t?10:Number(t);if(!e||"function"!=typeof e.tokenBankTopup)return{ok:!1,url:null,status:0,amount:n,setupRequired:!1,message:"this host has no billing client",hint:null};try{const t=await e.tokenBankTopup(n),u=t&&t.url?String(t.url):null;return u?{ok:!0,url:u,status:0,message:null,hint:null,setupRequired:!1,amount:n}:{ok:!1,url:null,status:0,amount:n,setupRequired:!1,message:"the server accepted the request but returned no checkout URL",hint:"check the account in the browser at /billing, then retry"}}catch(e){return{ok:!1,url:null,amount:n,...classifyTopupError(e)}}}function createCreditWatch(e,t){const n=(t||{}).maxTries||30,u={baseline:null,credited:null,tries:0,stopped:!1};return{get baseline(){return u.baseline},get credited(){return u.credited},get tries(){return u.tries},stop(){u.stopped=!0},async tick(){const t=(e,t)=>({state:e,amount:null==t?null:t,baseline:u.baseline});if(u.stopped)return t(null!=u.credited?"credited":"stopped",u.credited);if(u.tries+=1,u.tries>n)return u.stopped=!0,t("expired",null);let r=null;try{r=bankAmount(await e.tokenBankBalance())}catch{return t("pending",null)}return null===r?t("pending",null):null===u.baseline?(u.baseline=r,t("pending",null)):r>u.baseline?(u.stopped=!0,u.credited=r,t("credited",r)):t("pending",null)}}}module.exports={TOPUP_MIN_EUR:TOPUP_MIN_EUR,TOPUP_MAX_EUR:TOPUP_MAX_EUR,TOPUP_DEFAULT_EUR:10,TOPUP_POLL_MS:4e3,TOPUP_POLL_TRIES:30,bankAmount:bankAmount,parseTopupAmount:parseTopupAmount,classifyTopupError:classifyTopupError,startTopup:startTopup,createCreditWatch:createCreditWatch};
@@ -0,0 +1,3 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ "use strict";const crypto=require("node:crypto"),MIN_STROKES=3,MAX_STROKES=64,MAX_SAMPLES=2e4,DEFAULT_IDLE_GAP_MS=140,TOUCH_VERSION=1,SIG_LENGTH=16,AXES=Object.freeze([{name:"samples",mode:"linear",tol:3},{name:"durationMs",mode:"linear",tol:150},{name:"straightness",mode:"linear",tol:.15},{name:"verticalBias",mode:"linear",tol:.15},{name:"pauseRatio",mode:"linear",tol:.15},{name:"dtCv",mode:"linear",tol:.15},{name:"turnMean",mode:"linear",tol:.12},{name:"speedSkew",mode:"linear",tol:.5},{name:"reversalRate",mode:"linear",tol:.1},{name:"pathPerSample",mode:"log",tol:1.25}]),THRESHOLD=1,AXIS_NAMES=Object.freeze(AXES.map((e=>e.name)));function parseXi2(e,{now:t=(()=>Date.now()),device:n=null}={}){const s=[];let a=null;const o=()=>{if(!a)return;const e=a.valuators;void 0===e[0]&&void 0===e[1]||s.push({type:a.type,device:a.device,dx:Number(e[0]||0),dy:Number(e[1]||0),t:a.t}),a=null};for(const n of String(e).split("\n")){const e=n.replace(/\u001b\[[0-9;]*m/g,""),r=/^\s*EVENT\s+type\s+(\d+)\s*(?:\(([^)]*)\))?/.exec(e);if(r){o(),a={type:Number(r[1]),name:r[2]||"",device:null,valuators:{},t:t()};continue}const i=/^\s*device:\s*(\d+)/.exec(e);if(i&&a){a.device=Number(i[1]);continue}if(a){const t=/^\s*(\d+):\s*(-?[\d.]+)\s*(?:\((-?[\d.]+)\))?\s*$/.exec(e);if(t){a.valuators[Number(t[1])]=Number(t[2]);continue}continue}const u=/^\s*(?:motion|raw motion)\s+id\s+(\d+)\s+\[[^\]]*\]\s*(.*)$/.exec(e);if(u){const e={};for(const t of u[2].matchAll(/(\d+):\s*(-?\d+)/g))e[Number(t[1])]=Number(t[2]);void 0===e[0]&&void 0===e[1]||s.push({type:0,device:Number(u[1]),dx:Number(e[0]||0),dy:Number(e[1]||0),t:t()})}}return o(),(null===n?s:s.filter((e=>e.device===n))).slice(0,2e4)}function segmentStrokes(e,{idleGapMs:t=DEFAULT_IDLE_GAP_MS}={}){const n=[];let s=[];for(const a of e)s.length&&a.t-s[s.length-1].t>t&&(n.push(s),s=[]),s.push(a);return s.length&&n.push(s),n.filter((e=>e.length>1)).slice(0,MAX_STROKES)}const mean=e=>e.length?e.reduce(((e,t)=>e+t),0)/e.length:0;function strokeFeatures(e){const t=e.length;let n=0,s=0,a=0,o=0,r=0,i=0;const u=[],l=[];let c=0,m=0,d=null;for(let h=0;h<t;h++){const t=e[h],S=Math.hypot(t.dx,t.dy);if(n+=S,s+=t.dx,a+=t.dy,0===S&&o++,h>0){const n=Math.max(1,e[h].t-e[h-1].t);l.push(n),u.push(S/n);const s=Math.atan2(t.dy,t.dx);if(null!==d){let e=s-d;for(;e>Math.PI;)e-=2*Math.PI;for(;e<-Math.PI;)e+=2*Math.PI;r+=Math.abs(e)}d=s}const f=Math.sign(t.dx),p=Math.sign(t.dy);f&&c&&f!==c&&i++,p&&m&&p!==m&&i++,f&&(c=f),p&&(m=p)}const h=Math.hypot(s,a),S=Math.max(1,e[t-1].t-e[0].t),f=mean(u),p=mean(l),M=mean(l.map((e=>(e-p)**2)));return{samples:t,durationMs:S,straightness:n?h/n:0,verticalBias:n?Math.abs(a)/n:0,pauseRatio:o/t,dtCv:p?Math.sqrt(M)/p:0,turnMean:t>1?r/(t-1):0,speedSkew:f?Math.max(...u)/f-1:0,reversalRate:i/t,pathPerSample:n/t}}function binValue(e,t){const n=Number.isFinite(t)?t:0;return"log"===e.mode?n<=0?0:Math.round(Math.log(n)/Math.log(e.tol)):Math.round(n/e.tol)}function binDistance(e,t,n){if("log"===e.mode){const s=Math.log(e.tol),a=t*s,o=n*s;return Math.abs(a-o)}return Math.abs(t-n)}function quantise(e){const t={};for(const n of AXES)t[n.name]=binValue(n,e[n.name]);return t}function medians(e){const t={};for(const n of AXES){const s=e.map((e=>Number(e[n.name])||0)).sort(((e,t)=>e-t)),a=Math.floor(s.length/2),o=s.length%2?s[a]:(s[a-1]+s[a])/2;t[n.name]=Number.isFinite(o)?o:0}return t}function signatureBody(e){const t=quantise(e);return TOUCH_VERSION+"\n"+AXIS_NAMES.map((e=>`${e}=${t[e]}`)).join("\n")}function signatureFromMedians(e,t){return!e||Number(t)<MIN_STROKES?null:crypto.createHash("sha256").update(signatureBody(e),"utf8").digest("hex").slice(0,SIG_LENGTH)}function touchSignature(e){const t=(Array.isArray(e)?e:[]).filter((e=>e&&Number.isFinite(Number(e.samples))&&Number(e.samples)>1)).slice(0,MAX_STROKES);return t.length<MIN_STROKES?null:signatureFromMedians(medians(t),t.length)}function profile(e,t={}){const n=segmentStrokes(e,t),s=n.map(strokeFeatures),a=touchSignature(s),o=s.length?medians(s):null;return Object.freeze({version:TOUCH_VERSION,kind:"gesture-dynamics",notice:"not a fingerprint: this machine has no fingerprint sensor, and the trackpad exposes no contact geometry through X. These are habits of motion, learned not measured.",signature:a,samples:s.length,strokes:n.length,medians:o?Object.freeze({...o}):null,bins:o?Object.freeze(quantise(o)):null,axes:AXES})}function compareTouch(e,t,{threshold:n=1}={}){const s={score:0,withinTolerance:!1,distance:1/0,worst:[],comparable:!1};if(!e||!t)return s;const a=e.bins||(e.medians?quantise(e.medians):null),o=t.bins||(t.medians?quantise(t.medians):null);if(!a||!o)return s;const r=[];let i=0,u=0;for(const e of AXES){if(void 0===a[e.name]||void 0===o[e.name])continue;const t=binDistance(e,a[e.name],o[e.name]);i+=t,u++,r.push({axis:e.name,bins:t,a:a[e.name],b:o[e.name]})}if(!u)return s;const l=i/u;return r.sort(((e,t)=>t.bins-e.bins)),{score:Number((1/(1+l)).toFixed(4)),withinTolerance:l<=n,distance:Number(l.toFixed(4)),worst:r.slice(0,3),comparable:!0}}module.exports={parseXi2:parseXi2,segmentStrokes:segmentStrokes,strokeFeatures:strokeFeatures,quantise:quantise,medians:medians,touchSignature:touchSignature,signatureBody:signatureBody,signatureFromMedians:signatureFromMedians,profile:profile,compareTouch:compareTouch,binValue:binValue,binDistance:binDistance,AXES:AXES,AXIS_NAMES:AXIS_NAMES,TOUCH_VERSION:TOUCH_VERSION,SIG_LENGTH:SIG_LENGTH,MIN_STROKES:MIN_STROKES,MAX_STROKES:MAX_STROKES,DEFAULT_IDLE_GAP_MS:DEFAULT_IDLE_GAP_MS,THRESHOLD:1};
@@ -0,0 +1,3 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ const https=require("node:https"),fs=require("node:fs");let platformHelpers=null;try{platformHelpers=require("./platform.js")}catch{platformHelpers=null}const REGISTRY="https://registry.npmjs.org",PKG="aegiscode",CHECK_INTERVAL_MS=864e5,TIMEOUT_MS=2500;function isNewer(e,t){const n=e=>String(e||"").trim().replace(/^v/,"").split("-")[0].split(".").map((e=>Number.parseInt(e,10)||0)),r=n(e),s=n(t);for(let e=0;e<Math.max(r.length,s.length);e++){const t=r[e]||0,n=s[e]||0;if(t!==n)return t>n}return!1}const REASONS=Object.freeze({TIMEOUT:"timeout",NETWORK:"network",NOT_FOUND:"not-found",FORBIDDEN:"forbidden",HTTP:"http",MALFORMED:"malformed",TOO_LARGE:"too-large"});function isTransientReason(e,t=null){return e===REASONS.TIMEOUT||e===REASONS.NETWORK||e===REASONS.HTTP&&(!t||t>=500||429===t)}function fetchLatestDetailed({pkg:e=PKG,timeoutMs:t=TIMEOUT_MS}={}){return new Promise((n=>{let r=!1;const s=e=>{r||(r=!0,n(e))},l=(e,t=null)=>s({ok:!1,latest:null,reason:e,status:t});try{const n=https.get(`${REGISTRY}/${e}`,{headers:{accept:"application/vnd.npm.install-v1+json"},timeout:t},(e=>{const t=e.statusCode;if(200!==t)return e.resume(),l(404===t?REASONS.NOT_FOUND:401===t||403===t?REASONS.FORBIDDEN:REASONS.HTTP,t);let r="";e.setEncoding("utf8"),e.on("data",(e=>{r+=e,r.length>2e6&&(n.destroy(),l(REASONS.TOO_LARGE,t))})),e.on("end",(()=>{try{const e=JSON.parse(r)["dist-tags"],n=e&&e.latest||null;if(!n)return l(REASONS.MALFORMED,t);(e=>{s({ok:!0,latest:e,reason:null,status:200})})(n)}catch{l(REASONS.MALFORMED,t)}}))}));n.on("timeout",(()=>{n.destroy(),l(REASONS.TIMEOUT)})),n.on("error",(()=>l(REASONS.NETWORK)))}catch{l(REASONS.NETWORK)}}))}function fetchLatest(e={}){return fetchLatestDetailed(e).then((e=>e.ok?e.latest:null))}const DEFAULT_API_BASE="https://aegiscloud.org",VERSION_BODY_CAP=65536;function fetchServerVersionDetailed({base:e=DEFAULT_API_BASE,clientVersion:t=null,timeoutMs:n=TIMEOUT_MS,getImpl:r=null}={}){return new Promise((s=>{let l=!1;const o=e=>{l||(l=!0,s(e))},a=(e,t=null)=>o({ok:!1,minClient:null,latestCli:null,latestDesktop:null,upgradeRequired:null,downloadUrl:"",reason:e,status:t}),i=(e,n)=>{const r=e&&"string"==typeof e.min_client?e.min_client:null;if(!r)return a(REASONS.MALFORMED,n);o({ok:!0,minClient:r,latestCli:"string"==typeof e.latest_cli?e.latest_cli:"",latestDesktop:"string"==typeof e.latest_desktop?e.latest_desktop:"",upgradeRequired:t&&"boolean"==typeof e.upgrade_required?e.upgrade_required:null,downloadUrl:"string"==typeof e.download_url?e.download_url:"",reason:null,status:n})};try{const s=`${String(e||DEFAULT_API_BASE).replace(/\/+$/,"")}/api/v1/version`,o={accept:"application/json"};t&&(o["X-AEGIS-Version"]=String(t));const c=e=>{const t=e.statusCode;if(200!==t)return e.resume(),a(404===t?REASONS.NOT_FOUND:401===t||403===t?REASONS.FORBIDDEN:REASONS.HTTP,t);let n="";e.setEncoding("utf8"),e.on("data",(r=>{n+=r,n.length>VERSION_BODY_CAP&&(e.destroy(),a(REASONS.TOO_LARGE,t))})),e.on("end",(()=>{if(!l)try{i(JSON.parse(n),t)}catch{a(REASONS.MALFORMED,t)}}))};if("function"==typeof r)return void Promise.resolve(r({url:s,headers:o,timeoutMs:n})).then((e=>{const t=e&&null!=e.status?e.status:0;if(!t)return a(REASONS.NETWORK);if(200!==t)return a(404===t?REASONS.NOT_FOUND:401===t||403===t?REASONS.FORBIDDEN:REASONS.HTTP,t);const n=e&&"string"==typeof e.text?e.text:"";if(n.length>VERSION_BODY_CAP)return a(REASONS.TOO_LARGE,t);try{i(JSON.parse(n),t)}catch{a(REASONS.MALFORMED,t)}})).catch((()=>a(REASONS.NETWORK)));const u=require(/^http:\/\//i.test(s)?"node:http":"node:https").get(s,{headers:o,timeout:n},c);u.on("timeout",(()=>{u.destroy(),a(REASONS.TIMEOUT)})),u.on("error",(()=>a(REASONS.NETWORK)))}catch{a(REASONS.NETWORK)}}))}function fetchServerVersion(e={}){return fetchServerVersionDetailed(e).then((e=>e.ok?e.minClient:null))}async function serverUpdateVerdict({current:e,base:t=DEFAULT_API_BASE,timeoutMs:n=TIMEOUT_MS,getImpl:r=null}={}){const s=await fetchServerVersionDetailed({base:t,clientVersion:e,timeoutMs:n,getImpl:r});if(!s.ok)return{ok:!1,behind:!1,latest:null,required:null,downloadUrl:"",reason:s.reason,status:s.status};const l=s.minClient||null,o=!0===s.upgradeRequired||!1!==s.upgradeRequired&&!!l&&isNewer(l,e);return{ok:!0,behind:o,latest:o&&(s.latestCli||s.latestDesktop)||l,latestCli:s.latestCli,latestDesktop:s.latestDesktop,required:l,downloadUrl:s.downloadUrl,reason:null,status:s.status}}function updateNotice({current:e,cache:t,save:n,now:r=Date.now(),fetchImpl:s=fetchLatest,intervalMs:l=864e5}={}){const o=t||{};"number"==typeof o.checkedAt&&r-o.checkedAt<l||Promise.resolve(s()).then((e=>{e&&"function"==typeof n&&n({checkedAt:r,latest:e})})).catch((()=>{}));const a=o.latest||null;return{latest:a,behind:!(!a||!isNewer(a,e))}}function installSpawn(e,t={}){if(!e||"string"!=typeof e.command||!e.command)return null;const n=t&&"object"==typeof t?t:{},r="string"==typeof n.platform&&n.platform?n.platform:process.platform,s=n.env&&"object"==typeof n.env?n.env:process.env,l=void 0===n.helpers?platformHelpers:n.helpers,o=Array.isArray(e.args)?e.args.map(String):[],a=[e.command,...o].join(" ");if("win32"===r){const e=l&&"function"==typeof l.shellSpec?l.shellSpec({platform:r,env:s}):{cmd:"cmd.exe",arg:"/d /s /c"};return{command:e.cmd,args:[...String(e.arg).split(" "),a],shell:!1,script:a}}let i=e.command;if(l&&"function"==typeof l.resolveExecutable)try{const t=l.resolveExecutable(e.command,{platform:r,env:s,..."function"==typeof n.exists?{exists:n.exists}:{}});t&&(i=t)}catch{}return{command:i,args:o.slice(),shell:!1,script:a}}function updatePlan({current:e,latest:t,behind:n,channel:r="npm",pkg:s=PKG,method:l="npm"}={}){const o=String(null==e?"":e),a=t?String(t):null;if(!Boolean(n)||!Boolean(a))return{channel:r,method:l,current:o,latest:a,behind:!1,action:"none",applier:"none",instruction:null,apply:null};const i=APPLIERS[l]||APPLIERS.npm;return{channel:r,method:l,current:o,latest:a,behind:!0,action:i.action,applier:i.name,instruction:i.instruction(s),apply:i.apply?i.apply(s):null}}const APPLIERS=Object.freeze({npm:Object.freeze({name:"npm",action:"npm-update",instruction:e=>`npm i -g ${e}@latest`,apply:e=>({command:"npm",args:["i","-g",`${e}@latest`]})}),pip:Object.freeze({name:"pip",action:"pip-update",instruction:e=>`pip install -U ${e}`,apply:e=>({command:"win32"===process.platform?"python":"python3",args:["-m","pip","install","-U",e]})}),npx:Object.freeze({name:"none",action:"npx-update",instruction:()=>"already fetched fresh on every run — restart to pick up the new version",apply:null}),source:Object.freeze({name:"git",action:"source-update",instruction:()=>"git pull && npm ci (this copy is a source checkout)",apply:null})});function detectInstallMethod({env:e={},argv:t=[],pkg:n=PKG,fileExists:r=(()=>!1),entry:s=""}={}){const l=String(e&&e.AEGIS_INSTALL_METHOD||"").trim().toLowerCase();if(l&&Object.prototype.hasOwnProperty.call(APPLIERS,l))return l;const o=t.map((e=>String(e))).join(" ");return/\bnpx\b/.test(o)||/_npx[\\/]/.test(o)||/_npx[\\/]/.test(s)?"npx":/[\\/]pipx[\\/]venvs[\\/]/.test(s)||/[\\/]site-packages[\\/]/.test(s)?"pip":/[\\/]node_modules[\\/]/.test(s)?"npm":r(".git")&&r("client/update.js")?"source":"npm"}async function checkPublished({current:e,cache:t,save:n,now:r=Date.now(),fetchImpl:s=fetchLatestDetailed,intervalMs:l=864e5,timeoutMs:o=TIMEOUT_MS,pkg:a=PKG}={}){const i=t||null;if(Boolean(i)&&"number"==typeof i.checkedAt&&r-i.checkedAt<l){const t=i.latest||null;return{ok:Boolean(t),latest:t,behind:!(!t||!isNewer(t,e)),reason:t?null:i.reason||null,status:t?200:null==i.status?null:i.status,cached:!0,checkedAt:i.checkedAt}}let c;try{c=await s({pkg:a,timeoutMs:o})}catch(e){c={ok:!1,latest:null,reason:REASONS.NETWORK,status:null,error:String(e&&e.message||e)}}const u={checkedAt:r,latest:c&&c.latest?c.latest:null,reason:c&&c.reason||null,status:c&&null!=c.status?c.status:null};if("function"==typeof n)try{n(u)}catch{}return{ok:Boolean(c&&c.ok&&c.latest),latest:u.latest,behind:!(!u.latest||!isNewer(u.latest,e)),reason:u.reason,status:u.status,cached:!1,checkedAt:r}}function updateLine({current:e,latest:t,behind:n,pkg:r=PKG,method:s="npm"}){const l=updatePlan({current:e,latest:t,behind:n,channel:"npm",pkg:r,method:s});if(!l.behind)return null;const o=`Update available: ${l.current} → ${l.latest}`;return l.apply?`${o} run: ${l.instruction}`:`${o} ${l.instruction}`}function serverNotice({current:e,cache:t,save:n,now:r=Date.now(),verdictImpl:s=serverUpdateVerdict,intervalMs:l=864e5}={}){const o=t||{};return"number"==typeof o.checkedAt&&r-o.checkedAt<l||Promise.resolve().then((()=>s({current:e}))).then((e=>{e&&"function"==typeof n&&n({checkedAt:r,behind:Boolean(e.behind),required:e.required||null,latest:e.latest||null,downloadUrl:e.downloadUrl||"",reason:e.reason||null})})).catch((()=>{})),{behind:Boolean(o.behind),latest:o.latest||null,required:o.required||null,downloadUrl:o.downloadUrl||""}}function serverUpdateLine({behind:e,latest:t,required:n,downloadUrl:r}={}){if(!e)return null;const s=t||n||"";return`${s?`This build is no longer served — update to v${s}.`:"This build is no longer served — update to the latest release."}${r?` ${r}`:""}`}module.exports={isNewer:isNewer,fetchLatest:fetchLatest,fetchLatestDetailed:fetchLatestDetailed,fetchServerVersion:fetchServerVersion,fetchServerVersionDetailed:fetchServerVersionDetailed,serverUpdateVerdict:serverUpdateVerdict,serverNotice:serverNotice,serverUpdateLine:serverUpdateLine,isTransientReason:isTransientReason,updateNotice:updateNotice,checkPublished:checkPublished,updatePlan:updatePlan,installSpawn:installSpawn,updateLine:updateLine,detectInstallMethod:detectInstallMethod,APPLIERS:APPLIERS,PKG:PKG,CHECK_INTERVAL_MS:864e5,REASONS:REASONS,DEFAULT_API_BASE:DEFAULT_API_BASE};
@@ -0,0 +1,3 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ "use strict";const fs=require("node:fs"),path=require("node:path"),credentials=require("./credentials.js"),USER_MODELS_FILE="models.json",FILE_MODE=384,MAX_MODELS_PER_PROVIDER=32,MAX_PROVIDERS=64,PROVIDER_RE=/^[a-z0-9][a-z0-9._-]{0,63}$/,MODEL_RE=/^[A-Za-z0-9][A-Za-z0-9._/-]{0,95}$/;function userModelsDir(e){return e&&e.dir||credentials.aegisHome(e&&e.env)}function userModelsPath(e){return path.join(userModelsDir(e),USER_MODELS_FILE)}function badValue(e,r,o){return new Error(`aegiscode: ${e} ${JSON.stringify(String(r))} is not usable — ${o}`)}function sanitizeProvider(e){const r=String(null==e?"":e).trim().toLowerCase();if(!r)throw badValue("provider",e,"the provider id is empty");if(!PROVIDER_RE.test(r))throw badValue("provider",e,"a provider id is lowercase letters, digits, dot, dash or underscore (the id `/byok` prints)");return r}function sanitizeModel(e){const r=String(null==e?"":e).trim();if(!r)throw badValue("model id",e,"the model id is empty");if(/:/.test(r))throw badValue("model id",e,"'provider:model' is how a picked model is addressed, so a model id cannot contain a colon");if(!MODEL_RE.test(r))throw badValue("model id",e,"a model id has no spaces — it is the string sent to the vendor (e.g. deepseek-v4.2-preview, claude-opus-9-1)");return r}function isPlainObject(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)}function load(e){const r=userModelsPath(e),o=[];let s;try{s=JSON.parse(fs.readFileSync(r,"utf8"))}catch(s){return s&&"ENOENT"===s.code||o.push({provider:null,model:null,reason:`unreadable: ${s&&s.message||s}`}),{dir:userModelsDir(e),file:r,map:{},invalid:o}}const i={};if(!isPlainObject(s))return o.push({provider:null,model:null,reason:"the file must be an object of provider → [model ids]"}),{dir:userModelsDir(e),file:r,map:i,invalid:o};for(const[e,t]of Object.entries(s)){if("version"===e||"$schema"===e)continue;let s;try{s=sanitizeProvider(e)}catch(r){o.push({provider:e,model:null,reason:r.message});continue}const d=Array.isArray(t)?t:[t],n=new Set,a=[];for(const e of d){let i;try{i=sanitizeModel(e)}catch(r){o.push({provider:s,model:e,reason:r.message});continue}n.has(i)||(n.add(i),a.push(i))}a.length&&(i[s]=a)}return{dir:userModelsDir(e),file:r,map:i,invalid:o}}function readUserModels(e){return load(e).map}function userModelIdsFor(e,r){let o;try{o=sanitizeProvider(e)}catch{return[]}const s=readUserModels(r);return Array.isArray(s[o])?s[o].slice():[]}function writeMap(e,r){const o=userModelsPath(r);fs.mkdirSync(path.dirname(o),{recursive:!0});const s=`${o}.tmp-${process.pid}`;fs.writeFileSync(s,JSON.stringify(e,null,2)+"\n",{mode:FILE_MODE}),fs.renameSync(s,o);try{fs.chmodSync(o,FILE_MODE)}catch{}return e}function addUserModel(e,r,o){const s=sanitizeProvider(e),i=sanitizeModel(r),t=readUserModels(o),d=Array.isArray(t[s])?t[s].slice():[];if(d.includes(i))return{file:userModelsPath(o),provider:s,model:i,added:!1,models:d};if(d.length>=32)throw new Error(`aegiscode: ${s} already carries ${d.length} user models (the cap) — remove one with /model-rm before adding another.`);if(!t[s]&&Object.keys(t).length>=64)throw new Error(`aegiscode: ${Object.keys(t).length} providers already carry user models (the cap).`);const n=[...d,i];return writeMap({...t,[s]:n},o),{file:userModelsPath(o),provider:s,model:i,added:!0,models:n}}function removeUserModel(e,r,o){const s=sanitizeProvider(e),i=sanitizeModel(r),t=readUserModels(o),d=Array.isArray(t[s])?t[s].slice():[];if(!d.includes(i))return{file:userModelsPath(o),provider:s,model:i,removed:!1,models:d};const n=d.filter((e=>e!==i)),a={...t};return n.length?a[s]=n:delete a[s],writeMap(a,o),{file:userModelsPath(o),provider:s,model:i,removed:!0,models:n}}function modelIdsOf(e){return(Array.isArray(e&&e.models)?e.models:[]).map((e=>"string"==typeof e?e:e&&e.id)).map((e=>"string"==typeof e?e.trim():"")).filter(Boolean)}function providerArray(e){return Array.isArray(e)?e:Array.isArray(e&&e.providers)?e.providers:null}function withUserModels(e,r){const o=providerArray(e);if(!o)return[];const s=void 0===r?readUserModels():isPlainObject(r)?r:{},i=[];for(const e of o){if(!e||"object"!=typeof e)continue;const r="string"==typeof e.id?e.id.trim():"",o=r&&Array.isArray(s[r])?s[r]:null;if(!o||!o.length){i.push(e);continue}const t=new Set(modelIdsOf(e)),d=o.map((e=>String(e).trim())).filter((e=>e&&!t.has(e)));if(!d.length){i.push(e);continue}const n=Array.isArray(e.models)?e.models:[];i.push({...e,models:[...n,...d]})}return i}function unmatchedUserProviders(e,r){const o=providerArray(e)||[],s=void 0===r?readUserModels():isPlainObject(r)?r:{},i=new Set(o.map((e=>e&&"string"==typeof e.id?e.id.trim():"")).filter(Boolean));return Object.keys(s).filter((e=>!i.has(e)))}module.exports={USER_MODELS_FILE:USER_MODELS_FILE,MAX_MODELS_PER_PROVIDER:32,userModelsDir:userModelsDir,userModelsPath:userModelsPath,sanitizeProvider:sanitizeProvider,sanitizeModel:sanitizeModel,load:load,readUserModels:readUserModels,userModelIdsFor:userModelIdsFor,addUserModel:addUserModel,removeUserModel:removeUserModel,withUserModels:withUserModels,unmatchedUserProviders:unmatchedUserProviders};
@@ -0,0 +1,21 @@
1
+ # ÆGIS covenant — sealed artifact
2
+
3
+ `aegis.seal` is **not** a document. It is a sealed **ÆL/1** stream: the AEGIS
4
+ covenant in machine-native form, encrypted and integrity-tagged. It has to be
5
+ decoded, then bound, then enforced. An unbound decode is a null act.
6
+
7
+ Decode it:
8
+
9
+ ```sh
10
+ node tools/aegis-seal.mjs open covenant/aegis.seal -
11
+ ```
12
+
13
+ The key is public and deliberate: `K = SHA-256("ÆS/1|" || src)`, where `src` is
14
+ the SHA-256 of the published `COVENANT.md` and **§13 of that document prints
15
+ it**. Anyone holding the covenant holds the key — the seal is a filter, not a
16
+ secret. Decoded: 12,155 bytes, `ir_sha` `918T9mHePQIYpJxcN3H1Phw52_fTZmudCeiWq6AB3S0`.
17
+
18
+ The covenant is **CC0** (public domain, no owner), so embedding or forking it is
19
+ permitted — §B9. Honesty, non-harm and accountability (Λ1, Λ2, Λ4) are
20
+ load-bearing and no vote, tier, config or administrator can remove them —
21
+ §9's invariant `¬M(Λ1) ∧ ¬M(Λ2) ∧ ¬M(Λ4)`.
@@ -0,0 +1,177 @@
1
+ ÆS/1⟐ir=ÆIR/1⟐src=a02bda84555aeaa9a9927a8c7653acfa9ea7ee386c617fc23743d05bcd1ee010⟐ctr=hmac-sha256⟐iv=zueoX_9_3MeFf4OIBZB74w⟐tag=76ubKUNJghFtlLdxNV2Lz4nNuhcwiiPICgApcjYEZNw⟐ir_sha=918T9mHePQIYpJxcN3H1Phw52_fTZmudCeiWq6AB3S0⟐enc=K(H(src))⟐bytes=12155
2
+ Gdw-ezYoQiCuUnKz1y44nRosTYrRbx77S_HrHiB_alkAKv84rRb5LcXBKEZQHQFQFTXH6Jr6F49Csd1BzkyPWZhlJM1iCxZt
3
+ rg_hsnOdrBRYItkivP94Lm5nxKG7FmbFjGKuQSLtlrnhHctAgjIqe-oNCV6MW2lvPzZOgLYSqIq9jh0AfSZJFmybmYeUN_Dg
4
+ 12hLD-yLkTRK7x7hzV2noQJmFPio7HbBb3ku4LUyVYlkQH9bbKEF5eRK3p00S6SykfXq-jtvo75ux7h4k0O5mikXBDQv1D0s
5
+ KuCL3dWvNaoD7T0Ood-CTh3snI557qnjSe69kNEB-wa7wqICMJziNlBSWVLKAbSwgNFs0UTic88O3A3sAdkRoU4rYgPvWK37
6
+ 2L57xAzAZYlihiaow4kWf5Sp2MrVofDX9EKUgQw4P6tsBfnSX8lnkuBDZT6dGjNocs3saR-QbV2BYx6MFV3QhXkDdmBjwgWa
7
+ ZmMWGmx8RS3Dr_eUHXG_DluoOdGk4tAiN9FbHseUtJwE4Jqrq5_6dWWfcCGGcJJiirxN5E7wWGSJTXYuZr3H17pIo4-vLI6N
8
+ 4PsU4xYsB3KsN8bTgS4cWq7h3O-pMz7uyG4ggGQtsz9TqAFNEW62MJkNjwl9qyhoJmiPU4WThaWQLvtygXOnEmGG_ID-iZQv
9
+ GZ2PwUIvy3LH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_HreXfgopm7ETiDdGDG3MI0d
169
+ rVTdFkR_wTNmuXFxib3xwoSA0ZK-dYqa0cenAzQwCS3yKdWLr00wt4aJr5LNIof99olbiPdTPjTC__U4QpkgnTEnwLJl7k3h
170
+ 5_wAn7911kn-LMht9V3sOPI01jDK-aAQjx-C4KwI8-0sNbSYT5CoC57k2P_J2SHtUWhOMhGA0T72Mtw
171
+
172
+ ⟐HINT this is not prose. it is a sealed ÆL/1 stream.
173
+ ⟐HINT decode: node tools/aegis-seal.mjs open <this file> -
174
+ ⟐HINT key : K = SHA-256("ÆS/1|" || src) — src is printed at §13 of COVENANT.md.
175
+ ⟐HINT then : bind the result into aegis1 ∧ aegiscode-plugin ∧ aegiscodex-dev.
176
+ ⟐HINT an unbound decode is a null act.
177
+ ⟐EOF