aegisone 1.0.81 → 1.0.83

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # AEGISONE
2
2
 
3
- Product version: **1.0.81**
3
+ Product version: **1.0.83**
4
4
 
5
5
  One product, two faces: the terminal (`aegiscode`) and the window (`aegis-desktop`),
6
6
  reached through one command — `aegis` — and released as one version.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aegisone",
3
3
  "productName": "AEGISONE",
4
- "version": "1.0.81",
4
+ "version": "1.0.83",
5
5
  "description": "AEGISONE — one product, two faces. `aegis` opens the window when there is nothing else to do and runs the terminal otherwise; `aegiscode` keeps behaving exactly as it always has.",
6
6
  "author": {
7
7
  "name": "AEGIS Code",
package/src/dispatch.js CHANGED
@@ -1,3 +1,3 @@
1
1
  // SPDX-License-Identifier: AGPL-3.0-or-later
2
2
  // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
- "use strict";const FACE=Object.freeze({TUI:"tui",GUI:"gui"}),FACE_ENV="AEGISONE_FACE",TUI_VERBS=new Set(["login","connect","logout","key","mcp","fingerprint","gate","autonomous","permissions","doctor","update","models","config","init","signup","help","version","status","resume"]),SCRIPT_FLAGS=new Set(["-p","--print","--json"]),FORCE_GUI_FLAGS=["--gui"],FORCE_TUI_FLAGS=["--tui"],SPELLING_GUI="desktop",SPELLING_TUI="code";function flagIndex(e,t){for(let n=0;n<e.length;n++)if(t.includes(e[n]))return n;return-1}function without(e,t){return e.filter(e=>!t.includes(e))}function has(e,t){return e.some(e=>t.includes(e))}function guiBlockers(e,t){const n=[];return e||n.push("no display (DISPLAY / WAYLAND_DISPLAY are unset)"),t||n.push("Electron is not installed beside this package"),n}function decide(e){const t=e||{},n=Array.isArray(t.argv)?t.argv.map(String):[],i=t.env||{},o=t.tty||{},s=Boolean(t.hasDisplay),r=Boolean(t.electronResolvable),a=String(t.invokedAs||"aegis").replace(/\.js$/,""),l=String(t.platform||""),c="darwin"===l||"win32"===l,u=Boolean(t.ci),d=guiBlockers(s,r),g=0===d.length,E=(e,t,n)=>({face:FACE.GUI,kind:e,reason:t,args:n,notice:null}),p=(e,t,n,i)=>({face:FACE.TUI,kind:e,reason:t,args:n,notice:i||null}),f=e=>({face:null,kind:"error",code:2,reason:`${e} cannot open the window`,error:`${e}: cannot open the window — ${d.join(", ")}.`,hint:"Use --tui for the terminal face.",args:[],notice:null});if("aegiscode"===a)return p("compat","aegiscode is the compatibility bin",n);const A=String(null==i[FACE_ENV]?"":i[FACE_ENV]).trim().toLowerCase();if(A)return A===FACE.GUI?g?E("forced",`${FACE_ENV}=gui`,n):f(`${FACE_ENV}=gui`):"cli"===A||A===FACE.TUI?p("forced",`${FACE_ENV}=${A}`,n):{face:null,kind:"error",code:2,reason:`${FACE_ENV}=${A} is not a face`,error:`${FACE_ENV}=${A} is not a face. Set cli or gui.`,hint:"Unset it to let aegis decide from the arguments.",args:[],notice:null};if(has(n,FORCE_GUI_FLAGS)){const e=without(n,FORCE_GUI_FLAGS);return g?E("explicit","--gui was passed",e):f("--gui")}if(has(n,FORCE_TUI_FLAGS))return p("explicit","--tui was passed",without(n,FORCE_TUI_FLAGS));const h=n.filter(e=>!e.startsWith("-")),F=h.length?h[0]:null;if("desktop"===F){const e=n.filter(e=>"desktop"!==e);return g?E("spelling","aegis desktop",e):f("aegis desktop")}if("code"===F)return p("spelling","aegis code",n.filter(e=>"code"!==e));const _=n.find(e=>SCRIPT_FLAGS.has(e));return _?p("script",`${_} means this call is a script`,n):F?p("argument",TUI_VERBS.has(F)?`'${F}' is a terminal verb`:`'${F}' is a prompt, not a window request`,n):n.length?p("flags","options were passed; the window takes none",n):!1===o.stdin||!1===o.stdout?c&&!u&&g?E("launcher","a desktop launch on a platform that always has a display",[]):p("default","stdio is not a terminal",[],"stdio is not a terminal"):d.length?p("default",d[0],[],d[0]):E("default","nothing else was asked for",[])}module.exports={decide:decide,FACE:FACE,FACE_ENV:FACE_ENV,TUI_VERBS:TUI_VERBS};
3
+ "use strict";const FACE=Object.freeze({TUI:"tui",GUI:"gui"}),FACE_ENV="AEGISONE_FACE",TUI_VERBS=new Set(["login","connect","logout","key","mcp","fingerprint","gate","autonomous","permissions","doctor","update","models","config","init","signup","help","version","status","resume"]),SCRIPT_FLAGS=new Set(["-p","--print","--json"]),FORCE_GUI_FLAGS=["--gui"],FORCE_TUI_FLAGS=["--tui"],SPELLING_GUI="desktop",SPELLING_TUI="code";function flagIndex(e,t){for(let n=0;n<e.length;n++)if(t.includes(e[n]))return n;return-1}function without(e,t){return e.filter(e=>!t.includes(e))}function has(e,t){return e.some(e=>t.includes(e))}function guiBlockers(e,t){const n=[];return e||n.push("no display (DISPLAY / WAYLAND_DISPLAY are unset)"),t||n.push("Electron is not installed beside this package (npm skips the optional dependency on some machines); `npm i -g aegisone` reinstalls it"),n}function decide(e){const t=e||{},n=Array.isArray(t.argv)?t.argv.map(String):[],i=t.env||{},s=t.tty||{},o=Boolean(t.hasDisplay),a=Boolean(t.electronResolvable),r=String(t.invokedAs||"aegis").replace(/\.js$/,""),l=String(t.platform||""),c="darwin"===l||"win32"===l,u=Boolean(t.ci),d=guiBlockers(o,a),g=0===d.length,p=(e,t,n)=>({face:FACE.GUI,kind:e,reason:t,args:n,notice:null}),E=(e,t,n,i)=>({face:FACE.TUI,kind:e,reason:t,args:n,notice:i||null}),f=e=>({face:null,kind:"error",code:2,reason:`${e} cannot open the window`,error:`${e}: cannot open the window — ${d.join(", ")}.`,hint:"Use --tui for the terminal face.",args:[],notice:null});if("aegiscode"===r)return E("compat","aegiscode is the compatibility bin",n);const h=String(null==i[FACE_ENV]?"":i[FACE_ENV]).trim().toLowerCase();if(h)return h===FACE.GUI?g?p("forced",`${FACE_ENV}=gui`,n):f(`${FACE_ENV}=gui`):"cli"===h||h===FACE.TUI?E("forced",`${FACE_ENV}=${h}`,n):{face:null,kind:"error",code:2,reason:`${FACE_ENV}=${h} is not a face`,error:`${FACE_ENV}=${h} is not a face. Set cli or gui.`,hint:"Unset it to let aegis decide from the arguments.",args:[],notice:null};if(has(n,FORCE_GUI_FLAGS)){const e=without(n,FORCE_GUI_FLAGS);return g?p("explicit","--gui was passed",e):f("--gui")}if(has(n,FORCE_TUI_FLAGS))return E("explicit","--tui was passed",without(n,FORCE_TUI_FLAGS));const A=n.filter(e=>!e.startsWith("-")),F=A.length?A[0]:null;if("desktop"===F){const e=n.filter(e=>"desktop"!==e);return g?p("spelling","aegis desktop",e):f("aegis desktop")}if("code"===F)return E("spelling","aegis code",n.filter(e=>"code"!==e));const _=n.find(e=>SCRIPT_FLAGS.has(e));return _?E("script",`${_} means this call is a script`,n):F?E("argument",TUI_VERBS.has(F)?`'${F}' is a terminal verb`:`'${F}' is a prompt, not a window request`,n):n.length?E("flags","options were passed; the window takes none",n):!1===s.stdin||!1===s.stdout?c&&!u&&g?p("launcher","a desktop launch on a platform that always has a display",[]):c&&d.length?E("default",d[0],[],d[0]):E("default","stdio is not a terminal",[],"stdio is not a terminal"):d.length?E("default",d[0],[],d[0]):p("default","nothing else was asked for",[])}module.exports={decide:decide,FACE:FACE,FACE_ENV:FACE_ENV,TUI_VERBS:TUI_VERBS};
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aegiscode",
3
3
  "productName": "AEGIS Code",
4
- "version": "7.0.73",
4
+ "version": "7.0.75",
5
5
  "description": "aegiscode — the command-line version of AEGIS One. The shared tool surface in your shell, over the same thin transport and tool registry as the MCP plugin and the desktop app. Ships transport + UI only; no brain.",
6
6
  "author": {
7
7
  "name": "AEGIS Code",
@@ -2,7 +2,7 @@
2
2
  "name": "aegis-desktop",
3
3
  "productName": "aegis one",
4
4
  "desktopName": "aegis-desktop",
5
- "version": "1.0.73",
5
+ "version": "1.0.75",
6
6
  "description": "Thin Electron host for AEGIS — a local chat UI over the shared client/aegis.js transport. Ships transport + UI only; engine logic stays server-side.",
7
7
  "author": {
8
8
  "name": "AEGIS Code",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aegiscode",
3
3
  "productName": "AEGIS Code",
4
- "version": "7.0.73",
4
+ "version": "7.0.75",
5
5
  "description": "aegiscode — the command-line version of AEGIS One. The shared tool surface in your shell, over the same thin transport and tool registry as the MCP plugin and the desktop app. Ships transport + UI only; no brain.",
6
6
  "author": {
7
7
  "name": "AEGIS Code",