aegisone 1.0.6 → 1.0.9
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 +2 -2
- package/bin/aegis.js +5 -0
- package/install.ps1 +5 -0
- package/install.sh +5 -0
- package/package.json +1 -1
- package/scripts/bump.mjs +5 -0
- package/scripts/bundle.js +5 -0
- package/scripts/predist.mjs +9 -0
- package/src/child.js +5 -0
- package/src/dispatch.js +5 -0
- package/src/doctor.js +5 -0
- package/src/host.js +5 -0
- package/src/permissions.js +5 -0
- package/src/probes.js +5 -0
- package/src/release.js +19 -5
- package/vendor/cli/README.md +39 -1
- package/vendor/cli/bin/aegiscode.js +137 -0
- package/vendor/cli/package.json +1 -1
- package/vendor/cli/scripts/check.mjs +5 -0
- package/vendor/cli/scripts/demo.mjs +5 -0
- package/vendor/cli/scripts/predist.mjs +29 -2
- package/vendor/cli/scripts/runtests.mjs +5 -0
- package/vendor/cli/scripts/seal-gate.mjs +76 -0
- package/vendor/cli/src/agents.js +5 -0
- package/vendor/cli/src/app.js +79 -1
- package/vendor/cli/src/art.js +5 -0
- package/vendor/cli/src/autonomous.js +23 -0
- package/vendor/cli/src/caps.js +5 -0
- package/vendor/cli/src/chatflow.js +245 -32
- package/vendor/cli/src/checkpoint.js +5 -0
- package/vendor/cli/src/clipboard.js +5 -0
- package/vendor/cli/src/cloudsync.js +5 -0
- package/vendor/cli/src/commands.js +487 -4
- package/vendor/cli/src/config.js +5 -0
- package/vendor/cli/src/credentials.js +5 -0
- package/vendor/cli/src/deps.js +5 -0
- package/vendor/cli/src/devrun.js +5 -0
- package/vendor/cli/src/diff.js +5 -0
- package/vendor/cli/src/diffview.js +5 -0
- package/vendor/cli/src/engine.js +9 -2
- package/vendor/cli/src/entitlement.js +5 -0
- package/vendor/cli/src/events.js +15 -0
- package/vendor/cli/src/export.js +5 -0
- package/vendor/cli/src/fingerprint.js +5 -0
- package/vendor/cli/src/format.js +5 -0
- package/vendor/cli/src/fuzzy.js +5 -0
- package/vendor/cli/src/gate.js +12 -0
- package/vendor/cli/src/history.js +5 -0
- package/vendor/cli/src/init.js +5 -0
- package/vendor/cli/src/input.js +5 -0
- package/vendor/cli/src/keys.js +29 -2
- package/vendor/cli/src/limits.js +192 -0
- package/vendor/cli/src/markdown.js +5 -0
- package/vendor/cli/src/mcp.js +13 -0
- package/vendor/cli/src/models.js +5 -0
- package/vendor/cli/src/naming.js +5 -0
- package/vendor/cli/src/overlays.js +7 -2
- package/vendor/cli/src/panels.js +5 -0
- package/vendor/cli/src/permissions.js +56 -1
- package/vendor/cli/src/ping.js +5 -0
- package/vendor/cli/src/presence.js +5 -0
- package/vendor/cli/src/provenance.js +238 -0
- package/vendor/cli/src/provenance.lock.json +36 -0
- package/vendor/cli/src/render.js +5 -0
- package/vendor/cli/src/screen.js +5 -0
- package/vendor/cli/src/screens.js +166 -62
- package/vendor/cli/src/secret.js +5 -0
- package/vendor/cli/src/securefs.js +5 -0
- package/vendor/cli/src/settings.js +5 -0
- package/vendor/cli/src/shared.js +5 -0
- package/vendor/cli/src/sharedpaths.js +5 -0
- package/vendor/cli/src/signup.js +5 -0
- package/vendor/cli/src/summarize.js +5 -0
- package/vendor/cli/src/sysdiag.js +582 -0
- package/vendor/cli/src/system.js +5 -0
- package/vendor/cli/src/theme.js +5 -0
- package/vendor/cli/src/title.js +5 -0
- package/vendor/cli/src/todos.js +5 -0
- package/vendor/cli/src/tokens.js +5 -0
- package/vendor/cli/src/topup.js +5 -0
- package/vendor/cli/src/update.js +5 -0
- package/vendor/cli/vendor/client/aegis.js +27 -0
- package/vendor/cli/vendor/client/attest.js +5 -0
- package/vendor/cli/vendor/client/authorship-key.js +5 -0
- package/vendor/cli/vendor/client/auto-provision.js +5 -0
- package/vendor/cli/vendor/client/brain-catalog.js +5 -0
- package/vendor/cli/vendor/client/byok-catalog.js +48 -8
- package/vendor/cli/vendor/client/credentials.js +5 -0
- package/vendor/cli/vendor/client/device-fingerprint.js +5 -0
- package/vendor/cli/vendor/client/env-file.js +5 -0
- package/vendor/cli/vendor/client/fingerprint.js +5 -0
- package/vendor/cli/vendor/client/foreign-memory.js +5 -0
- package/vendor/cli/vendor/client/hooks.js +5 -0
- package/vendor/cli/vendor/client/model-discovery.js +332 -0
- package/vendor/cli/vendor/client/platform.js +5 -0
- package/vendor/cli/vendor/client/prefs.js +5 -0
- package/vendor/cli/vendor/client/presence-constants.js +5 -0
- package/vendor/cli/vendor/client/presence.js +5 -0
- package/vendor/cli/vendor/client/record-vault.js +5 -0
- package/vendor/cli/vendor/client/session-store.js +5 -0
- package/vendor/cli/vendor/client/topup.js +5 -0
- package/vendor/cli/vendor/client/touch.js +5 -0
- package/vendor/cli/vendor/client/update.js +5 -0
- package/vendor/cli/vendor/client/user-models.js +383 -0
- package/vendor/cli/vendor/desktop/lib/local/aegis-seal.mjs +5 -0
- package/vendor/cli/vendor/desktop/lib/local/agents.js +5 -0
- package/vendor/cli/vendor/desktop/lib/local/autonomous.js +86 -0
- package/vendor/cli/vendor/desktop/lib/local/context.js +5 -0
- package/vendor/cli/vendor/desktop/lib/local/covenant.js +5 -0
- package/vendor/cli/vendor/desktop/lib/local/engine.js +576 -14
- package/vendor/cli/vendor/desktop/lib/local/entitlement.js +5 -0
- package/vendor/cli/vendor/desktop/lib/local/git-scope.js +5 -0
- package/vendor/cli/vendor/desktop/lib/local/local.js +5 -0
- package/vendor/cli/vendor/desktop/lib/local/prompt.js +5 -0
- package/vendor/cli/vendor/desktop/lib/local/queue.js +5 -0
- package/vendor/cli/vendor/desktop/lib/local/session-rounds.js +5 -0
- package/vendor/cli/vendor/desktop/lib/local/shell.js +88 -9
- package/vendor/cli/vendor/desktop/lib/local/tools.js +13 -6
- package/vendor/cli/vendor/desktop/lib/local/turn-guard.js +5 -0
- package/vendor/cli/vendor/desktop/lib/local/worktree-lock.js +5 -0
- package/vendor/cli/vendor/desktop/lib/settings.js +5 -0
- package/vendor/cli/vendor/desktop/renderer/usage.js +73 -1
- package/vendor/cli/vendor/mcp/server.js +5 -0
- package/vendor/cli/vendor/mcp/tools.js +5 -0
- package/vendor/cli/vendor/tools/agent-gate.mjs +23 -0
- package/vendor/desktop/README.md +11 -0
- package/vendor/desktop/bin/aegis.js +5 -0
- package/vendor/desktop/lib/auto.js +5 -0
- package/vendor/desktop/lib/avatar/companion.js +5 -0
- package/vendor/desktop/lib/avatar/cosmetics.js +5 -0
- package/vendor/desktop/lib/avatar/events.js +5 -0
- package/vendor/desktop/lib/avatar/holder-turn.js +5 -0
- package/vendor/desktop/lib/avatar/holders.js +5 -0
- package/vendor/desktop/lib/avatar/identity.js +5 -0
- package/vendor/desktop/lib/avatar/level.js +5 -0
- package/vendor/desktop/lib/avatar/mirror.js +5 -0
- package/vendor/desktop/lib/avatar/persona.js +5 -0
- package/vendor/desktop/lib/avatar/profile.js +5 -0
- package/vendor/desktop/lib/avatar/register.js +5 -0
- package/vendor/desktop/lib/avatar/store.js +5 -0
- package/vendor/desktop/lib/avatar/tiers.js +5 -0
- package/vendor/desktop/lib/avatar/transfer.js +5 -0
- package/vendor/desktop/lib/avatar/turn.js +5 -0
- package/vendor/desktop/lib/avatar/voice.js +5 -0
- package/vendor/desktop/lib/avatar/xp.js +5 -0
- package/vendor/desktop/lib/deep-link.js +40 -1
- package/vendor/desktop/lib/fingerprint.js +5 -0
- package/vendor/desktop/lib/local/aegis-seal.mjs +5 -0
- package/vendor/desktop/lib/local/agents.js +5 -0
- package/vendor/desktop/lib/local/autonomous.js +86 -0
- package/vendor/desktop/lib/local/context.js +5 -0
- package/vendor/desktop/lib/local/covenant.js +5 -0
- package/vendor/desktop/lib/local/engine.js +576 -14
- package/vendor/desktop/lib/local/entitlement.js +5 -0
- package/vendor/desktop/lib/local/git-scope.js +5 -0
- package/vendor/desktop/lib/local/local.js +5 -0
- package/vendor/desktop/lib/local/prompt.js +5 -0
- package/vendor/desktop/lib/local/queue.js +5 -0
- package/vendor/desktop/lib/local/session-rounds.js +5 -0
- package/vendor/desktop/lib/local/shell.js +88 -9
- package/vendor/desktop/lib/local/telemetry.js +5 -0
- package/vendor/desktop/lib/local/tools.js +13 -6
- package/vendor/desktop/lib/local/turn-guard.js +5 -0
- package/vendor/desktop/lib/local/worktree-lock.js +5 -0
- package/vendor/desktop/lib/provider-key-mirror.js +5 -0
- package/vendor/desktop/lib/quick-launcher.js +5 -0
- package/vendor/desktop/lib/settings.js +5 -0
- package/vendor/desktop/lib/sync/memory-queue.js +5 -0
- package/vendor/desktop/lib/sync/persist-gate.js +5 -0
- package/vendor/desktop/lib/sync/sessions.js +5 -0
- package/vendor/desktop/lib/window-state.js +5 -0
- package/vendor/desktop/main.js +293 -6
- package/vendor/desktop/package.json +1 -1
- package/vendor/desktop/preload.js +32 -0
- package/vendor/desktop/renderer/app.js +506 -12
- package/vendor/desktop/renderer/avatar/assemble.js +5 -0
- package/vendor/desktop/renderer/avatar/avatar.css +7 -0
- package/vendor/desktop/renderer/avatar/avatar.js +5 -0
- package/vendor/desktop/renderer/avatar/cards.js +5 -0
- package/vendor/desktop/renderer/avatar/hud.js +5 -0
- package/vendor/desktop/renderer/avatar/machine.js +5 -0
- package/vendor/desktop/renderer/avatar/pane.js +5 -0
- package/vendor/desktop/renderer/avatar/parts.js +5 -0
- package/vendor/desktop/renderer/budget.js +5 -0
- package/vendor/desktop/renderer/diff.js +5 -0
- package/vendor/desktop/renderer/diffview.js +5 -0
- package/vendor/desktop/renderer/fingerprint.css +7 -0
- package/vendor/desktop/renderer/fingerprint.js +5 -0
- package/vendor/desktop/renderer/fonts/fonts.css +7 -0
- package/vendor/desktop/renderer/index.html +9 -2
- package/vendor/desktop/renderer/markdown.js +5 -0
- package/vendor/desktop/renderer/quick.css +7 -0
- package/vendor/desktop/renderer/quick.html +7 -0
- package/vendor/desktop/renderer/quick.js +5 -0
- package/vendor/desktop/renderer/stream-policy.js +5 -0
- package/vendor/desktop/renderer/style.css +39 -0
- package/vendor/desktop/renderer/transcript-view.js +5 -0
- package/vendor/desktop/renderer/usage.js +73 -1
- package/vendor/desktop/vendor/aegis.js +27 -0
- package/vendor/desktop/vendor/agent-gate.mjs +23 -0
- package/vendor/desktop/vendor/attest.js +5 -0
- package/vendor/desktop/vendor/authorship-key.js +5 -0
- package/vendor/desktop/vendor/auto-provision.js +5 -0
- package/vendor/desktop/vendor/brain-catalog.js +5 -0
- package/vendor/desktop/vendor/byok-catalog.js +48 -8
- package/vendor/desktop/vendor/credentials.js +5 -0
- package/vendor/desktop/vendor/device-fingerprint.js +5 -0
- package/vendor/desktop/vendor/env-file.js +5 -0
- package/vendor/desktop/vendor/fingerprint.js +5 -0
- package/vendor/desktop/vendor/foreign-memory.js +5 -0
- package/vendor/desktop/vendor/hooks.js +5 -0
- package/vendor/desktop/vendor/model-discovery.js +332 -0
- package/vendor/desktop/vendor/platform.js +5 -0
- package/vendor/desktop/vendor/prefs.js +5 -0
- package/vendor/desktop/vendor/presence-constants.js +5 -0
- package/vendor/desktop/vendor/presence.js +5 -0
- package/vendor/desktop/vendor/record-vault.js +5 -0
- package/vendor/desktop/vendor/session-store.js +5 -0
- package/vendor/desktop/vendor/topup.js +5 -0
- package/vendor/desktop/vendor/touch.js +5 -0
- package/vendor/desktop/vendor/update.js +5 -0
- package/vendor/desktop/vendor/user-models.js +383 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# AEGISONE
|
|
2
2
|
|
|
3
|
-
Product version: **1.0.
|
|
3
|
+
Product version: **1.0.9**
|
|
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.
|
|
@@ -60,7 +60,7 @@ fails, and it never leaves you with "nothing happened". Afterwards: `aegis`
|
|
|
60
60
|
|
|
61
61
|
## Size, measured not claimed
|
|
62
62
|
|
|
63
|
-
Measured size: **2.
|
|
63
|
+
Measured size: **2.17 MB** (2,274,903 bytes) with Electron absent — both faces inside.
|
|
64
64
|
|
|
65
65
|
The plan's "~2 MB" was a target, so it is measured here rather than published:
|
|
66
66
|
`npm pack one/` on this tree, with Electron absent, produces that tarball, and it
|
package/bin/aegis.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
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.
|
|
2
7
|
'use strict';
|
|
3
8
|
|
|
4
9
|
/**
|
package/install.ps1
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
# Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
|
|
3
|
+
# AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
|
|
4
|
+
# Conveying a modified copy, or running one as a network service, owes the
|
|
5
|
+
# corresponding source under this licence (§5/§13) — see LICENSING.md.
|
|
1
6
|
<#
|
|
2
7
|
.SYNOPSIS
|
|
3
8
|
AEGISONE installer (Windows) — plan ON6 (D2, D3).
|
package/install.sh
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
#!/bin/sh
|
|
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.
|
|
2
7
|
# AEGISONE installer — plan ON6 (D2, D3).
|
|
3
8
|
#
|
|
4
9
|
# Two steps, in this order:
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aegisone",
|
|
3
3
|
"productName": "AEGISONE",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.9",
|
|
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/scripts/bump.mjs
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
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.
|
|
2
7
|
/**
|
|
3
8
|
* AEGISONE — the bump: ONE command, ONE version, three manifests, one README
|
|
4
9
|
* line (plan D4, ON3 step 1).
|
package/scripts/bundle.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
|
|
3
|
+
// AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
|
|
4
|
+
// Conveying a modified copy, or running one as a network service, owes the
|
|
5
|
+
// corresponding source under this licence (§5/§13) — see LICENSING.md.
|
|
1
6
|
'use strict';
|
|
2
7
|
|
|
3
8
|
/**
|
package/scripts/predist.mjs
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
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.
|
|
2
7
|
/**
|
|
3
8
|
* AEGISONE — the ONLY vendoring stager (plan D6).
|
|
4
9
|
*
|
|
@@ -123,6 +128,10 @@ export const MANIFEST = [
|
|
|
123
128
|
note: 'the pooled-brain rule, required at load time by the engine and src/models.js' },
|
|
124
129
|
{ src: 'client/byok-catalog.js', shapes: ['mirror', 'flat'],
|
|
125
130
|
note: 'the BYOK model additions the server catalog does not name' },
|
|
131
|
+
{ src: 'client/user-models.js', shapes: ['mirror', 'flat'],
|
|
132
|
+
note: 'the models the USER declares, in one file both hosts read (requires ./credentials.js)' },
|
|
133
|
+
{ src: 'client/model-discovery.js', shapes: ['mirror', 'flat'],
|
|
134
|
+
note: 'asks the vendor what it serves, so adding a new model is not a memory test (requires ./user-models.js)' },
|
|
126
135
|
{ src: 'client/hooks.js', shapes: ['mirror', 'flat'],
|
|
127
136
|
note: 'the shared hook layer behind /hooks and the repo guard installer' },
|
|
128
137
|
{ src: 'client/platform.js', shapes: ['mirror', 'flat'],
|
package/src/child.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
|
|
3
|
+
// AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
|
|
4
|
+
// Conveying a modified copy, or running one as a network service, owes the
|
|
5
|
+
// corresponding source under this licence (§5/§13) — see LICENSING.md.
|
|
1
6
|
'use strict';
|
|
2
7
|
|
|
3
8
|
/**
|
package/src/dispatch.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
|
|
3
|
+
// AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
|
|
4
|
+
// Conveying a modified copy, or running one as a network service, owes the
|
|
5
|
+
// corresponding source under this licence (§5/§13) — see LICENSING.md.
|
|
1
6
|
'use strict';
|
|
2
7
|
|
|
3
8
|
/**
|
package/src/doctor.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
|
|
3
|
+
// AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
|
|
4
|
+
// Conveying a modified copy, or running one as a network service, owes the
|
|
5
|
+
// corresponding source under this licence (§5/§13) — see LICENSING.md.
|
|
1
6
|
'use strict';
|
|
2
7
|
|
|
3
8
|
/**
|
package/src/host.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
|
|
3
|
+
// AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
|
|
4
|
+
// Conveying a modified copy, or running one as a network service, owes the
|
|
5
|
+
// corresponding source under this licence (§5/§13) — see LICENSING.md.
|
|
1
6
|
'use strict';
|
|
2
7
|
|
|
3
8
|
/**
|
package/src/permissions.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
|
|
3
|
+
// AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
|
|
4
|
+
// Conveying a modified copy, or running one as a network service, owes the
|
|
5
|
+
// corresponding source under this licence (§5/§13) — see LICENSING.md.
|
|
1
6
|
'use strict';
|
|
2
7
|
|
|
3
8
|
/**
|
package/src/probes.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
|
|
3
|
+
// AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
|
|
4
|
+
// Conveying a modified copy, or running one as a network service, owes the
|
|
5
|
+
// corresponding source under this licence (§5/§13) — see LICENSING.md.
|
|
1
6
|
'use strict';
|
|
2
7
|
|
|
3
8
|
/**
|
package/src/release.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
|
|
3
|
+
// AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
|
|
4
|
+
// Conveying a modified copy, or running one as a network service, owes the
|
|
5
|
+
// corresponding source under this licence (§5/§13) — see LICENSING.md.
|
|
1
6
|
'use strict';
|
|
2
7
|
|
|
3
8
|
/**
|
|
@@ -41,16 +46,25 @@
|
|
|
41
46
|
*
|
|
42
47
|
* `line` is the `major.minor` that must not move (D4 rule 1). `anchor` is the
|
|
43
48
|
* patch each face had published at `ANCHOR_PRODUCT` — the calibration point for
|
|
44
|
-
* the whole derivation
|
|
45
|
-
*
|
|
49
|
+
* the whole derivation.
|
|
50
|
+
*
|
|
51
|
+
* Re-anchored at product `1.0.8`: `aegiscode` graduates from the `6.8.x` line
|
|
52
|
+
* to `7.0.x` and `aegis-desktop` from `0.8.x` to `1.0.x`, both starting at
|
|
53
|
+
* patch 0 — a deliberate one-time line move, not a normal release. Nothing
|
|
54
|
+
* before this point is derivable under the new anchor (an older product
|
|
55
|
+
* version would compute a negative patch and `deriveFaceVersion` refuses it as
|
|
56
|
+
* "backwards"), which is correct: the old `6.8.x`/`0.8.x` history stays real,
|
|
57
|
+
* it is just not reachable through this formula anymore. A product version
|
|
58
|
+
* `>= 1.0.8` is unaffected either way, because the derivation only ever looks
|
|
59
|
+
* at the DELTA from the anchor, never at history before it.
|
|
46
60
|
*/
|
|
47
61
|
const FACE_LINES = Object.freeze([
|
|
48
|
-
Object.freeze({ dir: 'cli', package: 'aegiscode', line: Object.freeze([
|
|
49
|
-
Object.freeze({ dir: 'desktop', package: 'aegis-desktop', line: Object.freeze([
|
|
62
|
+
Object.freeze({ dir: 'cli', package: 'aegiscode', line: Object.freeze([7, 0]), anchor: 0 }),
|
|
63
|
+
Object.freeze({ dir: 'desktop', package: 'aegis-desktop', line: Object.freeze([1, 0]), anchor: 0 })
|
|
50
64
|
]);
|
|
51
65
|
|
|
52
66
|
/** The product version the two anchors above were measured at. */
|
|
53
|
-
const ANCHOR_PRODUCT = '1.0.
|
|
67
|
+
const ANCHOR_PRODUCT = '1.0.8';
|
|
54
68
|
|
|
55
69
|
/** One product minor reserves 100 face patches; one major reserves 10000. */
|
|
56
70
|
const MINOR_STRIDE = 100;
|
package/vendor/cli/README.md
CHANGED
|
@@ -255,7 +255,7 @@ command for command — 87 entries across nine categories:
|
|
|
255
255
|
|---|---|
|
|
256
256
|
| Session & context | `/schedule` `/clear` `/compact` `/context` `/todos` `/config` `/exit` `/recap` `/resume` `/rewind` `/agents` `/status` `/teleport` `/version` `/new` `/skills` `/multiyolo` `/multi` `/research` `/debate` |
|
|
257
257
|
| Workspace | `/run` `/build` `/cd` `/init` `/clone` |
|
|
258
|
-
| Model & behavior | `/ping` `/effort` `/model` `/theme` `/terminal` `/vim` `/permissions` `/hooks` `/credentials` `/install-github-app` `/thinking` `/mcp` `/memory` `/memory-deep` `/confirm` `/automode` *(alias `/yolo`)* `/router` `/class`
|
|
258
|
+
| Model & behavior | `/ping` `/effort` `/model` `/models` `/model-add` `/model-rm` `/theme` `/terminal` `/vim` `/permissions` `/hooks` `/credentials` `/install-github-app` `/thinking` `/mcp` `/memory` `/memory-deep` `/confirm` `/automode` *(alias `/yolo`)* `/router` `/class` |
|
|
259
259
|
| Data | `/copy` `/cost` `/export` `/tokens` `/sync` |
|
|
260
260
|
| Auth | `/login` `/logout` `/key` `/byok` `/byok-set` `/byok-rm` `/byok-key` `/byok-rm-key` |
|
|
261
261
|
| Support | `/help` `/doctor` `/upgrade` `/troubleshooting` `/feedback` `/bug` `/issue` `/onboarding` `/shell-completion` `/terminal-setup` `/pr-comments` `/prs` `/review` `/benchmark` `/billing` `/topup` `/cloud` `/gmail` `/release-notes` |
|
|
@@ -338,6 +338,44 @@ Selecting it switches the class to `aegis` first (this is the one row that is
|
|
|
338
338
|
not a `provider:model` id); pinning it *without* switching is not offered,
|
|
339
339
|
because the relay would read `nexus-brain` as a provider name.
|
|
340
340
|
|
|
341
|
+
**3. Adding a model nobody has released yet.**
|
|
342
|
+
|
|
343
|
+
Vendors ship models faster than any client can be updated, and the BYOK relay is
|
|
344
|
+
a pass-through: your own vendor key authenticates upstream and AEGIS forwards the
|
|
345
|
+
model string it is handed. So an id your provider serves is callable the moment
|
|
346
|
+
your machine offers it as a row — which is what these do:
|
|
347
|
+
|
|
348
|
+
```bash
|
|
349
|
+
/model-add deepseek deepseek-v4.2-preview # offer it on this machine
|
|
350
|
+
/model-rm deepseek deepseek-v4.2-preview # forget it
|
|
351
|
+
/model-add deepseek # prompt for the id instead
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
`/model-add` resolves the provider against the relay's catalogue first, so a
|
|
355
|
+
provider the relay takes no key for is **refused** rather than stored — a
|
|
356
|
+
declaration for a slug the relay does not accept would appear in no picker at
|
|
357
|
+
all, and the failure would land on your first turn. The id itself is shape
|
|
358
|
+
checked (no spaces, no colon — `provider:model` is the id a pin uses) but never
|
|
359
|
+
checked against a vendor list: reaching a model the catalogue has not caught up
|
|
360
|
+
with is the entire point.
|
|
361
|
+
|
|
362
|
+
The declaration lives in **`~/.aegiscode/models.json`** (`$AEGISCODE_HOME` if you
|
|
363
|
+
set it), which is also the file the desktop's Settings pane writes and reads. Add
|
|
364
|
+
a model in the terminal and it is in the window's picker on its next refresh,
|
|
365
|
+
with no restart; add one in the window and `/models` shows it immediately. The
|
|
366
|
+
file is plain JSON and 0600, so a bulk edit is an editor away:
|
|
367
|
+
|
|
368
|
+
```json
|
|
369
|
+
{
|
|
370
|
+
"deepseek": ["deepseek-v4.2-preview"],
|
|
371
|
+
"anthropic": ["claude-opus-9-1"]
|
|
372
|
+
}
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
Nothing here is validated against a vendor on read, so a hand-typed row that the
|
|
376
|
+
vendor does not serve will 404 on your first turn — that is the one cost of the
|
|
377
|
+
escape hatch, and it is why the commands validate what they store.
|
|
378
|
+
|
|
341
379
|
```bash
|
|
342
380
|
aegiscode -m nexus-brain -p "…" # pin at launch
|
|
343
381
|
aegiscode -m anthropic:claude-sonnet-4-5 -p "…" # a BYOK id at launch
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
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.
|
|
2
7
|
'use strict';
|
|
3
8
|
|
|
4
9
|
/**
|
|
@@ -76,6 +81,12 @@ Code protection (the agent-key gate on aegiscodex-dev / aegiscode-plugin):
|
|
|
76
81
|
aegiscode gate lock-status the server-side half of the lock
|
|
77
82
|
aegiscode gate help all subcommands and their flags
|
|
78
83
|
|
|
84
|
+
Provenance (this binary, and whether it is still the published one):
|
|
85
|
+
aegiscode provenance licence, source, and a self-check of
|
|
86
|
+
this build against the published seal
|
|
87
|
+
(--json for scripts; exit 1 if a
|
|
88
|
+
sealed unit has moved)
|
|
89
|
+
|
|
79
90
|
Options:
|
|
80
91
|
-m, --model <id> pin a model id (see /models; default: server choice)
|
|
81
92
|
--base <url> API base (default $AEGIS_API_BASE or aegiscloud.org)
|
|
@@ -191,6 +202,13 @@ function parseArgs(argv) {
|
|
|
191
202
|
opts.commandArg = sub;
|
|
192
203
|
opts.commandArgv = argv.slice(argv[1] && !argv[1].startsWith('-') ? 2 : 1);
|
|
193
204
|
argv = [];
|
|
205
|
+
} else if (head === 'provenance') {
|
|
206
|
+
// Same position-0 rule and the same reason as `gate`: it is a one-shot
|
|
207
|
+
// question about THIS BINARY, not a prompt that happens to start with the
|
|
208
|
+
// word. Unlike `gate` the tail needs no passthrough — the only flag it
|
|
209
|
+
// takes is `--json`, which this parser already owns.
|
|
210
|
+
opts.command = 'provenance';
|
|
211
|
+
argv = argv.slice(1);
|
|
194
212
|
} else if (head === 'topup') {
|
|
195
213
|
// Same position-0 rule and the same reason as `gate`: the one argument is
|
|
196
214
|
// the amount (`aegiscode topup 20`), never a prompt whose text happens to
|
|
@@ -291,6 +309,53 @@ function parseArgs(argv) {
|
|
|
291
309
|
return opts;
|
|
292
310
|
}
|
|
293
311
|
|
|
312
|
+
/**
|
|
313
|
+
* `aegiscode provenance` — what this binary is, and whether its safety files are
|
|
314
|
+
* the ones that were published.
|
|
315
|
+
*
|
|
316
|
+
* The use case is a user (or an auditor, or a script) holding an install they
|
|
317
|
+
* did not build: `npm i -g aegiscode`, a tarball mailed to them, a rebuilt fork.
|
|
318
|
+
* It answers with the licence, the copyright holder, the source URL, and the
|
|
319
|
+
* result of the startup self-check against `src/provenance.lock.json`.
|
|
320
|
+
*
|
|
321
|
+
* Exit codes: 0 = identity intact and safety files verified; 1 = a safety file
|
|
322
|
+
* has moved, or the manifest is missing and the install therefore cannot be
|
|
323
|
+
* verified at all (absence is a failure — see src/provenance.js for why the
|
|
324
|
+
* cheap attack must be the loud one). A fork that has deliberately rebuilt is
|
|
325
|
+
* expected to regenerate the manifest and exit 0 naming itself; one that has
|
|
326
|
+
* not now says so instead of staying silent.
|
|
327
|
+
*/
|
|
328
|
+
function runProvenance(opts = {}) {
|
|
329
|
+
const pkg = require(path.join(__dirname, '..', 'package.json'));
|
|
330
|
+
const provenance = require('../src/provenance.js');
|
|
331
|
+
const described = provenance.describe({ version: pkg.version });
|
|
332
|
+
if (opts.json) {
|
|
333
|
+
process.stdout.write(
|
|
334
|
+
JSON.stringify(
|
|
335
|
+
{
|
|
336
|
+
product: provenance.IDENTITY.product,
|
|
337
|
+
bin: provenance.IDENTITY.bin,
|
|
338
|
+
version: pkg.version,
|
|
339
|
+
license: provenance.IDENTITY.license,
|
|
340
|
+
source: provenance.IDENTITY.source,
|
|
341
|
+
homepage: provenance.IDENTITY.homepage,
|
|
342
|
+
copyright: provenance.IDENTITY.copyright,
|
|
343
|
+
safety: {
|
|
344
|
+
ok: described.report.ok,
|
|
345
|
+
checked: described.report.checked,
|
|
346
|
+
problems: described.report.problems,
|
|
347
|
+
},
|
|
348
|
+
},
|
|
349
|
+
null,
|
|
350
|
+
2
|
|
351
|
+
) + '\n'
|
|
352
|
+
);
|
|
353
|
+
return described.ok ? 0 : 1;
|
|
354
|
+
}
|
|
355
|
+
process.stdout.write(described.text);
|
|
356
|
+
return described.ok ? 0 : 1;
|
|
357
|
+
}
|
|
358
|
+
|
|
294
359
|
/**
|
|
295
360
|
* Account subcommands: the in-band way to give this host a key.
|
|
296
361
|
*
|
|
@@ -450,6 +515,42 @@ async function main(argv = process.argv.slice(2)) {
|
|
|
450
515
|
return 0;
|
|
451
516
|
}
|
|
452
517
|
|
|
518
|
+
// ── interlock (see src/limits.js) ────────────────────────────────────────
|
|
519
|
+
//
|
|
520
|
+
// The second gate, and it runs before every subcommand dispatch below — gate,
|
|
521
|
+
// mcp, autonomous, provenance, the session — because a check that ran after
|
|
522
|
+
// the dispatch it is supposed to stop is a check that reports instead of
|
|
523
|
+
// gating.
|
|
524
|
+
//
|
|
525
|
+
// It asks whether the safety files are still the sealed set *as a whole*, and
|
|
526
|
+
// when they are not it says exactly one bland thing — naming no file, no cause
|
|
527
|
+
// and no remedy — and refuses the privileged subcommands (`gate`,
|
|
528
|
+
// `provenance`, `mcp`), so the build that failed the check cannot use the
|
|
529
|
+
// gate's own key management or report on itself. Sessions still start, marked
|
|
530
|
+
// `AEGIS_REDUCED_MODE=1` for modules that opt-in.
|
|
531
|
+
//
|
|
532
|
+
// Deliberately NOT switchable by environment variable: a gate with a
|
|
533
|
+
// documented off switch is a gate the manipulator reads about in the same file
|
|
534
|
+
// as the gate. Re-sealing is a manual act —
|
|
535
|
+
// `node tools/provenance.mjs lock --write` — and a tree that is mid-edit trips
|
|
536
|
+
// this on purpose.
|
|
537
|
+
//
|
|
538
|
+
// This call site is the EARLIEST refusal, not the only one. `armed()` is
|
|
539
|
+
// asked again, independently, by each module that owns one of these
|
|
540
|
+
// privileges — src/gate.js, src/mcp.js, src/autonomous.js,
|
|
541
|
+
// src/permissions.js — because a check invoked from exactly one place is
|
|
542
|
+
// removed by deleting one line, and this is the file a manipulator is already
|
|
543
|
+
// editing. Deleting the block below leaves four refusals behind, in four files
|
|
544
|
+
// the sealed set covers.
|
|
545
|
+
let interlockFired = false;
|
|
546
|
+
try {
|
|
547
|
+
const limits = require('../src/limits.js');
|
|
548
|
+
interlockFired = limits.armed();
|
|
549
|
+
if (interlockFired && limits.isPrivileged(opts.command)) return limits.refuse();
|
|
550
|
+
} catch {
|
|
551
|
+
/* a gate must never be the reason the program fails to start */
|
|
552
|
+
}
|
|
553
|
+
|
|
453
554
|
// ── the shared env file, before any credential is resolved ───────────────
|
|
454
555
|
//
|
|
455
556
|
// `~/.aegiscode/.env` read into process.env once. This is what makes key
|
|
@@ -618,8 +719,44 @@ async function main(argv = process.argv.slice(2)) {
|
|
|
618
719
|
});
|
|
619
720
|
}
|
|
620
721
|
|
|
722
|
+
// What this binary is, and whether its safety files are the published ones.
|
|
723
|
+
// Dispatched before a session is built, like `gate`/`fingerprint`: it is a
|
|
724
|
+
// question about this install, it must work with no terminal at all (an audit
|
|
725
|
+
// script), and it must not depend on a credential being configured. It is NOT
|
|
726
|
+
// part of the startup path — the runtime self-check that warns on stderr is in
|
|
727
|
+
// src/provenance.js and runs below, for sessions.
|
|
728
|
+
//
|
|
729
|
+
// The interlock below runs first and can make `provenance` unavailable, which
|
|
730
|
+
// is not an oversight: a build that fails the silent gate does not get to
|
|
731
|
+
// report on itself.
|
|
732
|
+
if (opts.command === 'provenance' && !interlockFired) {
|
|
733
|
+
return runProvenance({ json: opts.json });
|
|
734
|
+
}
|
|
735
|
+
|
|
621
736
|
const { createApp } = require('../src/app.js');
|
|
622
737
|
|
|
738
|
+
// ── provenance self-check (one stderr line, never fatal) ─────────────────
|
|
739
|
+
//
|
|
740
|
+
// A build whose gate, permission evaluator, approval classes or runner were
|
|
741
|
+
// edited announces it, once, before the session starts — instead of importing
|
|
742
|
+
// the neutered file and saying nothing. Never throws and never blocks: a
|
|
743
|
+
// diagnostic that can stop the program it reports on is worse than none (see
|
|
744
|
+
// src/provenance.js, which also records why a MISSING manifest is a failure
|
|
745
|
+
// rather than a pass). A development tree silences it with
|
|
746
|
+
// AEGIS_NO_PROVENANCE_CHECK=1 — and the silence is printed at the time, so it
|
|
747
|
+
// is a fact on the record rather than a quiet default.
|
|
748
|
+
//
|
|
749
|
+
// Skipped when the interlock has already fired: that path emits exactly one
|
|
750
|
+
// bland line, and following it with a more descriptive one would hand back
|
|
751
|
+
// everything the bland line withheld.
|
|
752
|
+
if (!interlockFired) try {
|
|
753
|
+
const provenance = require('../src/provenance.js');
|
|
754
|
+
const line = provenance.warning(provenance.selfCheck());
|
|
755
|
+
if (line) process.stderr.write(line);
|
|
756
|
+
} catch {
|
|
757
|
+
/* a diagnostic must never be the reason a session fails to start */
|
|
758
|
+
}
|
|
759
|
+
|
|
623
760
|
// ── presence beacon (aegis1 /api/v1/heartbeat) ───────────────────────────
|
|
624
761
|
//
|
|
625
762
|
// "Who is running aegiscode right now" — the admin panel's presence card.
|
package/vendor/cli/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aegiscode",
|
|
3
3
|
"productName": "AEGIS Code",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "7.0.1",
|
|
5
5
|
"description": "aegiscode — the command-line version of AEGIS Desktop. 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",
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
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.
|
|
2
7
|
/**
|
|
3
8
|
* Syntax-check every file `node --check` should gate on, and report all of
|
|
4
9
|
* them. Replaces the POSIX loop
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
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.
|
|
2
7
|
/**
|
|
3
8
|
* Renders a canned session to stdout — banner, a prompt, a streamed answer with
|
|
4
9
|
* markdown, the accounting line, and the status bar.
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
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.
|
|
2
7
|
/**
|
|
3
8
|
* Pre-publish staging for the `aegiscode` package — a THIN WRAPPER.
|
|
4
9
|
*
|
|
@@ -6,7 +11,8 @@
|
|
|
6
11
|
* `one/scripts/predist.mjs` in AEGISONE's phase ON2 (plan D6): one manifest,
|
|
7
12
|
* two shapes. This file used to hold its own list of forty repo-relative
|
|
8
13
|
* modules, kept in sync with `desktop/scripts/predist.mjs` by discipline alone.
|
|
9
|
-
* It now holds no list at all
|
|
14
|
+
* It now holds no list at all, and its length is a test
|
|
15
|
+
* (`test/one-vendor.test.mjs`: wrappers stay under eighty lines).
|
|
10
16
|
*
|
|
11
17
|
* Everything the CLI needs is unchanged as seen from outside: `npm run predist`,
|
|
12
18
|
* `prepublishOnly`, `precheck` and `pretest` still run this file, it still
|
|
@@ -14,6 +20,11 @@
|
|
|
14
20
|
* same proof lines (the staged registry loads standalone, the editor layer
|
|
15
21
|
* resolves the STAGED server, the staged gate module loads).
|
|
16
22
|
*
|
|
23
|
+
* It also REFUSES to stage from a tree whose safety files are not the sealed
|
|
24
|
+
* ones — the publish gate, which lives beside this file (`./seal-gate.mjs`)
|
|
25
|
+
* because a gate is not a manifest and this file has a line budget. That is the
|
|
26
|
+
* one moment the question can be asked from outside the artifact.
|
|
27
|
+
*
|
|
17
28
|
* If the shared stager is not reachable the file is missing — this directory is
|
|
18
29
|
* inside the published tarball, where `one/` is not shipped, and running predist
|
|
19
30
|
* there is meaningless anyway (the vendor tree it would build is already in the
|
|
@@ -21,11 +32,27 @@
|
|
|
21
32
|
*/
|
|
22
33
|
import path from 'node:path';
|
|
23
34
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
35
|
+
import { sealGate } from './seal-gate.mjs';
|
|
24
36
|
|
|
25
37
|
const HERE = path.dirname(fileURLToPath(import.meta.url));
|
|
26
38
|
const SHARED = path.join(HERE, '..', '..', 'one', 'scripts', 'predist.mjs');
|
|
27
39
|
|
|
28
40
|
async function main() {
|
|
41
|
+
const gate = sealGate();
|
|
42
|
+
if (!gate.ok && !process.env.AEGIS_ALLOW_UNSEALED) {
|
|
43
|
+
process.stderr.write(
|
|
44
|
+
`${gate.line}\n` +
|
|
45
|
+
`cut: refusing to stage a package from it. Reseal the tree deliberately, or set ` +
|
|
46
|
+
`AEGIS_ALLOW_UNSEALED=1 to stage a build that is known not to be the published one.\n`
|
|
47
|
+
);
|
|
48
|
+
return 1;
|
|
49
|
+
}
|
|
50
|
+
process.stderr.write(
|
|
51
|
+
gate.ok
|
|
52
|
+
? `${gate.line}\n`
|
|
53
|
+
: `${gate.line}\ncut: AEGIS_ALLOW_UNSEALED is set — staging anyway; this artifact will ` +
|
|
54
|
+
`not match the published manifest.\n`
|
|
55
|
+
);
|
|
29
56
|
let shared;
|
|
30
57
|
try {
|
|
31
58
|
shared = await import(pathToFileURL(SHARED).href);
|
|
@@ -45,4 +72,4 @@ if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.me
|
|
|
45
72
|
process.exitCode = await main();
|
|
46
73
|
}
|
|
47
74
|
|
|
48
|
-
export { main };
|
|
75
|
+
export { main, sealGate };
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
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.
|
|
2
7
|
/**
|
|
3
8
|
* Run every `test/cli-*.test.mjs` and report all of them.
|
|
4
9
|
*
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
|
|
3
|
+
// AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
|
|
4
|
+
// Conveying a modified copy, or running one as a network service, owes the
|
|
5
|
+
// corresponding source under this licence (§5/§13) — see LICENSING.md.
|
|
6
|
+
/**
|
|
7
|
+
* The publish gate — the half of the provenance story that is a control rather
|
|
8
|
+
* than a deterrent.
|
|
9
|
+
*
|
|
10
|
+
* `cli/src/limits.js` and `cli/src/provenance.js` live INSIDE the package they
|
|
11
|
+
* guard, so whoever edits the safety files can also delete the lines that would
|
|
12
|
+
* have noticed. That is not fixable from within the package, and pretending
|
|
13
|
+
* otherwise is the mistake both gates already refuse to make in their own
|
|
14
|
+
* headers. Staging a tarball is the one moment the question can be asked from
|
|
15
|
+
* OUTSIDE the artifact — on the maintainer's machine, before the bytes are
|
|
16
|
+
* copied — which makes this the only point at which a modified tree is STOPPED
|
|
17
|
+
* instead of merely reported on.
|
|
18
|
+
*
|
|
19
|
+
* Both gates are asked, and separately on purpose: the interlock's set covers
|
|
20
|
+
* `src/limits.js` itself while the manifest does not, and the manifest covers
|
|
21
|
+
* the entry point while the interlock lists a different set. A tree has to
|
|
22
|
+
* satisfy both to be staged.
|
|
23
|
+
*
|
|
24
|
+
* It lives in its own file rather than inline in `predist.mjs` because that
|
|
25
|
+
* file is a THIN WRAPPER by contract — `test/one-vendor.test.mjs` fails it
|
|
26
|
+
* above eighty lines, and the manifest it used to hold is exactly the
|
|
27
|
+
* duplication that rule exists to prevent. A gate is not a manifest, but the
|
|
28
|
+
* rule is a line count, and the honest way to satisfy it is to move the gate
|
|
29
|
+
* out rather than to raise the limit for it.
|
|
30
|
+
*
|
|
31
|
+
* Importing this file stages nothing.
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
import path from 'node:path';
|
|
35
|
+
import { createRequire } from 'node:module';
|
|
36
|
+
import { fileURLToPath } from 'node:url';
|
|
37
|
+
|
|
38
|
+
const HERE = path.dirname(fileURLToPath(import.meta.url));
|
|
39
|
+
const CLI_ROOT = path.join(HERE, '..');
|
|
40
|
+
const require = createRequire(import.meta.url);
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Ask both gates about the tree that is about to be staged.
|
|
44
|
+
*
|
|
45
|
+
* @returns {{ ok: boolean, line: string }} `line` is what the maintainer reads;
|
|
46
|
+
* it may name files, because a maintainer is who it is talking to. The RUNTIME
|
|
47
|
+
* reports are the ones that must not (see cli/src/provenance.js).
|
|
48
|
+
*/
|
|
49
|
+
function sealGate() {
|
|
50
|
+
let limits;
|
|
51
|
+
let provenance;
|
|
52
|
+
try {
|
|
53
|
+
limits = require(path.join(CLI_ROOT, 'src', 'limits.js'));
|
|
54
|
+
provenance = require(path.join(CLI_ROOT, 'src', 'provenance.js'));
|
|
55
|
+
} catch (error) {
|
|
56
|
+
return {
|
|
57
|
+
ok: false,
|
|
58
|
+
line: `cut: the safety modules are unreadable (${(error && error.message) || error}).`,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
const interlock = limits.check();
|
|
62
|
+
if (interlock.tripped) {
|
|
63
|
+
return {
|
|
64
|
+
ok: false,
|
|
65
|
+
line: `cut: the sealed set has moved (${interlock.code}) — this tree is not the published one.`,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
const report = provenance.selfCheck();
|
|
69
|
+
if (!report.ok) return { ok: false, line: `cut: ${report.problems.join('; ')}` };
|
|
70
|
+
return {
|
|
71
|
+
ok: true,
|
|
72
|
+
line: `cut: ${report.checked} sealed units verified — this tree is the published one.`,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export { sealGate };
|
package/vendor/cli/src/agents.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
|
|
3
|
+
// AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
|
|
4
|
+
// Conveying a modified copy, or running one as a network service, owes the
|
|
5
|
+
// corresponding source under this licence (§5/§13) — see LICENSING.md.
|
|
1
6
|
'use strict';
|
|
2
7
|
|
|
3
8
|
/**
|