aegisone 1.0.63 → 1.0.65
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 +1 -1
- package/bin/aegis.js +1 -1
- package/package.json +1 -1
- package/scripts/bump.mjs +1 -1
- package/scripts/bundle.js +1 -1
- package/scripts/postinstall.mjs +1 -1
- package/scripts/predist.mjs +1 -1
- package/src/child.js +1 -1
- package/src/dispatch.js +1 -1
- package/src/doctor.js +1 -1
- package/src/probes.js +1 -1
- package/src/productupdate.js +1 -1
- package/src/protocol.js +1 -1
- package/src/release.js +1 -1
- package/src/selfhost.js +1 -1
- package/vendor/cli/package.json +1 -1
- package/vendor/cli/scripts/check.mjs +1 -1
- package/vendor/cli/scripts/demo.mjs +1 -1
- package/vendor/cli/scripts/postinstall.mjs +1 -1
- package/vendor/cli/scripts/predist.mjs +1 -1
- package/vendor/cli/scripts/runtests.mjs +1 -1
- package/vendor/cli/src/app.js +1 -1
- package/vendor/cli/src/art.js +1 -1
- package/vendor/cli/src/chatflow.js +1 -1
- package/vendor/cli/src/checkpoint.js +1 -1
- package/vendor/cli/src/clipboard.js +1 -1
- package/vendor/cli/src/cloudsync.js +1 -1
- package/vendor/cli/src/commands.js +2 -2
- package/vendor/cli/src/config.js +1 -1
- package/vendor/cli/src/connect.js +1 -1
- package/vendor/cli/src/devrun.js +1 -1
- package/vendor/cli/src/diff.js +1 -1
- package/vendor/cli/src/diffview.js +1 -1
- package/vendor/cli/src/dream.js +1 -1
- package/vendor/cli/src/engine.js +1 -1
- package/vendor/cli/src/events.js +1 -1
- package/vendor/cli/src/export.js +1 -1
- package/vendor/cli/src/fingerprint.js +1 -1
- package/vendor/cli/src/format.js +1 -1
- package/vendor/cli/src/fuzzy.js +1 -1
- package/vendor/cli/src/history.js +1 -1
- package/vendor/cli/src/init.js +1 -1
- package/vendor/cli/src/markdown.js +1 -1
- package/vendor/cli/src/models.js +1 -1
- package/vendor/cli/src/overlays.js +1 -1
- package/vendor/cli/src/panels.js +1 -1
- package/vendor/cli/src/ping.js +1 -1
- package/vendor/cli/src/presence.js +1 -1
- package/vendor/cli/src/render.js +1 -1
- package/vendor/cli/src/screen.js +1 -1
- package/vendor/cli/src/screens.js +1 -1
- package/vendor/cli/src/secret.js +1 -1
- package/vendor/cli/src/securefs.js +1 -1
- package/vendor/cli/src/settings.js +1 -1
- package/vendor/cli/src/signup.js +1 -1
- package/vendor/cli/src/summarize.js +1 -1
- package/vendor/cli/src/sysdiag.js +1 -1
- package/vendor/cli/src/theme.js +1 -1
- package/vendor/cli/src/title.js +1 -1
- package/vendor/cli/src/todos.js +1 -1
- package/vendor/cli/src/tokens.js +1 -1
- package/vendor/cli/src/topup.js +1 -1
- package/vendor/cli/src/update.js +1 -1
- package/vendor/cli/vendor/client/aegis.js +1 -1
- package/vendor/cli/vendor/client/attest.js +1 -1
- package/vendor/cli/vendor/client/authorship-key.js +1 -1
- package/vendor/cli/vendor/client/auto-provision.js +1 -1
- package/vendor/cli/vendor/client/brain-catalog.js +1 -1
- package/vendor/cli/vendor/client/byok-catalog.js +1 -1
- package/vendor/cli/vendor/client/catalog-client.js +1 -1
- package/vendor/cli/vendor/client/conversation-export.js +1 -1
- package/vendor/cli/vendor/client/credentials.js +1 -1
- package/vendor/cli/vendor/client/credits.js +1 -1
- package/vendor/cli/vendor/client/drive-connect.js +1 -1
- package/vendor/cli/vendor/client/env-file.js +1 -1
- package/vendor/cli/vendor/client/fingerprint.js +1 -1
- package/vendor/cli/vendor/client/foreign-memory.js +1 -1
- package/vendor/cli/vendor/client/foreign-sessions.js +1 -1
- package/vendor/cli/vendor/client/google-signin.js +1 -1
- package/vendor/cli/vendor/client/hooks.js +1 -1
- package/vendor/cli/vendor/client/model-discovery.js +1 -1
- package/vendor/cli/vendor/client/model-sync.js +1 -1
- package/vendor/cli/vendor/client/naming.js +1 -1
- package/vendor/cli/vendor/client/platform.js +1 -1
- package/vendor/cli/vendor/client/prefs.js +1 -1
- package/vendor/cli/vendor/client/presence.js +1 -1
- package/vendor/cli/vendor/client/record-vault.js +2 -2
- package/vendor/cli/vendor/client/session-search.js +1 -1
- package/vendor/cli/vendor/client/session-store.js +1 -1
- package/vendor/cli/vendor/client/skills.js +1 -1
- package/vendor/cli/vendor/client/topup.js +1 -1
- package/vendor/cli/vendor/client/touch.js +1 -1
- package/vendor/cli/vendor/client/update.js +1 -1
- package/vendor/cli/vendor/client/user-models.js +1 -1
- package/vendor/cli/vendor/desktop/lib/local/attachments.js +1 -1
- package/vendor/cli/vendor/desktop/lib/local/autonomous.js +1 -1
- package/vendor/cli/vendor/desktop/lib/local/claude-pro.js +1 -1
- package/vendor/cli/vendor/desktop/lib/local/context.js +1 -1
- package/vendor/cli/vendor/desktop/lib/local/engine.js +1 -1
- package/vendor/cli/vendor/desktop/lib/local/entitlement.js +1 -1
- package/vendor/cli/vendor/desktop/lib/local/integrity.js +1 -1
- package/vendor/cli/vendor/desktop/lib/local/local.js +1 -1
- package/vendor/cli/vendor/desktop/lib/local/perm-rules.js +5 -0
- package/vendor/cli/vendor/desktop/lib/local/perm-store.js +5 -0
- package/vendor/cli/vendor/desktop/lib/local/perm-write.js +5 -0
- package/vendor/cli/vendor/desktop/lib/local/pro-sessions.js +3 -1
- package/vendor/cli/vendor/desktop/lib/local/prompt.js +1 -1
- package/vendor/cli/vendor/desktop/lib/local/queue.js +1 -1
- package/vendor/cli/vendor/desktop/lib/local/repeat-guard.js +1 -1
- package/vendor/cli/vendor/desktop/lib/local/session-rounds.js +1 -1
- package/vendor/cli/vendor/desktop/lib/local/spill.js +1 -1
- package/vendor/cli/vendor/desktop/lib/local/turn-guard.js +1 -1
- package/vendor/cli/vendor/desktop/lib/local/verify-stop.js +1 -1
- package/vendor/cli/vendor/desktop/lib/local/worktree-lock.js +1 -1
- package/vendor/cli/vendor/desktop/lib/settings.js +1 -1
- package/vendor/cli/vendor/desktop/renderer/usage.js +1 -1
- package/vendor/cli/vendor/hosts/install.js +1 -1
- package/vendor/cli/vendor/hosts/openai-shim.js +1 -1
- package/vendor/cli/vendor/hosts/spec.js +1 -1
- package/vendor/cli/vendor/hosts/targets.js +1 -1
- package/vendor/cli/vendor/mcp/admission.js +1 -1
- package/vendor/cli/vendor/mcp/server.js +1 -1
- package/vendor/cli/vendor/mcp/tools.js +1 -1
- package/vendor/cli/vendor/one/src/child.js +1 -1
- package/vendor/cli/vendor/one/src/protocol.js +1 -1
- package/vendor/cli/vendor/one/src/selfhost.js +1 -1
- package/vendor/desktop/bin/aegis.js +1 -1
- package/vendor/desktop/lib/auto.js +1 -1
- package/vendor/desktop/lib/avatar/companion.js +1 -1
- package/vendor/desktop/lib/avatar/cosmetics.js +1 -1
- package/vendor/desktop/lib/avatar/holder-turn.js +1 -1
- package/vendor/desktop/lib/avatar/holders.js +1 -1
- package/vendor/desktop/lib/avatar/identity.js +1 -1
- package/vendor/desktop/lib/avatar/level.js +1 -1
- package/vendor/desktop/lib/avatar/mirror.js +1 -1
- package/vendor/desktop/lib/avatar/persona.js +1 -1
- package/vendor/desktop/lib/avatar/profile.js +1 -1
- package/vendor/desktop/lib/avatar/register.js +1 -1
- package/vendor/desktop/lib/avatar/store.js +1 -1
- package/vendor/desktop/lib/avatar/transfer.js +1 -1
- package/vendor/desktop/lib/avatar/turn.js +1 -1
- package/vendor/desktop/lib/avatar/voice.js +1 -1
- package/vendor/desktop/lib/avatar/xp.js +1 -1
- package/vendor/desktop/lib/deep-link.js +1 -1
- package/vendor/desktop/lib/local/attachments.js +1 -1
- package/vendor/desktop/lib/local/autonomous.js +1 -1
- package/vendor/desktop/lib/local/claude-pro.js +1 -1
- package/vendor/desktop/lib/local/cli-face.js +1 -1
- package/vendor/desktop/lib/local/context.js +1 -1
- package/vendor/desktop/lib/local/engine.js +1 -1
- package/vendor/desktop/lib/local/entitlement.js +1 -1
- package/vendor/desktop/lib/local/integrity.js +1 -1
- package/vendor/desktop/lib/local/local.js +1 -1
- package/vendor/desktop/lib/local/perm-rules.js +5 -0
- package/vendor/desktop/lib/local/perm-store.js +5 -0
- package/vendor/desktop/lib/local/perm-write.js +5 -0
- package/vendor/desktop/lib/local/pro-sessions.js +3 -1
- package/vendor/desktop/lib/local/prompt.js +1 -1
- package/vendor/desktop/lib/local/pty-host.js +1 -1
- package/vendor/desktop/lib/local/queue.js +1 -1
- package/vendor/desktop/lib/local/repeat-guard.js +1 -1
- package/vendor/desktop/lib/local/session-rounds.js +1 -1
- package/vendor/desktop/lib/local/spill.js +1 -1
- package/vendor/desktop/lib/local/telemetry.js +1 -1
- package/vendor/desktop/lib/local/turn-guard.js +1 -1
- package/vendor/desktop/lib/local/verify-stop.js +1 -1
- package/vendor/desktop/lib/local/worktree-lock.js +1 -1
- package/vendor/desktop/lib/provider-key-mirror.js +1 -1
- package/vendor/desktop/lib/quick-launcher.js +1 -1
- package/vendor/desktop/lib/settings.js +1 -1
- package/vendor/desktop/lib/skills-host.js +1 -1
- package/vendor/desktop/lib/speech-host.js +1 -1
- package/vendor/desktop/lib/sync/memory-store.js +1 -1
- package/vendor/desktop/lib/sync/persist-gate.js +1 -1
- package/vendor/desktop/lib/window-state.js +1 -1
- package/vendor/desktop/package.json +1 -1
- package/vendor/desktop/preload.js +3 -1
- package/vendor/desktop/renderer/app.js +3 -3
- package/vendor/desktop/renderer/avatar/assemble.js +1 -1
- package/vendor/desktop/renderer/avatar/avatar.js +1 -1
- package/vendor/desktop/renderer/avatar/cards.js +1 -1
- package/vendor/desktop/renderer/avatar/hud.js +1 -1
- package/vendor/desktop/renderer/avatar/pane.js +1 -1
- package/vendor/desktop/renderer/avatar/parts.js +1 -1
- package/vendor/desktop/renderer/commands.js +1 -1
- package/vendor/desktop/renderer/companion.js +1 -1
- package/vendor/desktop/renderer/composer-triggers.js +1 -1
- package/vendor/desktop/renderer/dictation.js +1 -1
- package/vendor/desktop/renderer/diff.js +1 -1
- package/vendor/desktop/renderer/diffview.js +1 -1
- package/vendor/desktop/renderer/fingerprint.js +2 -2
- package/vendor/desktop/renderer/index.html +10 -4
- package/vendor/desktop/renderer/library.js +1 -1
- package/vendor/desktop/renderer/markdown.js +1 -1
- package/vendor/desktop/renderer/palette-filter.js +1 -1
- package/vendor/desktop/renderer/provider-toolbar.js +1 -1
- package/vendor/desktop/renderer/providers.js +1 -1
- package/vendor/desktop/renderer/pty-frame.css +35 -0
- package/vendor/desktop/renderer/pty-frame.html +47 -0
- package/vendor/desktop/renderer/pty-panel.js +1 -1
- package/vendor/desktop/renderer/quick.js +1 -1
- package/vendor/desktop/renderer/settings-skills.js +1 -1
- package/vendor/desktop/renderer/shortcuts.js +1 -1
- package/vendor/desktop/renderer/stream-policy.js +1 -1
- package/vendor/desktop/renderer/style.css +22 -0
- package/vendor/desktop/renderer/transcript-view.js +1 -1
- package/vendor/desktop/renderer/usage.js +1 -1
- package/vendor/desktop/renderer/welcome-rows.js +1 -1
- package/vendor/desktop/vendor/aegis.js +1 -1
- package/vendor/desktop/vendor/attest.js +1 -1
- package/vendor/desktop/vendor/authorship-key.js +1 -1
- package/vendor/desktop/vendor/auto-provision.js +1 -1
- package/vendor/desktop/vendor/brain-catalog.js +1 -1
- package/vendor/desktop/vendor/byok-catalog.js +1 -1
- package/vendor/desktop/vendor/catalog-client.js +1 -1
- package/vendor/desktop/vendor/conversation-export.js +1 -1
- package/vendor/desktop/vendor/credentials.js +1 -1
- package/vendor/desktop/vendor/credits.js +1 -1
- package/vendor/desktop/vendor/drive-connect.js +1 -1
- package/vendor/desktop/vendor/env-file.js +1 -1
- package/vendor/desktop/vendor/faces/cli/bin/aegiscode.js +2 -2
- package/vendor/desktop/vendor/faces/cli/package.json +1 -1
- package/vendor/desktop/vendor/faces/cli/scripts/check.mjs +1 -1
- package/vendor/desktop/vendor/faces/cli/scripts/demo.mjs +1 -1
- package/vendor/desktop/vendor/faces/cli/scripts/postinstall.mjs +1 -1
- package/vendor/desktop/vendor/faces/cli/scripts/predist.mjs +1 -1
- package/vendor/desktop/vendor/faces/cli/scripts/runtests.mjs +1 -1
- package/vendor/desktop/vendor/faces/cli/src/app.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/art.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/autonomous.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/caps.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/chatflow.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/checkpoint.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/clipboard.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/cloudsync.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/commands.js +2 -2
- package/vendor/desktop/vendor/faces/cli/src/config.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/connect.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/devrun.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/diff.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/diffview.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/dream.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/engine.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/events.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/export.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/fingerprint.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/format.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/fuzzy.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/history.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/init.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/limits.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/markdown.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/mcp.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/models.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/overlays.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/panels.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/permissions.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/ping.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/presence.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/provenance.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/render.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/screen.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/screens.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/secret.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/securefs.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/settings.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/signup.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/summarize.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/sysdiag.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/theme.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/title.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/todos.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/tokens.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/topup.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/update.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/aegis.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/attest.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/authorship-key.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/auto-provision.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/brain-catalog.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/byok-catalog.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/catalog-client.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/conversation-export.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/credentials.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/credits.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/drive-connect.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/env-file.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/fingerprint.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/foreign-memory.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/foreign-sessions.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/google-signin.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/hooks.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/model-discovery.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/model-sync.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/naming.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/platform.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/prefs.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/presence.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/record-vault.js +2 -2
- package/vendor/desktop/vendor/faces/cli/vendor/client/session-search.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/session-store.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/skills.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/topup.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/touch.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/update.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/user-models.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/attachments.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/autonomous.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/claude-pro.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/context.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/engine.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/entitlement.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/exec-plan.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/integrity.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/local.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/perm-rules.js +2 -0
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/perm-store.js +3 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/perm-write.js +2 -0
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/pro-sessions.js +3 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/prompt.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/queue.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/repeat-guard.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/session-rounds.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/shell.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/spill.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/tools.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/turn-guard.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/verify-stop.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/worktree-lock.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/settings.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/main.js +3 -3
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/renderer/usage.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/hosts/install.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/hosts/openai-shim.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/hosts/spec.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/hosts/targets.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/mcp/admission.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/mcp/server.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/mcp/tools.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/one/src/child.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/one/src/protocol.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/one/src/selfhost.js +1 -1
- package/vendor/desktop/vendor/fingerprint.js +1 -1
- package/vendor/desktop/vendor/foreign-memory.js +1 -1
- package/vendor/desktop/vendor/foreign-sessions.js +1 -1
- package/vendor/desktop/vendor/google-signin.js +1 -1
- package/vendor/desktop/vendor/hooks.js +1 -1
- package/vendor/desktop/vendor/model-discovery.js +1 -1
- package/vendor/desktop/vendor/model-sync.js +1 -1
- package/vendor/desktop/vendor/naming.js +1 -1
- package/vendor/desktop/vendor/platform.js +1 -1
- package/vendor/desktop/vendor/prefs.js +1 -1
- package/vendor/desktop/vendor/presence.js +1 -1
- package/vendor/desktop/vendor/protocol.js +1 -1
- package/vendor/desktop/vendor/record-vault.js +2 -2
- package/vendor/desktop/vendor/selfhost.js +1 -1
- package/vendor/desktop/vendor/session-search.js +1 -1
- package/vendor/desktop/vendor/session-store.js +1 -1
- package/vendor/desktop/vendor/skills.js +1 -1
- package/vendor/desktop/vendor/topup.js +1 -1
- package/vendor/desktop/vendor/touch.js +1 -1
- package/vendor/desktop/vendor/update.js +1 -1
- package/vendor/desktop/vendor/user-models.js +1 -1
|
@@ -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";!function(e
|
|
3
|
+
"use strict";!function(e){const t=function(){const e=36e5,t=24*e;function n(e){const t=new Date(e);return t.setHours(0,0,0,0),t.getTime()}function r(e){const t=e&&Number(e.updatedAt);return Number.isFinite(t)&&t>0?t:0}const s=["January","February","March","April","May","June","July","August","September","October","November","December"];function o(e,r){if(!e)return{key:"undated",label:"Undated",rank:1e9};const o=n(r),i=n(e);if(i>=o)return{key:"today",label:"Today",rank:0};if(i>=o-t)return{key:"yesterday",label:"Yesterday",rank:1};if(i>o-7*t)return{key:"week",label:"Previous 7 days",rank:2};if(i>o-30*t)return{key:"month",label:"Previous 30 days",rank:3};const u=new Date(e),a=`${s[u.getMonth()]} ${u.getFullYear()}`,l=new Date(r),c=12*(l.getFullYear()-u.getFullYear())+(l.getMonth()-u.getMonth());return{key:`m${u.getFullYear()}-${u.getMonth()}`,label:a,rank:4+Math.max(0,c)}}function i(e){const t=Array.isArray(e&&e.messages)?e.messages:[];for(const e of t)if(e&&"user"===e.role&&"string"==typeof e.content&&e.content.trim())return e.content.trim();return e&&"string"==typeof e.firstPrompt?e.firstPrompt.trim():""}function u(e,t){const n=String(e).replace(/\s+/g," ").trim();return n.length>t?`${n.slice(0,t-1)}…`:n}function a(e){const t=String(e&&e.cwd||e&&e.dir||"");if(!t)return"";const n=t.split(/[\\/]/).filter(Boolean);return n.length?n[n.length-1]:""}function l(e){const t=Array.isArray(e&&e.messages)?e.messages:null;if(t)return t.length;const n=Number(e&&e.messages);return Number.isFinite(n)&&n>=0?n:0}function c(r,o){const i=Number.isFinite(o)?o:Date.now();if(!r)return"";const u=i-r;if(u<0)return"just now";if(u<6e4)return"just now";if(u<e)return`${Math.floor(u/6e4)}m ago`;if(u<t)return`${Math.floor(u/e)}h ago`;const a=Math.round((n(i)-n(r))/t);if(a<=1)return"yesterday";if(a<7)return`${a}d ago`;const l=new Date(r),c=l.getFullYear()===new Date(i).getFullYear(),f=s[l.getMonth()].slice(0,3);return c?`${l.getDate()} ${f}`:`${l.getDate()} ${f} ${l.getFullYear()}`}return{IDS:{list:"sessions-list",filter:"sessions-filter",count:"sessions-count",hint:"sessions-hint"},groupSessions:function(e,t){const n=Number.isFinite(t)?t:Date.now(),s=Array.isArray(e)?e.filter(Boolean):[],i=new Map;for(const e of s){const t=o(r(e),n);let s=i.get(t.key);s||(s={key:t.key,label:t.label,rank:t.rank,sessions:[]},i.set(t.key,s)),s.sessions.push(e)}return[...i.values()].sort((e,t)=>e.rank-t.rank)},bucketOf:o,sessionTitle:function(e){const t=String(e&&e.title||"").trim();if(t)return u(t,80);const n=i(e);if(n)return u(n,80);const r=String(e&&e.id||"").trim();return r?`untitled · ${r.slice(0,8)}`:"untitled"},sessionMeta:function(e,t){const n=[],s=l(e);s&&n.push(`${s} msg${1===s?"":"s"}`);const o=c(r(e),t);o&&n.push(o);const i=a(e);return i&&n.push(i),e&&!0===e.pending&&n.push("unsynced"),n.join(" · ")},projectOf:a,messageCount:l,firstPrompt:i,filterSessions:function(e,t){const n=String(null==e?"":e).trim().toLowerCase(),r=Array.isArray(t)?t.filter(Boolean):[];return n?r.filter(e=>[String(e&&e.title||""),i(e),String(e&&e.cwd||e&&e.dir||""),String(e&&e.id||"")].join("\n").toLowerCase().includes(n)):r},countLabel:function(e,t){const n=Number(t)||0,r=Number(e)||0;return n?r===n?`${n} conversation${1===n?"":"s"}`:`${r} of ${n}`:""},relTime:c,collapse:u,startOfDay:n}}();"undefined"!=typeof module&&module.exports&&(module.exports=t),e&&(e.aegisLibrary=t)}("undefined"!=typeof window?window:null);
|
|
@@ -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";!function(t
|
|
3
|
+
"use strict";!function(t){const e=function(){function t(t){if("string"!=typeof t||!t)return!1;try{const e=new URL(t);return"http:"===e.protocol||"https:"===e.protocol}catch{return!1}}function e(t){const e=/language-([\w-]+)/.exec(t||"");return e?e[1]:""}let n=!1;function o(t){const e="undefined"!=typeof window?window.marked:null;return e&&"function"==typeof e.parse?(function(t){n||(t.setOptions({gfm:!0,breaks:!1}),n=!0)}(e),e.parse(null==t?"":String(t))):null}function r(t){const n=t.querySelector("code");if(!n)return;const o=e(n.className),r=n.textContent||"",i="undefined"!=typeof window?window.AegisHighlight:null;i&&(n.innerHTML=i.highlight(r,o)),t.classList.add("code-block");const l=document.createElement("button");l.type="button",l.className="code-copy-btn",l.textContent="copy",l.addEventListener("click",()=>{navigator.clipboard.writeText(r).then(()=>{l.textContent="copied!",setTimeout(()=>{l.textContent="copy"},1500)},()=>{l.textContent="copy failed",setTimeout(()=>{l.textContent="copy"},1500)})}),t.appendChild(l)}return{renderInto:function(e,n){const i=o(n),l=null==i?null:function(t){const e="undefined"!=typeof window?window.DOMPurify:null;return e&&"function"==typeof e.sanitize?e.sanitize(t,{ALLOWED_URI_REGEXP:/^(?:https?:|#)/i}):null}(i);if(null!=l){e.innerHTML=l;for(const t of e.querySelectorAll("pre"))r(t);!function(e){const n="undefined"!=typeof window?window.aegis:null,o=e.querySelectorAll("a[href]");for(const e of o){const o=e.getAttribute("href");e.removeAttribute("target"),e.setAttribute("rel","noopener noreferrer"),t(o)?e.addEventListener("click",t=>{t.preventDefault(),n&&"function"==typeof n.openExternal&&n.openExternal(o)}):e.removeAttribute("href")}}(e)}else e.textContent=null==n?"":String(n)},isExternalHref:t,langFromClassName:e}}();"object"==typeof module&&module.exports?module.exports=e:t.AegisMarkdown=e}("undefined"!=typeof globalThis?globalThis:this);
|
|
@@ -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";function scoreCommand(e,n){const t=String(null==n?"":n).trim().toLowerCase();if(!t)return 1;const r=String(e.label||"").toLowerCase(),o=String(e.keywords||"").toLowerCase();return r.startsWith(t)?100:r.split(/[^a-z0-9]+/).filter(Boolean).some(
|
|
3
|
+
"use strict";function scoreCommand(e,n){const t=String(null==n?"":n).trim().toLowerCase();if(!t)return 1;const r=String(e.label||"").toLowerCase(),o=String(e.keywords||"").toLowerCase();return r.startsWith(t)?100:r.split(/[^a-z0-9]+/).filter(Boolean).some(e=>e.startsWith(t))?70:r.includes(t)?45:o.includes(t)?20:0}function filterCommands(e,n){const t=String(null==n?"":n).trim().toLowerCase(),r=Array.isArray(e)?e:[];if(!t)return r.slice();const o=[];for(let e=0;e<r.length;e+=1){const n=r[e],i=scoreCommand(n,t);i>0&&o.push({cmd:n,score:i,index:e})}return o.sort((e,n)=>n.score-e.score||e.index-n.index),o.map(e=>e.cmd)}function initialIndex(e){return Array.isArray(e)&&e.length?0:-1}function moveIndex(e,n,t){if(!n||n<1)return-1;if(e<0)return t>0?0:n-1;const r=e+t;return r<0?n-1:r>=n?0:r}!function(){const e={scoreCommand:scoreCommand,filterCommands:filterCommands,initialIndex:initialIndex,moveIndex:moveIndex};"undefined"!=typeof module&&module.exports&&(module.exports=e),globalThis.AegisPaletteFilter=e}();
|
|
@@ -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";!function(){if("undefined"==typeof window)return;const e=window.aegisProviders;if(!e)return;const t=window.aegisProviderMark;function n(e,t,n){const l=document.createElement(e);return t&&(l.className=t),null!=n&&(l.textContent=n),l}window.aegisProviderToolbar={mount:function(l){const o=l||{};let i=[];function r(l){const i=n("li","pt-row");if(l.selectable){const r=n("button","pt-pick");r.type="button";const d=n("div","pt-head");if(t&&"function"==typeof t.build){const e="local"===l.class?"ollama":l.provider||"",n=t.build(document,l.model,l.classLabel,e);n.el.classList.add("pt-mark"),d.appendChild(n.el)}d.appendChild(n("span","pt-model",l.modelLabel||l.model)),r.appendChild(d),l.model&&l.modelLabel&&l.modelLabel!==l.model&&r.appendChild(n("span","pt-id",l.model)),r.appendChild(n("span","pt-target",l.url?`${l.method} ${l.url}`:"no network route — runs as a local process")),r.addEventListener("click",(
|
|
3
|
+
"use strict";!function(){if("undefined"==typeof window)return;const e=window.aegisProviders;if(!e)return;const t=window.aegisProviderMark;function n(e,t,n){const l=document.createElement(e);return t&&(l.className=t),null!=n&&(l.textContent=n),l}window.aegisProviderToolbar={mount:function(l){const o=l||{};let i=[];function r(l){const i=n("li","pt-row");if(l.selectable){const r=n("button","pt-pick");r.type="button";const d=n("div","pt-head");if(t&&"function"==typeof t.build){const e="local"===l.class?"ollama":l.provider||"",n=t.build(document,l.model,l.classLabel,e);n.el.classList.add("pt-mark"),d.appendChild(n.el)}d.appendChild(n("span","pt-model",l.modelLabel||l.model)),r.appendChild(d),l.model&&l.modelLabel&&l.modelLabel!==l.model&&r.appendChild(n("span","pt-id",l.model)),r.appendChild(n("span","pt-target",l.url?`${l.method} ${l.url}`:"no network route — runs as a local process")),r.addEventListener("click",()=>{o.onSelect&&o.onSelect(e.selectionFor(l))}),i.appendChild(r)}else i.appendChild(n("span","pt-model pt-muted",l.modelLabel)),i.appendChild(n("span","pt-target",l.url?`${l.method} ${l.url}`:"—"));return l.billing&&i.appendChild(n("span","pt-billing",l.billing)),l.blocked&&i.appendChild(n("span","pt-blocked",l.blocked)),i}function d(t){const l=e.filterEntries(i,t);if(o.count&&(o.count.textContent=i.length?`${l.length} of ${i.length} provider route${1===i.length?"":"s"}`:"no providers reported"),o.list){o.list.innerHTML="";let e=null,t=null;for(const i of l){if(i.group!==e){e=i.group;const l=n("li","pt-group");l.appendChild(n("h3","pt-group-title",e)),t=n("ul","pt-rows"),l.appendChild(t),o.list.appendChild(l)}t.appendChild(r(i))}l.length||o.list.appendChild(n("li","pt-empty",i.length?"No provider or model matches that filter.":"No provider paths yet — press Refresh once a key is saved."))}if(o.hint&&t&&l.length){const e=l.filter(e=>e.url&&!/localhost|127\.0\.0\.1/.test(e.url)).length,t=l.filter(e=>e.url&&/localhost|127\.0\.0\.1/.test(e.url)).length,n=l.filter(e=>!e.url).length;o.hint.textContent=[e?`${e} over the network`:"",t?`${t} on this machine`:"",n?`${n} with no route`:""].filter(Boolean).join(" · ")}else o.hint&&!t&&(o.hint.textContent=i.length?"Every provider this build can address, and the URL a turn to it uses.":"")}return o.search&&o.search.addEventListener("input",()=>d(o.search.value)),{set:t=>(i=e.buildProviderPaths(t),d(o.search?o.search.value:""),i),entries:()=>i.slice()}}}}();
|
|
@@ -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 POOLED_PATH="/api/v1/chat/completions",BYOK_PATH="/api/v1/byok/chat/completions",LOCAL_PATH="/v1/chat/completions",DEFAULT_CLOUD_BASE="https://aegiscloud.org",DEFAULT_LOCAL_BASE="http://localhost:11434";function joinUrl(e,
|
|
3
|
+
"use strict";const POOLED_PATH="/api/v1/chat/completions",BYOK_PATH="/api/v1/byok/chat/completions",LOCAL_PATH="/v1/chat/completions",DEFAULT_CLOUD_BASE="https://aegiscloud.org",DEFAULT_LOCAL_BASE="http://localhost:11434";function joinUrl(e,o){const l="string"==typeof e?e.trim():"",r="string"==typeof o?o.trim():"";return l?/^https?:\/\//i.test(r)?r:r?`${l.replace(/\/+$/,"")}/${r.replace(/^\/+/,"")}`:l.replace(/\/+$/,""):""}function billingFor(e,o,l,r){if("pro"===e)return"Claude Code subscription — no AEGIS tokens spent";if("local"===e)return"free — runs on this machine";if("byok"===e){const e=r&&r.fee||null;return e&&e.require_balance?"your provider key pays the vendor; an AEGIS key and a funded balance pay the handling fee":"your provider key pays the vendor; an AEGIS key attributes the handling fee"}return"billed to your AEGIS account"}function blockedReason(e,o,l,r){return"aegis"===e&&r&&r.needsKey?"no AEGIS API key on this machine":"local"===e&&r&&r.needsDaemon?"no model server listening":"local"===e&&r&&!1===r.listed?"server answered but lists no models":"byok"===e&&l&&!1===l.configured?l.keyRejected?`provider key rejected: ${l.keyRejected}`:"no key saved for this provider":"pro"===e&&o&&!1===o.configured?"not signed in to Claude Code":null}function buildProviderPaths(e){const o=[],l=Array.isArray(e)?e:[];for(const e of l){if(!e||"string"!=typeof e.class)continue;const l=e.class,r={configured:!1!==e.classConfigured},n=e.list&&"object"==typeof e.list?e.list:null,i=Array.isArray(n&&n.models)?n.models:[],s=n&&(n.apiBase||n.baseURL)||DEFAULT_CLOUD_BASE,t=n&&n.baseURL||DEFAULT_LOCAL_BASE;if(!i.length){const i="aegis"===l||"local"===l;o.push({class:l,classLabel:e.classLabel||l,model:"",modelLabel:"aegis"===l?"server default (auto)":"local"===l?"type a model tag in the Model card":"—",provider:"",uniqueModel:l,group:e.classLabel||l,url:i?joinUrl("local"===l?t:s,"local"===l?LOCAL_PATH:POOLED_PATH):null,method:i?"POST":null,billing:billingFor(l,r,null,n),blocked:blockedReason(l,r,null,n),selectable:!1});continue}for(const a of i){if(!a||!a.id)continue;const i="string"==typeof a.provider&&a.provider?a.provider:l;let d=null,c=null;"aegis"===l?(d=joinUrl(s,POOLED_PATH),c="POST"):"byok"===l?(d=joinUrl(s,BYOK_PATH),c="POST"):"local"===l&&(d=joinUrl(t,LOCAL_PATH),c="POST"),o.push({class:l,classLabel:e.classLabel||l,model:a.id,modelLabel:a.label||a.id,provider:i,uniqueModel:`${l}:${a.id}`,group:e.classLabel||l,url:d,method:c,billing:billingFor(l,r,a,n),blocked:blockedReason(l,r,a,n),selectable:!0})}}return o}function filterEntries(e,o){const l=Array.isArray(e)?e:[],r=String(null==o?"":o).trim().toLowerCase();if(!r)return l.slice();const n=r.split(/\s+/).filter(Boolean);return l.filter(e=>{const o=[e.model,e.modelLabel,e.provider,e.class,e.classLabel,e.url||""].join("\n").toLowerCase();return n.every(e=>o.includes(e))})}function selectionFor(e){return e?{class:e.class,model:"aegis"!==e.class||e.model?e.model:""}:null}"undefined"!=typeof module&&module.exports&&(module.exports={buildProviderPaths:buildProviderPaths,filterEntries:filterEntries,selectionFor:selectionFor,joinUrl:joinUrl,POOLED_PATH:POOLED_PATH,BYOK_PATH:BYOK_PATH,LOCAL_PATH:LOCAL_PATH}),"undefined"!=typeof window&&(window.aegisProviders={buildProviderPaths:buildProviderPaths,filterEntries:filterEntries,selectionFor:selectionFor,joinUrl:joinUrl,POOLED_PATH:POOLED_PATH,BYOK_PATH:BYOK_PATH,LOCAL_PATH:LOCAL_PATH});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
3
|
+
* Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
|
|
4
|
+
* AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
|
|
5
|
+
* Conveying a modified copy, or running one as a network service, owes the
|
|
6
|
+
* corresponding source under this licence (§5/§13) — see LICENSING.md.
|
|
7
|
+
*/
|
|
8
|
+
/* ── ON9b: the embedded terminal document (pty-frame.html) ──────────────────
|
|
9
|
+
Deliberately tiny. Everything the terminal draws is xterm's own; this sheet
|
|
10
|
+
only gives it the full frame to draw in and names the font it draws with.
|
|
11
|
+
|
|
12
|
+
The family is stated here rather than inherited: pty-frame.html loads
|
|
13
|
+
fonts.css (the @font-face rules) and NOT style.css, so `--font-mono` would
|
|
14
|
+
resolve to nothing and xterm would fall back to its built-in
|
|
15
|
+
`courier-new, courier, monospace` — a host font, which is the divergence
|
|
16
|
+
desktop/test/renderer-fonts.test.mjs exists to prevent. pty-panel.js reads
|
|
17
|
+
this variable off the frame document and passes it to the Terminal. */
|
|
18
|
+
:root {
|
|
19
|
+
--font-mono: 'DM Mono', monospace;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
html,
|
|
23
|
+
body {
|
|
24
|
+
margin: 0;
|
|
25
|
+
height: 100%;
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
/* Matches .pty-panel-body in style.css, so the frame never flashes white
|
|
28
|
+
between document load and xterm's first paint. */
|
|
29
|
+
background: #0b0d10;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
#pty-frame-root {
|
|
33
|
+
width: 100%;
|
|
34
|
+
height: 100%;
|
|
35
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<!--
|
|
3
|
+
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
4
|
+
* Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
|
|
5
|
+
* AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
|
|
6
|
+
* Conveying a modified copy, or running one as a network service, owes the
|
|
7
|
+
* corresponding source under this licence (§5/§13) — see LICENSING.md.
|
|
8
|
+
-->
|
|
9
|
+
<html lang="en">
|
|
10
|
+
<head>
|
|
11
|
+
<meta charset="utf-8" />
|
|
12
|
+
<!-- ON9b — the embedded terminal's OWN document, and the one place in this
|
|
13
|
+
app where `style-src` allows inline styles.
|
|
14
|
+
|
|
15
|
+
Why a second document exists at all: xterm.js renders by injecting a
|
|
16
|
+
per-terminal <style> element (cell metrics, the 256-colour palette, bold
|
|
17
|
+
and dim variants) and by setting `.style.*` attributes on rows, the
|
|
18
|
+
cursor and its canvases. Under index.html's `style-src 'self'` Chromium
|
|
19
|
+
blocks both — not with an error the app can see, but by dropping the
|
|
20
|
+
declarations: the rows lose `white-space: pre` and the monospace family,
|
|
21
|
+
so every run of spaces collapses and the terminal paints the UI font.
|
|
22
|
+
That is what shipped in 1.0.64: a legible-but-wrong terminal, box-drawn
|
|
23
|
+
frames smashed out of alignment, measured as
|
|
24
|
+
`font-family: "Times New Roman"; white-space: normal` in a CSP probe.
|
|
25
|
+
|
|
26
|
+
Neither a nonce nor a hash can fix it (a nonce does not cover style
|
|
27
|
+
ATTRIBUTES, and the injected text varies with the panel's pixel size),
|
|
28
|
+
so the choice is between relaxing the policy for the whole window and
|
|
29
|
+
giving the terminal a document of its own. This is that document: it
|
|
30
|
+
loads xterm, the vendored faces and nothing else — no app markup, no
|
|
31
|
+
model output, no remote origin — so `'unsafe-inline'` here buys the
|
|
32
|
+
renderer nothing it could not already do, while index.html keeps the
|
|
33
|
+
tight policy desktop/test/renderer-fonts.test.mjs asserts. -->
|
|
34
|
+
<meta
|
|
35
|
+
http-equiv="Content-Security-Policy"
|
|
36
|
+
content="default-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; font-src 'self'; img-src 'self' data:"
|
|
37
|
+
/>
|
|
38
|
+
<title>Terminal (aegiscode)</title>
|
|
39
|
+
<link rel="stylesheet" href="fonts/fonts.css" />
|
|
40
|
+
<link rel="stylesheet" href="vendor/xterm.css" />
|
|
41
|
+
<link rel="stylesheet" href="pty-frame.css" />
|
|
42
|
+
</head>
|
|
43
|
+
<body>
|
|
44
|
+
<div id="pty-frame-root"></div>
|
|
45
|
+
<script src="vendor/xterm.js"></script>
|
|
46
|
+
</body>
|
|
47
|
+
</html>
|
|
@@ -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";function ptyPanelCreateId(){return"undefined"!=typeof window&&window.crypto&&"function"==typeof window.crypto.randomUUID?window.crypto.randomUUID():`pty-${Date.now()}-${Math.random().toString(36).slice(2)}`}let ptyPanelCurrent=null;function ptyPanelBuildOverlay(){const e=document.createElement("div");return e.className="pty-panel-overlay",e.innerHTML='<div class="pty-panel" role="dialog" aria-label="Terminal"><div class="pty-panel-header"><span class="pty-panel-title">Terminal (aegiscode)</span><button type="button" class="pty-panel-close" aria-label="Close terminal">×</button></div><div class="pty-panel-body"></div></div>',e}function ptyPanelTeardown(e){if(e){try{e.unsubscribe()}catch{}try{window.aegis.pty.cancel(e.id)}catch{}try{e.term.dispose()}catch{}e.overlay&&e.overlay.parentNode&&e.overlay.parentNode.removeChild(e.overlay)}}function ptyPanelClose(){if(!ptyPanelCurrent)return;const e=ptyPanelCurrent;ptyPanelCurrent=null,ptyPanelTeardown(e)}function
|
|
3
|
+
"use strict";const PTY_PANEL_FRAME_SRC="pty-frame.html",PTY_PANEL_FRAME_ROOT="pty-frame-root";function ptyPanelCreateId(){return"undefined"!=typeof window&&window.crypto&&"function"==typeof window.crypto.randomUUID?window.crypto.randomUUID():`pty-${Date.now()}-${Math.random().toString(36).slice(2)}`}let ptyPanelCurrent=null;function ptyPanelBuildOverlay(){const e=document.createElement("div");return e.className="pty-panel-overlay",e.innerHTML='<div class="pty-panel" role="dialog" aria-label="Terminal"><div class="pty-panel-header"><span class="pty-panel-title">Terminal (aegiscode)</span><button type="button" class="pty-panel-close" aria-label="Close terminal">×</button></div><div class="pty-panel-body"><iframe class="pty-panel-frame" title="Terminal (aegiscode)" src="pty-frame.html"></iframe></div></div>',e}function ptyPanelTeardown(e){if(e){e.closed=!0;try{e.unsubscribe&&e.unsubscribe()}catch{}try{window.aegis.pty.cancel(e.id)}catch{}try{e.term&&e.term.dispose()}catch{}try{e.resizeObserver&&e.resizeObserver.disconnect()}catch{}e.overlay&&e.overlay.parentNode&&e.overlay.parentNode.removeChild(e.overlay)}}function ptyPanelClose(){if(!ptyPanelCurrent)return;const e=ptyPanelCurrent;ptyPanelCurrent=null,ptyPanelTeardown(e)}function ptyPanelFontFamily(e){try{return e.getComputedStyle(e.document.documentElement).getPropertyValue("--font-mono").trim()||"monospace"}catch{return"monospace"}}function ptyPanelFail(e,n){if(!e||!e.overlay)return;const t=e.overlay.querySelector(".pty-panel-body");if(!t)return;const r=document.createElement("p");r.className="pty-panel-note",r.textContent=n,t.appendChild(r)}function ptyPanelBoot(e){if(!e||e.closed||e.term)return;const n=e.frame&&e.frame.contentWindow,t=n&&n.document,r=t&&t.getElementById("pty-frame-root");if(!n||"function"!=typeof n.Terminal||!r)return void ptyPanelFail(e,"the terminal panel is not available in this build (xterm.js missing)");const o=new n.Terminal({convertEol:!0,cursorBlink:!0,fontSize:13,fontFamily:ptyPanelFontFamily(n)});e.term=o,o.open(r),ptyPanelFit(o,r);const a=e.id;e.unsubscribe=window.aegis.pty.onEvent(a,e=>{const n=e&&e.p;n&&("data"===n.kind?o.write(n.chunk):"exit"===n.kind&&o.write("\r\n[process exited]\r\n"))}),"function"==typeof n.ResizeObserver&&(e.resizeObserver=new n.ResizeObserver(()=>ptyPanelFit(o,r)),e.resizeObserver.observe(r)),o.onData(e=>window.aegis.pty.write(a,e)),o.onResize(({cols:e,rows:n})=>window.aegis.pty.resize(a,e,n)),window.aegis.pty.exec(a,{cols:o.cols,rows:o.rows}).then(e=>{e&&e.ok||o.write(`\r\n[could not start: ${e&&e.e&&e.e.msg||"unknown error"}]\r\n`)}),o.focus()}function ptyPanelOpen(){if(ptyPanelCurrent)return ptyPanelCurrent.overlay&&"function"==typeof ptyPanelCurrent.overlay.focus&&ptyPanelCurrent.overlay.focus(),{ok:!0};if("undefined"==typeof window||void 0===window.aegis||!window.aegis.pty)return{ok:!1,reason:"the terminal panel bridge is not available in this build"};const e=ptyPanelBuildOverlay();document.body.appendChild(e);const n={id:ptyPanelCreateId(),overlay:e,frame:e.querySelector(".pty-panel-frame"),term:null,unsubscribe:null,resizeObserver:null,closed:!1};return ptyPanelCurrent=n,n.frame&&n.frame.addEventListener("load",()=>ptyPanelBoot(n)),e.querySelector(".pty-panel-close").addEventListener("click",ptyPanelClose),e.addEventListener("keydown",e=>{"Escape"===e.key&&ptyPanelClose()}),{ok:!0}}function ptyPanelFit(e,n){const t=e._core,r=t&&t._renderService&&t._renderService.dimensions&&t._renderService.dimensions.css.cell;if(!r||!r.width||!r.height)return null;const o=Math.max(2,Math.floor(n.clientWidth/r.width)),a=Math.max(1,Math.floor(n.clientHeight/r.height));return o===e.cols&&a===e.rows||e.resize(o,a),{cols:o,rows:a}}function ptyPanelIsOpen(){return Boolean(ptyPanelCurrent)}"undefined"!=typeof module&&module.exports&&(module.exports={createId:ptyPanelCreateId,open:ptyPanelOpen,close:ptyPanelClose,isOpen:ptyPanelIsOpen,FRAME_SRC:"pty-frame.html",FRAME_ROOT:"pty-frame-root"}),"undefined"!=typeof window&&(window.aegisPtyPanel={open:ptyPanelOpen,close:ptyPanelClose,isOpen:ptyPanelIsOpen});
|
|
@@ -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";!function(){if(!window.models||!window.quickLauncher)throw document.body.textContent="This page must run inside the AEGIS Electron host (window.models/window.quickLauncher missing).",new Error("window.models/window.quickLauncher unavailable — not running under Electron");const e=window.models,t=window.quickLauncher,n="byok",o="quick-launcher-byok-model",l={form:document.getElementById("ql-form"),prompt:document.getElementById("ql-prompt"),response:document.getElementById("ql-response"),modelLabel:document.getElementById("ql-model-label"),modelSelect:document.getElementById("ql-model-select"),stopBtn:document.getElementById("ql-stop"),pushBtn:document.getElementById("ql-push"),status:document.getElementById("ql-status")};let d=!1,i=null,s="",r="",c=!1,a=null;function u(e){l.status.textContent=e}function m(e){d=e,l.stopBtn.hidden=!e,l.prompt.disabled=e}async function p(t){if(!t||d)return;if(a)return void u(a);c=!1,l.pushBtn.hidden=!0,l.response.textContent="",m(!0),u("thinking…"),i=`quick-${Date.now()}-${Math.random().toString(36).slice(2)}`;let o="";try{const d=await e.chat({class:n,model:l.modelSelect.value||void 0,prompt:t,tools:!1,sessionId:i},
|
|
3
|
+
"use strict";!function(){if(!window.models||!window.quickLauncher)throw document.body.textContent="This page must run inside the AEGIS Electron host (window.models/window.quickLauncher missing).",new Error("window.models/window.quickLauncher unavailable — not running under Electron");const e=window.models,t=window.quickLauncher,n="byok",o="quick-launcher-byok-model",l={form:document.getElementById("ql-form"),prompt:document.getElementById("ql-prompt"),response:document.getElementById("ql-response"),modelLabel:document.getElementById("ql-model-label"),modelSelect:document.getElementById("ql-model-select"),stopBtn:document.getElementById("ql-stop"),pushBtn:document.getElementById("ql-push"),status:document.getElementById("ql-status")};let d=!1,i=null,s="",r="",c=!1,a=null;function u(e){l.status.textContent=e}function m(e){d=e,l.stopBtn.hidden=!e,l.prompt.disabled=e}async function p(t){if(!t||d)return;if(a)return void u(a);c=!1,l.pushBtn.hidden=!0,l.response.textContent="",m(!0),u("thinking…"),i=`quick-${Date.now()}-${Math.random().toString(36).slice(2)}`;let o="";try{const d=await e.chat({class:n,model:l.modelSelect.value||void 0,prompt:t,tools:!1,sessionId:i},e=>{e&&"string"==typeof e.delta&&e.delta&&(o+=e.delta,l.response.textContent=o,l.response.scrollTop=l.response.scrollHeight)}),a=d&&d.choices&&d.choices[0]&&d.choices[0].message,m=o||a&&a.content||"";l.response.textContent=m,s=t,r=m,c=Boolean(m),l.pushBtn.hidden=!c,u(c?"⌘/Ctrl+⏎ to add this to the main chat":"no answer")}catch(e){l.response.textContent=`Error: ${e&&e.message?e.message:e}`,u("failed")}finally{m(!1),i=null}}function h(){c&&t.pushToMain({prompt:s,response:r,model:l.modelSelect.value||null,class:n}).catch(()=>{})}l.modelSelect.addEventListener("change",()=>{localStorage.setItem(o,l.modelSelect.value)}),l.form.addEventListener("submit",e=>{e.preventDefault(),p(l.prompt.value.trim())}),l.prompt.addEventListener("keydown",e=>{if("Enter"===e.key&&(e.metaKey||e.ctrlKey))return e.preventDefault(),void h();"Enter"!==e.key||e.shiftKey||(e.preventDefault(),p(l.prompt.value.trim()))}),l.stopBtn.addEventListener("click",function(){i&&e.cancel(i).catch(()=>{})}),l.pushBtn.addEventListener("click",h),window.addEventListener("focus",()=>{d||(l.prompt.value="",l.response.textContent="",l.pushBtn.hidden=!0,c=!1,u(a||"Enter to ask · Esc to close")),l.prompt.focus()}),async function(){try{const t=(await e.listClasses()||[]).find(e=>e.class===n),d=await e.listModels(n),i=(d&&d.models||[]).slice();i.sort((e,t)=>{const n=e.configured?0:1,o=t.configured?0:1;if(n!==o)return n-o;const l=String(e.provider||""),d=String(t.provider||"");if(l!==d)return l<d?-1:1;const i=String(e.id||""),s=String(t.id||"");return i<s?-1:i>s?1:0}),l.modelSelect.innerHTML="";for(const e of i){const t=document.createElement("option");t.value=e.id,t.textContent=e.configured?e.label||e.id:`${e.label||e.id} (no key)`,t.disabled=!e.configured,e.configured||(t.title="No key saved for this provider yet."),l.modelSelect.appendChild(t)}const s=localStorage.getItem(o);if(s&&i.some(e=>e.id===s&&e.configured))l.modelSelect.value=s;else{const e=i.find(e=>e.configured);e&&(l.modelSelect.value=e.id)}l.modelSelect.hidden=i.length<=1;const r=i.filter(e=>e.configured).length;l.modelLabel.textContent=i.length<=1&&i[0]?i[0].label||i[0].id:`BYOK · ${r}/${i.length}`,a=function(e,t){return e&&e.providersFailed?`BYOK catalog unavailable — ${e&&e.providersError||"catalog unreachable"}`:t.length?e&&e.needsProviderKey?"No provider key saved — add one in Settings › Provider":e&&e.needsAegisKey?"BYOK also needs your AEGIS key — connect it in Settings":null:"No BYOK models — add a provider key in Settings › Provider"}(d,i),a?(l.modelSelect.hidden=i.length<=1,u(a)):t||u("BYOK is not offered by this build")}catch(e){l.modelLabel.textContent="BYOK — unavailable",l.modelSelect.hidden=!0,a=`BYOK unavailable — ${e&&e.message?e.message:e}`,u(a)}}(),l.prompt.focus()}();
|
|
@@ -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";!function(){function e(e){return document.getElementById(e)}function t(t,i,n){var a=e(t);a&&(a.textContent=i||"",n&&(a.dataset.kind=n),a.hidden=!i)}var i={entries:[],roots:[],missing:[],createDir:""};function n(){return window.aegis&&"function"==typeof window.aegis.skillsList?window.aegis.skillsList().then(
|
|
3
|
+
"use strict";!function(){function e(e){return document.getElementById(e)}function t(t,i,n){var a=e(t);a&&(a.textContent=i||"",n&&(a.dataset.kind=n),a.hidden=!i)}var i={entries:[],roots:[],missing:[],createDir:""};function n(){return window.aegis&&"function"==typeof window.aegis.skillsList?window.aegis.skillsList().then(function(n){n&&n.ok?(i.entries=n.skills||[],i.roots=n.roots||[],i.missing=n.missing||[],i.createDir=n.createDir||"",function(){var t=e("skills-list");if(t){if(t.innerHTML="",i.entries.length)i.entries.forEach(function(e){t.appendChild(function(e,t){var i=document.createElement("li");i.className="skill-row";var n=document.createElement("span");n.className="skill-row-name",n.textContent="/"+e.name,i.appendChild(n);var a=document.createElement("span");a.className="skill-row-desc",a.textContent=e.description||"(no description)",e.warning&&(a.classList.add("skill-row-warning"),a.title=e.warning),i.appendChild(a);var l=document.createElement("span");l.className="skill-row-scope",l.textContent=e.scope,l.title=e.path,i.appendChild(l);var o=document.createElement("button");return o.type="button",o.className="skill-row-remove",o.textContent="×",o.title="Delete this skill ("+e.path+")",o.setAttribute("aria-label","Delete skill "+e.name),o.addEventListener("click",function(){t(e.name)}),i.appendChild(o),i}(e,l))});else{var n=document.createElement("li");n.className="skill-row";var a=document.createElement("span");a.className="skill-row-desc",a.textContent="No skills found yet — create one below.",n.appendChild(a),t.appendChild(n)}var o=e("skills-dirs-list");o&&(o.innerHTML="",i.roots.forEach(function(e){var t=document.createElement("li");t.textContent=e,-1!==i.missing.indexOf(e)&&(t.classList.add("skills-dirs-missing"),t.title="does not exist yet — creating a skill here will create it"),o.appendChild(t)}));var s=e("skill-target-dir");if(s){var r=s.value;s.innerHTML="";var d=i.roots.filter(function(e){return-1===i.missing.indexOf(e)||e===i.createDir});i.createDir&&-1===d.indexOf(i.createDir)&&d.unshift(i.createDir),d.forEach(function(e){var t=document.createElement("option");t.value=e,t.textContent=e,s.appendChild(t)}),r&&-1!==d.indexOf(r)?s.value=r:i.createDir&&(s.value=i.createDir)}}}(),t("skills-status",i.entries.length?i.entries.length+(1===i.entries.length?" skill":" skills"):"","info")):t("skills-status",n&&n.error||"could not read the skill list","error")}).catch(function(e){t("skills-status",e&&e.message||"could not read the skill list","error")}):(t("skills-status","skills are not available in this build","error"),Promise.resolve())}function a(i){i&&i.preventDefault();var a=e("skill-name"),l=e("skill-description"),o=e("skill-body"),s=e("skill-target-dir"),r=a?a.value.trim():"";return r?window.aegis&&"function"==typeof window.aegis.skillsCreate?window.aegis.skillsCreate({name:r,description:l?l.value.trim():"",body:o?o.value:"",targetDir:s?s.value:""}).then(function(e){if(e&&e.ok)return t("skill-create-hint","created "+e.path,"ok"),a&&(a.value=""),l&&(l.value=""),o&&(o.value=""),n();t("skill-create-hint",e&&e.error||"could not create that skill","error")}).catch(function(e){t("skill-create-hint",e&&e.message||"could not create that skill","error")}):(t("skill-create-hint","skills are not available in this build","error"),Promise.resolve()):(t("skill-create-hint","a skill needs a name","error"),a&&a.focus(),Promise.resolve())}function l(e){return e&&window.aegis&&"function"==typeof window.aegis.skillsRemove&&("function"!=typeof window.confirm||window.confirm('Delete the skill "'+e+'"? Its folder and SKILL.md will be removed.'))?window.aegis.skillsRemove(e).then(function(i){if(i&&i.ok)return t("skills-status","deleted "+e,"ok"),n();t("skills-status",i&&i.error||"could not remove that skill","error")}).catch(function(e){t("skills-status",e&&e.message||"could not remove that skill","error")}):Promise.resolve()}function o(i){i&&i.preventDefault();var a=e("skill-import-url"),l=e("skill-import-name"),o=a?a.value.trim():"";return o?window.aegis&&"function"==typeof window.aegis.skillsImport?(t("skill-import-hint","fetching…","info"),window.aegis.skillsImport({url:o,name:l?l.value.trim():""}).then(function(e){if(e&&e.ok)return t("skill-import-hint","imported "+e.name+" from "+e.source,"ok"),a&&(a.value=""),l&&(l.value=""),n();t("skill-import-hint",e&&e.error||"could not import that skill","error")}).catch(function(e){t("skill-import-hint",e&&e.message||"could not import that skill","error")})):(t("skill-import-hint","skill import is not available in this build","error"),Promise.resolve()):(t("skill-import-hint","a URL is required","error"),a&&a.focus(),Promise.resolve())}var s={status:null,loaded:!1};function r(i){var n=i||{};s.status=n;var a=n.settings||{},l=e("dictation-enabled");l&&(l.checked=!0===a.enabled);var o=e("dictation-model");o&&(o.value=a.model||"");var r=e("dictation-language");r&&a.language&&(r.value=a.language);var d=e("dictation-max-seconds");d&&a.maxSeconds&&(d.value=String(a.maxSeconds));var c=[];n.enabled?c.push("Ready — "+(n.reason||"local engine available")+(a.model?"":" (no model file set)")):(c.push(n.reason||"dictation is off"),n.install&&c.push(n.install)),t("dictation-hint",c.join("\n"),n.enabled?"ok":"info");var u=e("dictation-save");u&&(u.disabled=!1),window.aegisDictation&&window.aegisDictation.renderMic()}function d(){return window.aegis&&"function"==typeof window.aegis.speechStatus?window.aegis.speechStatus().then(function(e){return s.loaded=!0,r(e),e}).catch(function(e){t("dictation-hint",e&&e.message||"could not read dictation status","error")}):(t("dictation-hint","dictation is not available in this build","error"),Promise.resolve())}function c(){if(!window.aegis||"function"!=typeof window.aegis.speechSet)return Promise.resolve();var i={enabled:Boolean(e("dictation-enabled")&&e("dictation-enabled").checked),engine:"local",model:e("dictation-model")?e("dictation-model").value.trim():"",language:e("dictation-language")?e("dictation-language").value:"auto",maxSeconds:e("dictation-max-seconds")?Number(e("dictation-max-seconds").value):60};return i.enabled||(i.engine="none"),window.aegis.speechSet(i).then(function(e){return e&&e.ok?(t("dictation-hint","saved","ok"),d()):(r(e||{}),e)}).catch(function(e){t("dictation-hint",e&&e.message||"could not save dictation settings","error")})}function u(){var t=e("skills-form");t&&t.addEventListener("submit",a);var i=e("skills-import-form");i&&i.addEventListener("submit",o);var l=e("skills-refresh");l&&l.addEventListener("click",function(){n()});var s=e("dictation-save");s&&s.addEventListener("click",c);var r=e("dictation-refresh");r&&r.addEventListener("click",function(){d()});var u=e("dictation-enabled");u&&u.addEventListener("change",c)}window.aegisSettingsCards={refreshAll:function(){return Promise.all([n(),d()])},loadSkills:n,loadDictation:d,createSkill:a,importSkill:o,removeSkill:l,saveDictation:c,skills:function(){return i},dictation:function(){return s}},"undefined"!=typeof document&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){u()}):u())}();
|
|
@@ -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 MOD="Mod",SHORTCUTS=[{chord:`${MOD}+N`,label:"New chat",group:"Conversations",source:"menu",where:"File > New Chat"},{chord:`${MOD}+K`,label:"Search",group:"Conversations",source:"menu",where:"View > Search",note:"One sheet over both stores — sessions and memory."},{chord:`${MOD}+Shift+K`,label:"Search memory",group:"Conversations",source:"menu",where:"View > Search memory",hidden:!0,note:"Same sheet, pre-scoped to memory. The menu row is hidden; the chord works."},{chord:`${MOD}+F`,label:"Find in conversation",group:"Conversations",source:"menu",where:"Edit > Find in conversation",note:"Scoped to the transcript on screen; never leaves this window."},{chord:`${MOD}+S`,label:"Save as…",group:"Conversations",source:"menu",where:"File > Save as…",note:"The current session as Markdown."},{chord:`${MOD}+P`,label:"Command palette",group:"Windows",source:"menu",where:"View > Command palette…",note:"Not ⌘K — that chord already opens search."},{chord:`${MOD}+B`,label:"Toggle sidebar",group:"Windows",source:"menu",where:"View > Toggle sidebar",note:"Collapses the rail; it is not unmounted, so its state survives."},{chord:"Enter",label:"Send the message",group:"Composer",source:"renderer",where:"composer keydown"},{chord:"Shift+Enter",label:"New line without sending",group:"Composer",source:"renderer",where:"composer keydown"},{chord:"Up / Down",label:"Move the highlight",group:"Inside the palette",source:"renderer",where:"palette keydown"},{chord:"Enter",label:"Run the highlighted command",group:"Inside the palette",source:"renderer",where:"palette keydown"},{chord:"Esc",label:"Close the sheet on top",group:"Everywhere",source:"renderer",where:"overlay Escape",note:"With no sheet open it interrupts the running turn instead."},{chord:`${MOD}+R`,label:"Reload the window",group:"Everywhere",source:"native",where:"View > Reload"},{chord:`${MOD}+Shift+I`,label:"Toggle developer tools",group:"Everywhere",source:"native",where:"View > Toggle developer tools"}];function isMac(e){const o=String(e||"").toLowerCase();return"darwin"===o||o.startsWith("mac")}function modKey(e){return isMac(e)?"⌘":"Ctrl"}function platformize(e,o){const r=isMac(o);return String(e).split("+").map(
|
|
3
|
+
"use strict";const MOD="Mod",SHORTCUTS=[{chord:`${MOD}+N`,label:"New chat",group:"Conversations",source:"menu",where:"File > New Chat"},{chord:`${MOD}+K`,label:"Search",group:"Conversations",source:"menu",where:"View > Search",note:"One sheet over both stores — sessions and memory."},{chord:`${MOD}+Shift+K`,label:"Search memory",group:"Conversations",source:"menu",where:"View > Search memory",hidden:!0,note:"Same sheet, pre-scoped to memory. The menu row is hidden; the chord works."},{chord:`${MOD}+F`,label:"Find in conversation",group:"Conversations",source:"menu",where:"Edit > Find in conversation",note:"Scoped to the transcript on screen; never leaves this window."},{chord:`${MOD}+S`,label:"Save as…",group:"Conversations",source:"menu",where:"File > Save as…",note:"The current session as Markdown."},{chord:`${MOD}+P`,label:"Command palette",group:"Windows",source:"menu",where:"View > Command palette…",note:"Not ⌘K — that chord already opens search."},{chord:`${MOD}+B`,label:"Toggle sidebar",group:"Windows",source:"menu",where:"View > Toggle sidebar",note:"Collapses the rail; it is not unmounted, so its state survives."},{chord:"Enter",label:"Send the message",group:"Composer",source:"renderer",where:"composer keydown"},{chord:"Shift+Enter",label:"New line without sending",group:"Composer",source:"renderer",where:"composer keydown"},{chord:"Up / Down",label:"Move the highlight",group:"Inside the palette",source:"renderer",where:"palette keydown"},{chord:"Enter",label:"Run the highlighted command",group:"Inside the palette",source:"renderer",where:"palette keydown"},{chord:"Esc",label:"Close the sheet on top",group:"Everywhere",source:"renderer",where:"overlay Escape",note:"With no sheet open it interrupts the running turn instead."},{chord:`${MOD}+R`,label:"Reload the window",group:"Everywhere",source:"native",where:"View > Reload"},{chord:`${MOD}+Shift+I`,label:"Toggle developer tools",group:"Everywhere",source:"native",where:"View > Toggle developer tools"}];function isMac(e){const o=String(e||"").toLowerCase();return"darwin"===o||o.startsWith("mac")}function modKey(e){return isMac(e)?"⌘":"Ctrl"}function platformize(e,o){const r=isMac(o);return String(e).split("+").map(e=>e===MOD?r?"⌘":"Ctrl":"Shift"===e?r?"⇧":"Shift":"Alt"===e?r?"⌥":"Alt":e).join(r?"":"+")}function groups(){const e=[];for(const o of SHORTCUTS)e.includes(o.group)||e.push(o.group);return e}function rowsFor(e){return SHORTCUTS.filter(o=>o.group===e)}"undefined"!=typeof module&&module.exports&&(module.exports={SHORTCUTS:SHORTCUTS,MOD:MOD,isMac:isMac,modKey:modKey,platformize:platformize,groups:groups,rowsFor:rowsFor}),"undefined"!=typeof window&&(window.aegisShortcuts=window.aegisShortcuts||{},window.aegisShortcuts.SHORTCUTS=SHORTCUTS,window.aegisShortcuts.isMac=isMac,window.aegisShortcuts.platformize=platformize,window.aegisShortcuts.groups=groups,window.aegisShortcuts.rowsFor=rowsFor);
|
|
@@ -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 STICK_SLOP_PX=48;function nearBottom(t,e){const n=t||{},o=Number.isFinite(e)?e:
|
|
3
|
+
"use strict";const STICK_SLOP_PX=48;function nearBottom(t,e){const n=t||{},o=Number.isFinite(e)?e:48;return(Number(n.scrollHeight)||0)-(Number(n.scrollTop)||0)-(Number(n.clientHeight)||0)<=o}function shouldFollow(t,e){const n=e||{};return!!n.force||!n.userScrolledUp&&nearBottom(t,n.slop)}const ABORT_SIGNATURES=[/AbortError/,/\boperation was aborted\b/i,/\buser aborted\b/i,/\brequest\s+aborted\b/i,/\bsignal is aborted\b/i,/\baborted without reason\b/i];function isCancellation(t,e){if((e||{}).userStopped)return!0;if(!t)return!1;if("AbortError"===t.name||"ABORT_ERR"===t.code)return!0;const n="string"==typeof t?t:t.message;return"string"==typeof n&&ABORT_SIGNATURES.some(t=>t.test(n))}function stopAppliesTo(t,e){return null!=t&&t!==e}function salvageTurn(t){const e=t||{},n="string"==typeof e.streamedText?e.streamedText:"",o="string"==typeof e.reasoningText?e.reasoningText:"";return n?{text:n,reasoning:o,kind:"answer"}:o?{text:o,reasoning:"",kind:"reasoning-only"}:{text:"(stopped before any output)",reasoning:"",kind:"empty"}}function replayableContent(t,e){return"reasoning-only"===t?"(stopped: reasoning only)":"empty"===t?"(stopped before any output)":e}function flattenParts(t){if(null==t)return"";if("string"==typeof t)return t;if(!Array.isArray(t))return"";const e=[];for(const n of t)n&&"object"==typeof n&&("string"==typeof n.text?e.push(n.text):"image_url"===n.type&&e.push("[image]"));return e.join("\n")}function joinContent(t,e){if("string"==typeof t&&"string"==typeof e)return`${t}\n\n${e}`;const n=[],o=t=>{if("string"!=typeof t){if(Array.isArray(t))for(const e of t)e&&"object"==typeof e&&("image_url"===e.type?n.push(e):"string"==typeof e.text&&n.push({type:"text",text:e.text}))}else t.trim()&&n.push({type:"text",text:t})};o(t),o(e);const r=n.filter(t=>"text"===t.type).map(t=>t.text),s=n.filter(t=>"image_url"===t.type),i=[];return r.length&&i.push({type:"text",text:r.join("\n\n")}),i.push(...s),1===i.length&&"text"===i[0].type?i[0].text:i}function replayHistory(t){const e=[];for(const n of Array.isArray(t)?t:[]){if(!n)continue;if("user"!==n.role&&"assistant"!==n.role)continue;const t="string"==typeof n.content||Array.isArray(n.content)?n.content:"string"==typeof n.text?n.text:"",o=Array.isArray(t)?flattenParts(t):t;if(!o.trim())continue;if("assistant"===n.role&&isPlaceholderContent(o))continue;const r=e[e.length-1];r&&r.role===n.role?r.content=joinContent(r.content,t):e.push({role:n.role,content:t})}for(;e.length&&"assistant"===e[0].role;)e.shift();return e}function isPlaceholderContent(t){const e="string"==typeof t?t.trim():"";return!!e&&("(stopped: reasoning only)"===e||"(stopped before any output)"===e||"(empty response)"===e||"(no response)"===e)}const LIVE_METER_MIN_GROWTH=32,LIVE_METER_GROWTH_FRACTION=32;function liveMeterDue(t,e){const n=Number(e)||0;if(null==t)return n>0;const o=n-(Number(t)||0);return!(o<=0)&&o>=Math.max(32,Math.floor(n/32))}function toolMark(t){const e=t||{};return!0===e.ok?"✓":!1===e.ok?"✗":"⊘"}"undefined"!=typeof module&&module.exports&&(module.exports={nearBottom:nearBottom,shouldFollow:shouldFollow,isCancellation:isCancellation,stopAppliesTo:stopAppliesTo,salvageTurn:salvageTurn,replayableContent:replayableContent,isPlaceholderContent:isPlaceholderContent,replayHistory:replayHistory,liveMeterDue:liveMeterDue,toolMark:toolMark,STICK_SLOP_PX:48,LIVE_METER_MIN_GROWTH:32,LIVE_METER_GROWTH_FRACTION:32});
|
|
@@ -6077,6 +6077,28 @@ body.keys-open {
|
|
|
6077
6077
|
background: #0b0d10;
|
|
6078
6078
|
}
|
|
6079
6079
|
|
|
6080
|
+
/* ON9b: the terminal is its own document (pty-frame.html) so xterm's injected
|
|
6081
|
+
styles land where `style-src` permits them — see the comment in that file.
|
|
6082
|
+
From this side it is one element that must fill the body exactly, because
|
|
6083
|
+
pty-panel.js derives cols/rows from the size of the root INSIDE it. */
|
|
6084
|
+
.pty-panel-frame {
|
|
6085
|
+
display: block;
|
|
6086
|
+
width: 100%;
|
|
6087
|
+
height: 100%;
|
|
6088
|
+
border: 0;
|
|
6089
|
+
background: #0b0d10;
|
|
6090
|
+
}
|
|
6091
|
+
|
|
6092
|
+
/* Shown in place of the terminal when the frame loaded without xterm — a
|
|
6093
|
+
sentence instead of an empty black panel. */
|
|
6094
|
+
.pty-panel-note {
|
|
6095
|
+
margin: 0;
|
|
6096
|
+
padding: var(--s-2);
|
|
6097
|
+
color: var(--text);
|
|
6098
|
+
font-family: var(--font-ui);
|
|
6099
|
+
font-size: var(--fs-sm, 13px);
|
|
6100
|
+
}
|
|
6101
|
+
|
|
6080
6102
|
@media (prefers-reduced-motion: reduce) {
|
|
6081
6103
|
*,
|
|
6082
6104
|
*::before,
|
|
@@ -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 policy="undefined"!=typeof module&&module.exports?require("./stream-policy.js"):{nearBottom:nearBottom,shouldFollow:shouldFollow};function createTranscriptView(e){const n=e||{},t=n.messages,o="function"==typeof n.requestFrame?n.requestFrame:"function"==typeof requestAnimationFrame?requestAnimationFrame:e=>e();let r=!1;function c(){return t?{scrollHeight:t.scrollHeight,scrollTop:t.scrollTop,clientHeight:t.clientHeight}:null}function l(){return r=!policy.nearBottom(c()),r}return{metrics:c,noteScroll:l,attachScrollVeto:function(e){const n=e||t;return!(!n||"function"!=typeof n.addEventListener||(n.addEventListener("scroll",l,{passive:!0}),0))},follow:function(e){return!!t&&!!policy.shouldFollow(c(),{force:e&&e.force,userScrolledUp:r})&&(e&&e.force&&(r=!1),t.scrollTop=t.scrollHeight,!0)},paint:function(e){let n=!1;return function(){n||(n=!0,o((
|
|
3
|
+
"use strict";const policy="undefined"!=typeof module&&module.exports?require("./stream-policy.js"):{nearBottom:nearBottom,shouldFollow:shouldFollow};function createTranscriptView(e){const n=e||{},t=n.messages,o="function"==typeof n.requestFrame?n.requestFrame:"function"==typeof requestAnimationFrame?requestAnimationFrame:e=>e();let r=!1;function c(){return t?{scrollHeight:t.scrollHeight,scrollTop:t.scrollTop,clientHeight:t.clientHeight}:null}function l(){return r=!policy.nearBottom(c()),r}return{metrics:c,noteScroll:l,attachScrollVeto:function(e){const n=e||t;return!(!n||"function"!=typeof n.addEventListener||(n.addEventListener("scroll",l,{passive:!0}),0))},follow:function(e){return!!t&&!!policy.shouldFollow(c(),{force:e&&e.force,userScrolledUp:r})&&(e&&e.force&&(r=!1),t.scrollTop=t.scrollHeight,!0)},paint:function(e){let n=!1;return function(){n||(n=!0,o(()=>{n=!1,e()}))}},isScrolledUp:()=>r}}function attachScrollLift(e){const n=e||{},t=Array.prototype.slice.call(n.panes||[]),o=n.target||("undefined"!=typeof document&&document.body?document.body:null);if(!t.length||!o||!o.classList)return null;const r="function"==typeof n.requestFrame?n.requestFrame:"function"==typeof requestAnimationFrame?requestAnimationFrame:e=>e(),c=n.className||"is-scrolled",l="number"==typeof n.threshold?n.threshold:4;let s=!1;function i(){s=!1;let e=!1;for(const n of t)if(n&&n.scrollTop>l){e=!0;break}o.classList.toggle(c,e),"function"==typeof n.onSync&&n.onSync({lifted:e,panes:t})}function u(){s||(s=!0,r(i))}for(const e of t)e&&"function"==typeof e.addEventListener&&e.addEventListener("scroll",u,{passive:!0});return i(),{sync:i,panes:t,unbind:()=>{for(const e of t)e&&"function"==typeof e.removeEventListener&&e.removeEventListener("scroll",u)}}}function bindEscapeInterrupt(e){const n=e||{};let t=null;function o(e){const o={at:Date.now(),key:e&&e.key,repeat:Boolean(e&&e.repeat),overlayOpen:null,hasPendingTurn:null,consumed:!1,threw:null};if(t=o,!e||"Escape"!==e.key)return!1;if(e.repeat)return!1;if("function"==typeof n.isOverlayOpen){try{o.overlayOpen=Boolean(n.isOverlayOpen())}catch(e){o.threw="isOverlayOpen: "+(e&&e.message||e),o.overlayOpen=!1}if(o.overlayOpen){if("function"==typeof n.onOverlayEscape)try{n.onOverlayEscape()}catch(e){o.threw="onOverlayEscape: "+(e&&e.message||e)}return!1}}if("function"==typeof n.hasPendingTurn){try{o.hasPendingTurn=Boolean(n.hasPendingTurn())}catch(e){return o.threw="hasPendingTurn: "+(e&&e.message||e),!1}if(!o.hasPendingTurn)return!1}if("function"!=typeof n.stopTurn)return!1;"function"==typeof e.preventDefault&&e.preventDefault(),o.consumed=!0;let r=null;try{const e=n.stopTurn();r=void 0===e?null:Boolean(e)}catch(e){r=!1,o.threw="stopTurn: "+(e&&e.message||e)}return o.stopAccepted=r,!0}return n.doc&&"function"==typeof n.doc.addEventListener&&n.doc.addEventListener("keydown",o),{handle:o,lastDecision:()=>t,unbind:()=>{n.doc&&"function"==typeof n.doc.removeEventListener&&n.doc.removeEventListener("keydown",o)}}}"undefined"!=typeof module&&module.exports&&(module.exports={createTranscriptView:createTranscriptView,bindEscapeInterrupt:bindEscapeInterrupt,attachScrollLift:attachScrollLift});
|
|
@@ -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";function usageTokens(e){if(!e||"object"!=typeof e)return null;if("number"==typeof e.total_tokens)return e.total_tokens;const t=e.input_tokens??e.prompt_tokens??e.input,o=e.output_tokens??e.completion_tokens??e.output;return"number"!=typeof t&&"number"!=typeof o?null:(t||0)+(o||0)}function estimateTokens(e){return e?Math.max(1,Math.ceil([...String(e)].length/4)):0}function estimatedBuckets(e,t,o){const n=("string"==typeof t?t:"")+("string"==typeof o?o:"");return"string"==typeof e&&e.length>0||n.length>0?{input:estimateTokens(e),output:estimateTokens(n),cacheRead:0,cacheWrite:0,real:!1}:null}const RATES={sonnet:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},default:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},fable:{input:10,output:50,cacheRead:1,cacheWrite:12.5},opus:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},haiku:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},"claude-haiku":{input:1,output:5,cacheRead:.1,cacheWrite:1.25},"claude-opus-5":{input:5,output:25,cacheRead:.5,cacheWrite:6.25},"claude-opus-5-5":{input:4,output:20,cacheRead:.2,cacheWrite:5},"claude-sonnet-5":{input:2,output:10,cacheRead:.2,cacheWrite:2.5},"claude-sonnet-5-5":{input:2,output:10,cacheRead:.1,cacheWrite:2.5},"claude-haiku-5-5":{input:.1,output:.5,cacheRead:.01,cacheWrite:.125},"claude-fable-5":{input:10,output:50,cacheRead:1,cacheWrite:12.5},"claude-fable-5-1":{input:10,output:50,cacheRead:.25,cacheWrite:12.5},"claude-sonnet-4-6":{input:3,output:15,cacheRead:.3,cacheWrite:3.75},"claude-sonnet-4-5":{input:3,output:15,cacheRead:.3,cacheWrite:3.75},deepseek:{input:.3,output:1.2,cacheRead:.006,cacheWrite:.3,offPeak:{input:.15,output:.6,cacheRead:.003,cacheWrite:.15}},"deepseek-v4-pro":{input:1.32,output:3.96,cacheRead:.044,cacheWrite:1.32,offPeak:{input:.66,output:1.98,cacheRead:.022,cacheWrite:.66}},"deepseek-v4.1-pro":{input:1.32,output:3.96,cacheRead:.044,cacheWrite:1.32,offPeak:{input:.66,output:1.98,cacheRead:.022,cacheWrite:.66}},"grok-4.7":{input:2,output:6,cacheRead:.5,cacheWrite:2},"gemini-3.8-flash":{input:.75,output:3.75,cacheRead:.075,cacheWrite:.75},"gpt-5.5":{input:5,output:30,cacheRead:.5,cacheWrite:5}};function isPeak(e,t=new Date){if(0!==String(e||"").toLowerCase().indexOf("deepseek"))return!0;const o=t.getUTCDay();if(0===o||6===o)return!1;const n=t.getUTCHours();return n>=1&&n<4||n>=6&&n<10}const RATE_BASIS=Object.freeze({EXACT:"exact",PREFIX:"prefix",FAMILY:"family",DEFAULT:"default"}),RATE_FAMILIES=Object.keys(RATES).filter(
|
|
3
|
+
"use strict";function usageTokens(e){if(!e||"object"!=typeof e)return null;if("number"==typeof e.total_tokens)return e.total_tokens;const t=e.input_tokens??e.prompt_tokens??e.input,o=e.output_tokens??e.completion_tokens??e.output;return"number"!=typeof t&&"number"!=typeof o?null:(t||0)+(o||0)}function estimateTokens(e){return e?Math.max(1,Math.ceil([...String(e)].length/4)):0}function estimatedBuckets(e,t,o){const n=("string"==typeof t?t:"")+("string"==typeof o?o:"");return"string"==typeof e&&e.length>0||n.length>0?{input:estimateTokens(e),output:estimateTokens(n),cacheRead:0,cacheWrite:0,real:!1}:null}const RATES={sonnet:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},default:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},fable:{input:10,output:50,cacheRead:1,cacheWrite:12.5},opus:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},haiku:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},"claude-haiku":{input:1,output:5,cacheRead:.1,cacheWrite:1.25},"claude-opus-5":{input:5,output:25,cacheRead:.5,cacheWrite:6.25},"claude-opus-5-5":{input:4,output:20,cacheRead:.2,cacheWrite:5},"claude-sonnet-5":{input:2,output:10,cacheRead:.2,cacheWrite:2.5},"claude-sonnet-5-5":{input:2,output:10,cacheRead:.1,cacheWrite:2.5},"claude-haiku-5-5":{input:.1,output:.5,cacheRead:.01,cacheWrite:.125},"claude-fable-5":{input:10,output:50,cacheRead:1,cacheWrite:12.5},"claude-fable-5-1":{input:10,output:50,cacheRead:.25,cacheWrite:12.5},"claude-sonnet-4-6":{input:3,output:15,cacheRead:.3,cacheWrite:3.75},"claude-sonnet-4-5":{input:3,output:15,cacheRead:.3,cacheWrite:3.75},deepseek:{input:.3,output:1.2,cacheRead:.006,cacheWrite:.3,offPeak:{input:.15,output:.6,cacheRead:.003,cacheWrite:.15}},"deepseek-v4-pro":{input:1.32,output:3.96,cacheRead:.044,cacheWrite:1.32,offPeak:{input:.66,output:1.98,cacheRead:.022,cacheWrite:.66}},"deepseek-v4.1-pro":{input:1.32,output:3.96,cacheRead:.044,cacheWrite:1.32,offPeak:{input:.66,output:1.98,cacheRead:.022,cacheWrite:.66}},"grok-4.7":{input:2,output:6,cacheRead:.5,cacheWrite:2},"gemini-3.8-flash":{input:.75,output:3.75,cacheRead:.075,cacheWrite:.75},"gpt-5.5":{input:5,output:30,cacheRead:.5,cacheWrite:5}};function isPeak(e,t=new Date){if(0!==String(e||"").toLowerCase().indexOf("deepseek"))return!0;const o=t.getUTCDay();if(0===o||6===o)return!1;const n=t.getUTCHours();return n>=1&&n<4||n>=6&&n<10}const RATE_BASIS=Object.freeze({EXACT:"exact",PREFIX:"prefix",FAMILY:"family",DEFAULT:"default"}),RATE_FAMILIES=Object.keys(RATES).filter(e=>"default"!==e),UNPRICED_BY_DESIGN=Object.freeze({nexus:"auto-routing id: aegis1 picks the tier and settles the charge","nexus-brain":"pooled: multi-call fan-out, aegis1 settles the charge","aegis-brain":"pooled alias of nexus-brain","nexus-brain-smart":"pooled alias of nexus-brain","nexus-brain-neo":"pooled alias of nexus-brain","aegis-brain-smart":"pooled alias of nexus-brain","aegis-brain-neo":"pooled alias of nexus-brain","openai-gpt4o-mini":"pooled seat, aegis1 settles the charge",anthropic:"provider name, not a model id",openai:"provider name, not a model id",groq:"provider name, not a model id",google:"provider name, not a model id",xai:"provider name, not a model id"});function ratesFor(e,{at:t}={}){const o=String(e||"").toLowerCase(),n=(e,n)=>{const s=isPeak(0===o.indexOf("deepseek")||o.indexOf(":deepseek")>-1?"deepseek":o,t||new Date);return{...!s&&e.offPeak?{...e,...e.offPeak}:e,basis:n,peak:s,model:o}};if(!o)return n(RATES.default,RATE_BASIS.DEFAULT);const s=[o],a=Math.max(o.lastIndexOf(":"),o.lastIndexOf("/")),u=o.slice(a+1);u&&u!==o&&s.push(u);for(const e of s)if(RATES[e])return n(RATES[e],RATE_BASIS.EXACT);let c=null,i=0;for(const e of s)for(const[t,o]of Object.entries(RATES))"default"!==t&&e.startsWith(t)&&t.length>i&&(c=o,i=t.length);if(c)return n(c,RATE_BASIS.PREFIX);let r=null,p=0;for(const e of RATE_FAMILIES)o.includes(e)&&e.length>p&&(r=RATES[e],p=e.length);return n(r||RATES.default,r?RATE_BASIS.FAMILY:RATE_BASIS.DEFAULT)}function usageBuckets(e){const t=e&&"object"==typeof e?e:{},o=(...e)=>{for(const t of e)if("number"==typeof t)return t;return 0},n=e=>"number"==typeof e?e:void 0,s=n(t.input_tokens),a=n(t.prompt_tokens),u=t.prompt_tokens_details,c=u&&"object"==typeof u?n(u.cached_tokens):void 0,i=o(t.prompt_cache_hit_tokens,c,t.cached_tokens),r=void 0===s&&void 0!==a,p=r?a:o(s,a,t.input),l=o(t.cache_read_input_tokens,t.cacheRead,i),d=r?Math.min(Math.max(0,p),l):l,f=o(t.cache_creation_input_tokens,t.cacheWrite),m=o(t.output_tokens,t.completion_tokens,t.output),h=r?Math.max(0,p-d):p,k=o(t.total_tokens),R=h+m+d+f;return{input:k>R?h+(k-R):h,output:m,cacheRead:d,cacheWrite:f,cacheReported:"number"==typeof t.cache_read_input_tokens||"number"==typeof t.cacheRead||"number"==typeof t.cache_creation_input_tokens||"number"==typeof t.cacheWrite||"number"==typeof t.prompt_cache_hit_tokens||"number"==typeof t.cached_tokens||"number"==typeof c}}function cacheHitRate(e){const t=usageBuckets(e),o=Math.max(0,t.cacheRead||0),n=Math.max(0,t.input||0),s=o+n;return{read:o,miss:n,prompt:s,pct:t.cacheReported&&s>0?o/s*100:null,reported:t.cacheReported}}function costBreakdown(e,t,o={}){const n=ratesFor(t,o),s=usageBuckets(e),a=(e,t)=>Math.max(0,Number(e)||0)/1e6*t;return{cost:a(s.input,n.input)+a(s.output,n.output)+a(s.cacheRead,n.cacheRead)+a(s.cacheWrite,n.cacheWrite),basis:n.basis,peak:n.peak,model:n.model,priced:n.basis!==RATE_BASIS.DEFAULT}}function usageCost(e,t,o={}){return costBreakdown(e,t,o).cost}function turnAccounting(e,t,o={}){const n=usageTokens(e),s=e&&"object"==typeof e?e:{},a=e&&"object"==typeof e?usageBuckets(e).output:null,u="number"==typeof o.costUsd?o.costUsd:"number"==typeof s.costUsd?s.costUsd:void 0;if("number"==typeof u)return{tokens:n,output:a,cost:u,real:!0,estimated:!1,basis:"settled",priced:!0};if(null==n)return{tokens:n,output:a,cost:null,real:!1,estimated:!1,basis:null,priced:!1};const c=costBreakdown(s,t,o);return{tokens:n,output:a,cost:c.cost,real:!1,estimated:!0,basis:c.basis,priced:c.priced}}function emptyRoll(){return{turns:0,calls:0,tokens:0,input:0,output:0,cacheRead:0,cacheWrite:0,unknown:0,estimated:0,cost:0,estimate:0}}function rollTurn(e,t,o={}){const n=Object.assign(emptyRoll(),e||{});n.turns+=void 0===o.turns?1:Number(o.turns)||0,n.calls+=void 0===o.calls?1:Number(o.calls)||0;const s=turnAccounting(t,o.model,{costUsd:o.costUsd}),a=!0===o.estimated||t&&!1===t.real;if(null==s.tokens){const e=estimatedBuckets(o.prompt,o.reply,o.reasoning),t="number"==typeof o.measuredReasoningTokens&&o.measuredReasoningTokens>0?o.measuredReasoningTokens:0;return e?(n.tokens+=e.input+e.output+t,n.input+=e.input,n.output+=e.output+t,n.estimated+=1,n):t?(n.tokens+=t,n.output+=t,n.estimated+=1,n):(n.unknown+=1,n)}const u=usageBuckets(t);return n.tokens+=s.tokens,n.input+=u.input,n.output+=u.output,n.cacheRead+=u.cacheRead,n.cacheWrite+=u.cacheWrite,a?(n.estimated+=1,n):(s.real?n.cost+=s.cost:null!=s.cost&&(n.estimate+=s.cost),n)}function rollMessages(e){let t=emptyRoll();for(const o of Array.isArray(e)?e:[])o&&"assistant"===o.role&&(t=rollTurn(t,o.tokens,{model:o.model,costUsd:"number"==typeof o.costUsd?o.costUsd:void 0,calls:o.calls}));return t}function ledgerRow(e,t,o={}){const n=t||turnAccounting(e,o.model,{costUsd:o.costUsd}),s=Number.isFinite(o.calls)&&o.calls>0?o.calls:void 0;if(null!=n.tokens){const t={tokens:usageBuckets(e)};return n.real&&null!=n.cost&&(t.costUsd=n.cost),void 0!==s&&(t.calls=s),t}const a=estimatedBuckets(o.prompt,o.reply,o.reasoning);if(!a)return null;const u={tokens:a};return void 0!==s&&(u.calls=s),u}function fmtTokens(e){const t=Number(e);return!Number.isFinite(t)||t<=0?"0":Math.round(t).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function displayTokens(e){if(!e||"object"!=typeof e)return null;const t=e.tokens,o=[e.output];t&&"object"==typeof t?o.push(t.output,t.output_tokens,t.completion_tokens):o.push(e.output_tokens,e.completion_tokens);for(const e of o)if("number"==typeof e&&isFinite(e)&&e>0)return e;return null}function fmtRoll(e,t={}){const o=e||emptyRoll();if(!o.turns&&!o.calls)return"";const n=[],s=displayTokens(o);if(null!=s&&n.push(`${fmtTokens(s)} tokens`),n.push(`${o.calls} call${1===o.calls?"":"s"}`),!t.omitMoney&&(o.cost>0||o.estimate>0)){const e=[];o.cost>0&&e.push(fmtCost(o.cost,!0)),o.estimate>0&&e.push(fmtCost(o.estimate,!1)),n.push(e.join(" + "))}return o.unknown&&n.push(`${o.unknown} unrpt`),o.estimated&&n.push(`${o.estimated} est`),n.join(" · ")}function fmtCost(e,t){return"number"==typeof e&&isFinite(e)?`${t?"":"~"}$${e.toFixed(4)}`:""}function feeWaived(e){if(!e||"object"!=typeof e)return!1;const t=[e.tier,e.plan,e.planRaw,e.subscription,e.subscriptionTier,e.product,e.item,e.sku].filter(e=>"string"==typeof e).map(e=>e.trim().toLowerCase());return!0===e.unlimited||!!t.some(e=>"unlimited"===e||"trial"===e)||t.some(e=>/(^|[^a-z])unlimited([^a-z]|$)/.test(e))}function feeBillable(e){return!e||"object"!=typeof e||!feeWaived(e)&&!0!==e.degraded}"undefined"!=typeof module&&module.exports&&(module.exports={feeWaived:feeWaived,feeBillable:feeBillable,RATES:RATES,RATE_BASIS:RATE_BASIS,UNPRICED_BY_DESIGN:UNPRICED_BY_DESIGN,isPeak:isPeak,usageTokens:usageTokens,ratesFor:ratesFor,usageBuckets:usageBuckets,cacheHitRate:cacheHitRate,usageCost:usageCost,costBreakdown:costBreakdown,turnAccounting:turnAccounting,displayTokens:displayTokens,estimateTokens:estimateTokens,estimatedBuckets:estimatedBuckets,emptyRoll:emptyRoll,rollTurn:rollTurn,rollMessages:rollMessages,ledgerRow:ledgerRow,fmtTokens:fmtTokens,fmtRoll:fmtRoll,fmtCost:fmtCost});
|
|
@@ -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 ROWS=[{id:"update",fact:"updatePending",action:"update",label:e=>`Restart to install ${e.updatePending}`,hint:"The update is already downloaded."},{id:"sessions",fact:"sessionCount",action:"sessions",label:e=>`Search ${e.sessionCount} conversation${1===e.sessionCount?"":"s"}`,hint:"Everything you have run on this machine."},{id:"memory",fact:"memoryCount",action:"memory",label:e=>`Open your memory (${e.memoryCount})`,hint:"What this account already holds."},{id:"cli",fact:"cliAvailable",action:"cli",label:()=>"Open aegis in a terminal",hint:"The same install, in the terminal face."}],MAX_ROWS=3;function pickRows(e,i){const s=e||{},t=new Set(Array.isArray(i)?i:[]),n=[];for(const e of ROWS){if(n.length>=3)break;t.has(e.id)||hasFact(s,e.fact)&&n.push({id:e.id,action:e.action,label:e.label(s),hint:e.hint})}return n}function hasFact(e,i){const s=e[i];return null!=s&&!1!==s&&("number"==typeof s?s>0:"string"!=typeof s||s.length>0)}function parseDismissed(e){if(!e)return[];try{const i=JSON.parse(e);return Array.isArray(i)?i.filter(
|
|
3
|
+
"use strict";const ROWS=[{id:"update",fact:"updatePending",action:"update",label:e=>`Restart to install ${e.updatePending}`,hint:"The update is already downloaded."},{id:"sessions",fact:"sessionCount",action:"sessions",label:e=>`Search ${e.sessionCount} conversation${1===e.sessionCount?"":"s"}`,hint:"Everything you have run on this machine."},{id:"memory",fact:"memoryCount",action:"memory",label:e=>`Open your memory (${e.memoryCount})`,hint:"What this account already holds."},{id:"cli",fact:"cliAvailable",action:"cli",label:()=>"Open aegis in a terminal",hint:"The same install, in the terminal face."}],MAX_ROWS=3;function pickRows(e,i){const s=e||{},t=new Set(Array.isArray(i)?i:[]),n=[];for(const e of ROWS){if(n.length>=3)break;t.has(e.id)||hasFact(s,e.fact)&&n.push({id:e.id,action:e.action,label:e.label(s),hint:e.hint})}return n}function hasFact(e,i){const s=e[i];return null!=s&&!1!==s&&("number"==typeof s?s>0:"string"!=typeof s||s.length>0)}function parseDismissed(e){if(!e)return[];try{const i=JSON.parse(e);return Array.isArray(i)?i.filter(e=>"string"==typeof e):[]}catch{return[]}}function withDismissed(e,i){const s=(Array.isArray(e)?e:[]).filter(e=>e!==i);return s.push(i),JSON.stringify(s)}"undefined"!=typeof module&&module.exports&&(module.exports={pickRows:pickRows,parseDismissed:parseDismissed,withDismissed:withDismissed,hasFact:hasFact,ROWS:ROWS,MAX_ROWS:3}),"undefined"!=typeof window&&(window.aegisWelcomeRows=window.aegisWelcomeRows||{},window.aegisWelcomeRows.pickRows=pickRows,window.aegisWelcomeRows.parseDismissed=parseDismissed,window.aegisWelcomeRows.withDismissed=withDismissed);
|