@lamalibre/create-lamaste 4.3.0 → 4.3.1
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/package.json +2 -2
- package/scripts/bundle-vendor.js +13 -8
- package/src/index.js +4 -0
- package/src/lib/panel-pin.js +41 -0
- package/vendor/docs/00-introduction/how-it-works.md +2 -2
- package/vendor/docs/00-introduction/quickstart.md +5 -5
- package/vendor/docs/00-introduction/what-is-lamaste.md +5 -5
- package/vendor/docs/01-concepts/certificates.md +3 -3
- package/vendor/docs/01-concepts/mtls.md +2 -2
- package/vendor/docs/01-concepts/security-model.md +13 -2
- package/vendor/docs/01-concepts/tickets.md +2 -2
- package/vendor/docs/01-concepts/tunneling.md +4 -4
- package/vendor/docs/02-guides/agent-setup.md +5 -5
- package/vendor/docs/02-guides/certificate-management.md +2 -2
- package/vendor/docs/02-guides/cloud-provisioning.md +4 -4
- package/vendor/docs/02-guides/desktop-app-setup.md +11 -10
- package/vendor/docs/02-guides/installation.md +3 -3
- package/vendor/docs/02-guides/onboarding.md +2 -2
- package/vendor/docs/02-guides/standalone-plugin-with-tickets.md +2 -2
- package/vendor/docs/03-architecture/installer-flow.md +2 -2
- package/vendor/docs/03-architecture/installer.md +4 -4
- package/vendor/docs/03-architecture/management-flow.md +1 -1
- package/vendor/docs/03-architecture/overview.md +5 -5
- package/vendor/docs/03-architecture/panel-client.md +6 -6
- package/vendor/docs/03-architecture/panel-server.md +2 -2
- package/vendor/docs/03-architecture/state-management.md +2 -2
- package/vendor/docs/03-architecture/system-overview.md +1 -1
- package/vendor/docs/04-api-reference/agent-hosted-plugins.md +2 -2
- package/vendor/docs/04-api-reference/app-host.md +3 -3
- package/vendor/docs/04-api-reference/lifecycle-hooks.md +4 -4
- package/vendor/docs/04-api-reference/onboarding.md +1 -1
- package/vendor/docs/04-api-reference/registry-and-oidc.md +1 -1
- package/vendor/docs/05-operations/backup-and-restore.md +3 -1
- package/vendor/docs/05-operations/uninstalling.md +1 -1
- package/vendor/docs/05-operations/upgrades.md +5 -5
- package/vendor/docs/06-reference/config-files.md +6 -1
- package/vendor/docs/06-reference/glossary.md +3 -3
- package/vendor/docs/06-reference/installer-flags.md +13 -13
- package/vendor/docs/06-reference/ports-and-services.md +1 -1
- package/vendor/docs/06-reference/troubleshooting.md +8 -8
- package/vendor/docs/gatekeeper-design.md +8 -8
- package/vendor/docs/identity-directory-design.md +2 -2
- package/vendor/docs/package.json +1 -1
- package/vendor/docs/todo/lib-cli-desktop-refactor.md +27 -27
- package/vendor/gatekeeper/dist/cli/index.js +0 -0
- package/vendor/gatekeeper/package.json +2 -2
- package/vendor/server/bin/lamaste-server.js +7 -0
- package/vendor/server/package.json +2 -2
- package/vendor/server/src/commands/panel-pin.js +40 -0
- package/vendor/server/src/panel-api.js +247 -32
- package/vendor/server/src/panel-identity.js +165 -0
- package/vendor/server-ui/dist/assets/index-BTlBt_cD.js +84 -0
- package/vendor/server-ui/dist/index.html +1 -1
- package/vendor/serverd/package.json +2 -2
- package/vendor/server-ui/dist/assets/index-DBp3cmaU.js +0 -84
|
@@ -217,7 +217,7 @@ The agent's sync timer applies tunnel changes within about 30 seconds. If that d
|
|
|
217
217
|
lamaste-agent update # apply now and (re)install the sync timer
|
|
218
218
|
```
|
|
219
219
|
|
|
220
|
-
`update` needs the agent installed globally (`npm install -g @lamalibre/lamaste-agent@4.3.
|
|
220
|
+
`update` needs the agent installed globally (`npm install -g @lamalibre/lamaste-agent@4.3.1`); an agent originally set up with `npx` must be installed first.
|
|
221
221
|
|
|
222
222
|
**Cause 3: The agent does not carry the tunnel.**
|
|
223
223
|
|
|
@@ -320,7 +320,7 @@ ls -la /usr/local/bin/authelia
|
|
|
320
320
|
| Missing `panel.json` | `Config file not found` | Re-run installer or create the file manually |
|
|
321
321
|
| Invalid JSON in `panel.json` | `contains invalid JSON` | Fix the JSON syntax |
|
|
322
322
|
| Port 3100 in use | `EADDRINUSE` | Find and stop the conflicting process: `sudo ss -tlnp sport = :3100` |
|
|
323
|
-
| Missing Node.js modules | `Cannot find module` | Re-run the installer (`npx @lamalibre/create-lamaste@4.3.
|
|
323
|
+
| Missing Node.js modules | `Cannot find module` | Re-run the installer (`npx @lamalibre/create-lamaste@4.3.1 --yes`); `/opt/lamalibre/lamaste` is root-owned and redeployed as a whole |
|
|
324
324
|
| Permission denied writing state | `EACCES` under `/etc/lamalibre/lamaste` | Re-run the installer; the redeploy re-applies the ownership of the config and PKI directories |
|
|
325
325
|
|
|
326
326
|
### chisel fails to start
|
|
@@ -329,7 +329,7 @@ ls -la /usr/local/bin/authelia
|
|
|
329
329
|
|
|
330
330
|
| Cause | Log Message | Fix |
|
|
331
331
|
| -------------------------- | ------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
332
|
-
| Binary missing | `exec format error` or `not found` | Re-run the installer (`npx @lamalibre/create-lamaste@4.3.
|
|
332
|
+
| Binary missing | `exec format error` or `not found` | Re-run the installer (`npx @lamalibre/create-lamaste@4.3.1 --yes`) — it installs the pinned, checksum-verified release for the server's architecture; the panel cannot install binaries |
|
|
333
333
|
| Not the pinned release | (panel log) `The installed chisel is not the pinned release — run create-lamaste ...` | Re-run the installer. Until then the panel restarts Chisel on every authfile change |
|
|
334
334
|
| Authfile or key unreadable | `permission denied` on `chisel-users` or `chisel-server.key` | Both must be `0640 lamaste:lamaste-chisel` and the unit `Group=lamaste-chisel`; restart the panel, which re-applies the authfile's. If the group, the unit or the key's ownership is wrong, re-run the installer in redeploy mode |
|
|
335
335
|
| Stopped by the panel | (panel log) `Chisel stopped: ...`; unit disabled, `chisel-failed-closed` present | Reconciliation failed closed; see [Tunnel Client Cannot Connect](#tunnel-client-cannot-connect), Cause 1 |
|
|
@@ -343,7 +343,7 @@ ls -la /usr/local/bin/authelia
|
|
|
343
343
|
| --------------------------- | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
344
344
|
| Invalid `configuration.yml` | `configuration: error` | Check YAML syntax with `authelia validate-configuration --config /etc/authelia/configuration.yml` |
|
|
345
345
|
| Missing `users.yml` | `cannot open file` | Create an initial users file (see [Config Files](config-files.md)) |
|
|
346
|
-
| Binary missing | `not found` | Re-run the installer (`npx @lamalibre/create-lamaste@4.3.
|
|
346
|
+
| Binary missing | `not found` | Re-run the installer (`npx @lamalibre/create-lamaste@4.3.1 --yes`); it installs the pinned release |
|
|
347
347
|
| Wrong permissions | `permission denied` | Authelia runs as `lamaste-authelia`: `/etc/authelia` must be `lamaste:lamaste-authelia 2770`, `configuration.yml` `0640`, `users.yml` `0660`, `db.sqlite3` owned by `lamaste-authelia`. Re-run the installer to re-apply (a root-owned `/etc/authelia` from an older version is converted), or see [Config Files](config-files.md#file-permissions-table) |
|
|
348
348
|
| Database newer than binary | storage schema version error at startup | A newer Authelia ran against this database and was replaced by an older one; the installer never downgrades an installed Authelia, so reinstall that newer release by hand |
|
|
349
349
|
|
|
@@ -516,14 +516,14 @@ sudo systemctl restart authelia
|
|
|
516
516
|
|
|
517
517
|
## Onboarding Fails: "Chisel is not installed" / "Authelia is not installed"
|
|
518
518
|
|
|
519
|
-
**Symptom:** The **Starting Chisel** or **Configuring Authelia** provisioning task fails with "Chisel is not installed. Run `npx @lamalibre/create-lamaste@4.3.
|
|
519
|
+
**Symptom:** The **Starting Chisel** or **Configuring Authelia** provisioning task fails with "Chisel is not installed. Run `npx @lamalibre/create-lamaste@4.3.1` on the server to repair the installation." (or the same for Authelia).
|
|
520
520
|
|
|
521
521
|
**Cause:** Onboarding downloads nothing: the installer installs both binaries (pinned releases), their systemd units and the `lamaste-authelia` account. The binary at `/usr/local/bin/chisel` or `/usr/local/bin/authelia` is missing — the installer was interrupted, or the file was removed.
|
|
522
522
|
|
|
523
523
|
**Fix:** Re-run the installer on the server, then start provisioning again from the wizard:
|
|
524
524
|
|
|
525
525
|
```bash
|
|
526
|
-
npx @lamalibre/create-lamaste@4.3.
|
|
526
|
+
npx @lamalibre/create-lamaste@4.3.1 --yes
|
|
527
527
|
```
|
|
528
528
|
|
|
529
529
|
If provisioning then fails writing Authelia's configuration with `/etc/authelia is not writable by the panel — run create-lamaste to repair the installation`, the directory's ownership is wrong; the same command repairs it.
|
|
@@ -538,7 +538,7 @@ If provisioning then fails writing Authelia's configuration with `/etc/authelia
|
|
|
538
538
|
|
|
539
539
|
**Fix:**
|
|
540
540
|
|
|
541
|
-
1. Re-run the installer so the helper matches the panel: `npx @lamalibre/create-lamaste@4.3.
|
|
541
|
+
1. Re-run the installer so the helper matches the panel: `npx @lamalibre/create-lamaste@4.3.1 --yes`
|
|
542
542
|
2. If it persists on a current install, it is a bug: the vhost generators (`packages/server/daemon/src/lib/nginx.js`) and the allow-list (`packages/provisioners/server/scripts/lamaste-priv`) must change together — `npm test` checks every generated vhost against the allow-list. Do not work around it by editing files in `/etc/nginx` by hand.
|
|
543
543
|
|
|
544
544
|
`sudo: a password is required` for `lamaste-priv` means the helper or the sudoers file is missing or outdated: re-run the installer.
|
|
@@ -621,7 +621,7 @@ df -h /
|
|
|
621
621
|
|
|
622
622
|
**Cause 3: The web root is not writable by the panel (`EACCES`).**
|
|
623
623
|
|
|
624
|
-
The panel writes `/var/www/lamaste` itself: it must be `lamaste:www-data`, directories `2750`, files `0640`. An install from before this layout had it owned by `www-data`. Re-run the installer (`npx @lamalibre/create-lamaste@4.3.
|
|
624
|
+
The panel writes `/var/www/lamaste` itself: it must be `lamaste:www-data`, directories `2750`, files `0640`. An install from before this layout had it owned by `www-data`. Re-run the installer (`npx @lamalibre/create-lamaste@4.3.1 --yes`); the redeploy converts the tree.
|
|
625
625
|
|
|
626
626
|
---
|
|
627
627
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
|
|
5
|
-
`@lamalibre/lamaste-gatekeeper@4.3.
|
|
5
|
+
`@lamalibre/lamaste-gatekeeper@4.3.1` is a standalone authorization package for Lamaste. It manages **groups** and **grants**, enforces tunnel access control via a lightweight Fastify service, and serves user-friendly "request access" pages when access is denied.
|
|
6
6
|
|
|
7
|
-
It follows the same architectural pattern as `@lamalibre/lamaste-tickets@4.3.
|
|
7
|
+
It follows the same architectural pattern as `@lamalibre/lamaste-tickets@4.3.1` — a solid library at the core, with a service, CLI, and desktop as consumers.
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -204,7 +204,7 @@ The grant system is resource-agnostic. It doesn't know what a "tunnel" or "plugi
|
|
|
204
204
|
|
|
205
205
|
```js
|
|
206
206
|
import { createGroup, listGroups, getGroup, updateGroup, deleteGroup,
|
|
207
|
-
addMembers, removeMembers, getGroupsForUser } from '@lamalibre/lamaste-gatekeeper@4.3.
|
|
207
|
+
addMembers, removeMembers, getGroupsForUser } from '@lamalibre/lamaste-gatekeeper@4.3.1';
|
|
208
208
|
|
|
209
209
|
createGroup(name, { description?, createdBy? })
|
|
210
210
|
// → { name, description, members: [], createdAt, createdBy }
|
|
@@ -240,7 +240,7 @@ getGroupsForUser(username)
|
|
|
240
240
|
### Grants
|
|
241
241
|
|
|
242
242
|
```js
|
|
243
|
-
import { createGrant, listGrants, getGrant, revokeGrant } from '@lamalibre/lamaste-gatekeeper@4.3.
|
|
243
|
+
import { createGrant, listGrants, getGrant, revokeGrant } from '@lamalibre/lamaste-gatekeeper@4.3.1';
|
|
244
244
|
|
|
245
245
|
createGrant({ principalType, principalId, resourceType, resourceId, context? })
|
|
246
246
|
// → grant object
|
|
@@ -267,7 +267,7 @@ revokeGrant(grantId)
|
|
|
267
267
|
### Authorization
|
|
268
268
|
|
|
269
269
|
```js
|
|
270
|
-
import { checkAccess } from '@lamalibre/lamaste-gatekeeper@4.3.
|
|
270
|
+
import { checkAccess } from '@lamalibre/lamaste-gatekeeper@4.3.1';
|
|
271
271
|
|
|
272
272
|
checkAccess(username, resourceType, resourceId);
|
|
273
273
|
// 1. Find direct user grants: principalType='user', principalId=username
|
|
@@ -282,7 +282,7 @@ checkAccess(username, resourceType, resourceId);
|
|
|
282
282
|
### Templates
|
|
283
283
|
|
|
284
284
|
```js
|
|
285
|
-
import { getAccessRequestTemplates } from '@lamalibre/lamaste-gatekeeper@4.3.
|
|
285
|
+
import { getAccessRequestTemplates } from '@lamalibre/lamaste-gatekeeper@4.3.1';
|
|
286
286
|
|
|
287
287
|
getAccessRequestTemplates(username, resourceName, { adminContact?, domain? })
|
|
288
288
|
// → {
|
|
@@ -864,14 +864,14 @@ On first startup, gatekeeper checks for legacy files:
|
|
|
864
864
|
|
|
865
865
|
### Panel-Server Refactoring
|
|
866
866
|
|
|
867
|
-
- `lib/user-access.js` → delegates to gatekeeper library (import from `@lamalibre/lamaste-gatekeeper@4.3.
|
|
867
|
+
- `lib/user-access.js` → delegates to gatekeeper library (import from `@lamalibre/lamaste-gatekeeper@4.3.1`)
|
|
868
868
|
- `lib/access-control-sync.js` → removed (gatekeeper handles authorization at nginx layer, no more Authelia config rewriting for per-user access rules)
|
|
869
869
|
- `routes/user-access.js` → simplified, delegates grant CRUD to gatekeeper
|
|
870
870
|
- Tunnel creation/update routes → call gatekeeper for access mode changes
|
|
871
871
|
|
|
872
872
|
### Installer Updates (create-lamaste)
|
|
873
873
|
|
|
874
|
-
- Install `@lamalibre/lamaste-gatekeeper@4.3.
|
|
874
|
+
- Install `@lamalibre/lamaste-gatekeeper@4.3.1` package
|
|
875
875
|
- Create `/etc/lamalibre/lamaste/groups.json` (empty initial state)
|
|
876
876
|
- Create `/etc/lamalibre/lamaste/access-grants.json` (empty or migrated)
|
|
877
877
|
- Create `lamalibre-lamaste-gatekeeper.service` systemd unit
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Lamaste Identity Directory — Design Document
|
|
2
2
|
|
|
3
3
|
> **Status:** design, 2026-10-13. Nothing here is implemented yet.
|
|
4
|
-
> **Package:** `@lamalibre/lamaste-identity@4.3.
|
|
4
|
+
> **Package:** `@lamalibre/lamaste-identity@4.3.1` (completes the existing SDK).
|
|
5
5
|
> **Companions:** `gatekeeper-design.md` (authorization),
|
|
6
6
|
> `plugin-development/design/agent-hosted-app-plugins.md` (app plugins).
|
|
7
7
|
|
|
@@ -178,7 +178,7 @@ and compares it with the local projection (by `userId` and `version`). It
|
|
|
178
178
|
applies differences and logs how many it found — a non-zero count on a
|
|
179
179
|
healthy system is a bug in the change feed and is reported to the panel.
|
|
180
180
|
|
|
181
|
-
## SDK (`@lamalibre/lamaste-identity@4.3.
|
|
181
|
+
## SDK (`@lamalibre/lamaste-identity@4.3.1`)
|
|
182
182
|
|
|
183
183
|
Today's surface stays; three pieces are added.
|
|
184
184
|
|
package/vendor/docs/package.json
CHANGED
|
@@ -29,7 +29,7 @@ feria dev registry — OUT OF SCOPE, do not touch
|
|
|
29
29
|
|
|
30
30
|
### Naming Rules
|
|
31
31
|
|
|
32
|
-
- **`lamaste`** is the core lib. You `import { ... } from '@lamalibre/lamaste@4.3.
|
|
32
|
+
- **`lamaste`** is the core lib. You `import { ... } from '@lamalibre/lamaste@4.3.1'`. No `-lib` suffix.
|
|
33
33
|
- **`-d` suffix** for daemons — Unix convention (`httpd`, `sshd`, `mongod`). Instantly signals "long-running process".
|
|
34
34
|
- **`-ui`** for React component libraries — universal term, avoids "serverd serves the panel" tautology.
|
|
35
35
|
- **`create-*`** for all npx one-shot tools — the one npm convention everyone knows.
|
|
@@ -74,24 +74,24 @@ lamaste core library (types, constants, schemas, pl
|
|
|
74
74
|
|
|
75
75
|
| # | Package (npm name) | Type | Depends on | Purpose |
|
|
76
76
|
| --- | ----------------------------------- | ----------- | ---------- | ------------------------------------------------------------------------------------------------------------------- |
|
|
77
|
-
| 1 | `@lamalibre/lamaste@4.3.
|
|
78
|
-
| | | | | Subpath: `@lamalibre/lamaste@4.3.
|
|
79
|
-
| | | | | Subpath: `@lamalibre/lamaste@4.3.
|
|
80
|
-
| 2 | `@lamalibre/lamaste-agent@4.3.
|
|
81
|
-
| 3 | `@lamalibre/lamaste-agentd@4.3.
|
|
82
|
-
| 4 | `@lamalibre/lamaste-agent-ui@4.3.
|
|
83
|
-
| 5 | `@lamalibre/lamaste-server@4.3.
|
|
84
|
-
| 6 | `@lamalibre/lamaste-serverd@4.3.
|
|
85
|
-
| 7 | `@lamalibre/lamaste-server-ui@4.3.
|
|
86
|
-
| 8 | `@lamalibre/lamaste@4.3.
|
|
87
|
-
| 9 | `@lamalibre/lamaste-cloud@4.3.
|
|
88
|
-
| 10 | `@lamalibre/lamaste-tickets@4.3.
|
|
89
|
-
| 11 | `@lamalibre/lamaste-identity@4.3.
|
|
90
|
-
| 12 | `@lamalibre/create-lamaste@4.3.
|
|
91
|
-
| 13 | `@lamalibre/create-lamaste-agent@4.3.
|
|
92
|
-
| 14 | `@lamalibre/create-lamaste-desktop@4.3.
|
|
93
|
-
| 15 | `@lamalibre/create-lamaste-admin@4.3.
|
|
94
|
-
| 16 | `@lamalibre/create-lamaste-e2e@4.3.
|
|
77
|
+
| 1 | `@lamalibre/lamaste@4.3.1` | core lib | nothing | Types, constants, Zod schemas, plugin host Fastify plugin, atomic file helpers, client interfaces |
|
|
78
|
+
| | | | | Subpath: `@lamalibre/lamaste@4.3.1/agent` — agent domain logic |
|
|
79
|
+
| | | | | Subpath: `@lamalibre/lamaste@4.3.1/server` — server domain logic |
|
|
80
|
+
| 2 | `@lamalibre/lamaste-agent@4.3.1` | CLI | `lamaste` | Thin agent CLI. No Fastify, no HTTP |
|
|
81
|
+
| 3 | `@lamalibre/lamaste-agentd@4.3.1` | daemon | `lamaste` | Agent REST API on :9393. No CLI argument parsing |
|
|
82
|
+
| 4 | `@lamalibre/lamaste-agent-ui@4.3.1` | UI lib | `lamaste` | Agent React components + browser SPA build. Used by desktop and agentd |
|
|
83
|
+
| 5 | `@lamalibre/lamaste-server@4.3.1` | CLI | `lamaste` | **NEW.** Thin server CLI. No Fastify, no HTTP |
|
|
84
|
+
| 6 | `@lamalibre/lamaste-serverd@4.3.1` | daemon | `lamaste` | Server REST API on :3100. No CLI argument parsing. Renamed from `serverd` |
|
|
85
|
+
| 7 | `@lamalibre/lamaste-server-ui@4.3.1` | UI lib | `lamaste` | Server/admin React components + browser SPA build. Replaces both `panel-client` and `lamaste-admin-panel` |
|
|
86
|
+
| 8 | `@lamalibre/lamaste@4.3.1-desktop` | desktop | `lamaste` | Unified Tauri app. Multi-target: full, agent-only, server-only. Credentials, tray, deep links |
|
|
87
|
+
| 9 | `@lamalibre/lamaste-cloud@4.3.1` | lib + CLI | — | Cloud provider abstraction (already correct pattern) |
|
|
88
|
+
| 10 | `@lamalibre/lamaste-tickets@4.3.1` | SDK | — | Agent-to-agent authorization |
|
|
89
|
+
| 11 | `@lamalibre/lamaste-identity@4.3.1` | SDK | — | Authelia identity parsing and query |
|
|
90
|
+
| 12 | `@lamalibre/create-lamaste@4.3.1` | provisioner | `lamaste` | Server provisioner: OS hardening, nginx, Authelia, certs. `npx create-lamaste` |
|
|
91
|
+
| 13 | `@lamalibre/create-lamaste-agent@4.3.1` | provisioner | `lamaste` | Agent provisioner: cert enrollment, service setup. `npx create-lamaste-agent`. Renamed from `install-lamaste-agent` |
|
|
92
|
+
| 14 | `@lamalibre/create-lamaste-desktop@4.3.1` | installer | — | Desktop app installer. `npx create-lamaste-desktop`. Renamed from `install-lamaste-desktop` |
|
|
93
|
+
| 15 | `@lamalibre/create-lamaste-admin@4.3.1` | provisioner | `lamaste` | Admin cert upgrade to hardware-bound. `npx create-lamaste-admin`. Renamed from `install-lamaste-admin` |
|
|
94
|
+
| 16 | `@lamalibre/create-lamaste-e2e@4.3.1` | test infra | — | E2E test MCP server. `npx create-lamaste-e2e`. Renamed from `install-lamaste-e2e-mcp` |
|
|
95
95
|
| 17 | `@lamalibre/feria` | dev tool | — | Dev registry + release runner. **Out of scope — do not touch in this refactor** |
|
|
96
96
|
|
|
97
97
|
### Rename Map (1.x → 2.0.0)
|
|
@@ -116,7 +116,7 @@ The core library uses **subpath exports** to provide domain-specific entry point
|
|
|
116
116
|
|
|
117
117
|
```json
|
|
118
118
|
{
|
|
119
|
-
"name": "@lamalibre/lamaste@4.3.
|
|
119
|
+
"name": "@lamalibre/lamaste@4.3.1",
|
|
120
120
|
"exports": {
|
|
121
121
|
".": "./dist/index.js",
|
|
122
122
|
"./agent": "./dist/agent/index.js",
|
|
@@ -126,9 +126,9 @@ The core library uses **subpath exports** to provide domain-specific entry point
|
|
|
126
126
|
```
|
|
127
127
|
|
|
128
128
|
```typescript
|
|
129
|
-
import { RESERVED_API_PREFIXES, pluginManifestSchema } from '@lamalibre/lamaste@4.3.
|
|
130
|
-
import { loadRegistry, loadAgent, isAgentLoaded } from '@lamalibre/lamaste@4.3.
|
|
131
|
-
import { createTunnel, rotateCert } from '@lamalibre/lamaste@4.3.
|
|
129
|
+
import { RESERVED_API_PREFIXES, pluginManifestSchema } from '@lamalibre/lamaste@4.3.1';
|
|
130
|
+
import { loadRegistry, loadAgent, isAgentLoaded } from '@lamalibre/lamaste@4.3.1/agent';
|
|
131
|
+
import { createTunnel, rotateCert } from '@lamalibre/lamaste@4.3.1/server';
|
|
132
132
|
```
|
|
133
133
|
|
|
134
134
|
**Why subpath exports instead of three packages (`lamaste-lib`, `lamaste-lib-agent`, `lamaste-lib-server`):**
|
|
@@ -149,7 +149,7 @@ import { createTunnel, rotateCert } from '@lamalibre/lamaste@4.3.0/server';
|
|
|
149
149
|
|
|
150
150
|
| Layer | Agent side | Server side |
|
|
151
151
|
| ------------------------ | ----------------------------------------------- | ---------------------------------------------- |
|
|
152
|
-
| **Domain logic** | `@lamalibre/lamaste@4.3.
|
|
152
|
+
| **Domain logic** | `@lamalibre/lamaste@4.3.1/agent` | `@lamalibre/lamaste@4.3.1/server` |
|
|
153
153
|
| **Operational CLI** | `lamaste-agent` | `lamaste-server` (new) |
|
|
154
154
|
| **Long-running daemon** | `lamalibre-lamaste-agentd` on :9393 (extracted) | `lamalibre-lamaste-serverd` on :3100 (renamed) |
|
|
155
155
|
| **UI components** | `lamaste-agent-ui` (renamed) | `lamaste-server-ui` (merged) |
|
|
@@ -471,7 +471,7 @@ The Rust backend has both `commands.rs` (legacy) and `agents.rs` (multi-agent).
|
|
|
471
471
|
|
|
472
472
|
Create `packages/lamaste/` (TypeScript) with subpath exports:
|
|
473
473
|
|
|
474
|
-
**Root (`@lamalibre/lamaste@4.3.
|
|
474
|
+
**Root (`@lamalibre/lamaste@4.3.1`):**
|
|
475
475
|
|
|
476
476
|
- Types: `AdminClient`, `AgentClient` TypeScript interfaces, plugin manifest types, capability types
|
|
477
477
|
- Constants: Reserved API prefixes, curated plugin list, capability names
|
|
@@ -479,7 +479,7 @@ Create `packages/lamaste/` (TypeScript) with subpath exports:
|
|
|
479
479
|
- Plugin Host: Fastify plugin for plugin route mounting, bundle serving, disabled handler (unified from three routers)
|
|
480
480
|
- File Helpers: Atomic write (temp → fsync → rename), promise-chain mutex
|
|
481
481
|
|
|
482
|
-
**Agent subpath (`@lamalibre/lamaste@4.3.
|
|
482
|
+
**Agent subpath (`@lamalibre/lamaste@4.3.1/agent`):**
|
|
483
483
|
|
|
484
484
|
- Platform: Path helpers, platform detection (from `platform.js`)
|
|
485
485
|
- Registry: Agent registry CRUD, label validation, legacy migration (from `registry.js`)
|
|
@@ -491,7 +491,7 @@ Create `packages/lamaste/` (TypeScript) with subpath exports:
|
|
|
491
491
|
- Server Registry: servers.json and storage-servers.json CRUD (new — from Rust `cloud.rs`)
|
|
492
492
|
- Mode: Server mode and admin cert file operations (new — from Rust `mode.rs`)
|
|
493
493
|
|
|
494
|
-
**Server subpath (`@lamalibre/lamaste@4.3.
|
|
494
|
+
**Server subpath (`@lamalibre/lamaste@4.3.1/server`):**
|
|
495
495
|
|
|
496
496
|
- Plugins: Server-side plugin lifecycle (uses shared schema from root)
|
|
497
497
|
- Tunnels: Tunnel creation workflow with rollback (from `routes/tunnels.js`)
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lamalibre/lamaste-gatekeeper",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.1",
|
|
4
4
|
"description": "Authorization layer for Lamaste — groups, grants, and tunnel access control",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@fastify/rate-limit": "^10.3.0",
|
|
35
|
-
"@lamalibre/lamaste": "^4.3.
|
|
35
|
+
"@lamalibre/lamaste": "^4.3.1",
|
|
36
36
|
"fastify": "^5.3.3",
|
|
37
37
|
"undici": "^7.8.0",
|
|
38
38
|
"zod": "^3.24.4"
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
* sites Manage static sites
|
|
20
20
|
* certs Certificate status and renewal
|
|
21
21
|
* reset-admin Emergency admin authentication reset
|
|
22
|
+
* panel-pin The public-key pin of the panel's IP listener
|
|
22
23
|
* uninstall Full server teardown
|
|
23
24
|
*/
|
|
24
25
|
|
|
@@ -66,6 +67,7 @@ ${b('COMMANDS')}
|
|
|
66
67
|
${c('sites')} Manage static sites (list, create, delete)
|
|
67
68
|
${c('certs')} Certificate status, renewal, and agent cert listing
|
|
68
69
|
${c('reset-admin')} Emergency admin reset (reverts to P12, clears 2FA)
|
|
70
|
+
${c('panel-pin')} The panel's TLS key pin, to compare with what agents and the desktop pinned
|
|
69
71
|
${c('chisel')} Manage chisel tunnel-server credentials (rotate-credential)
|
|
70
72
|
${c('registry-credential')} Registry (Feria) service credential used to broker agent install tokens
|
|
71
73
|
${c('uninstall')} Full server teardown (requires confirmation)
|
|
@@ -195,6 +197,11 @@ async function main() {
|
|
|
195
197
|
await runResetAdmin({ json, passwordFile });
|
|
196
198
|
break;
|
|
197
199
|
}
|
|
200
|
+
case 'panel-pin': {
|
|
201
|
+
const { runPanelPin } = await import('../src/commands/panel-pin.js');
|
|
202
|
+
await runPanelPin({ json });
|
|
203
|
+
break;
|
|
204
|
+
}
|
|
198
205
|
case 'registry-credential': {
|
|
199
206
|
const { runRegistryCredential } = await import('../src/commands/registry-credential.js');
|
|
200
207
|
await runRegistryCredential(args.slice(1), { json });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lamalibre/lamaste-server",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.1",
|
|
4
4
|
"description": "Server operations CLI for Lamaste",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"test": "node --test test/*.test.js"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@lamalibre/lamaste": "^4.3.
|
|
20
|
+
"@lamalibre/lamaste": "^4.3.1",
|
|
21
21
|
"chalk": "^5.3.0",
|
|
22
22
|
"execa": "^9.0.0"
|
|
23
23
|
},
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* lamaste-server panel-pin — the public-key pin of the panel's IP listener.
|
|
3
|
+
*
|
|
4
|
+
* The panel's IP address (`https://<ip>:9292`) is served with a self-signed
|
|
5
|
+
* certificate, so the clients that reach it there pin its public key the
|
|
6
|
+
* first time they connect: `lamaste-agent setup` (and `panel reset-pin`),
|
|
7
|
+
* and the desktop app, which shows the pin with the server. This prints the
|
|
8
|
+
* pin from the certificate itself, read on the relay — compare the two to
|
|
9
|
+
* know a client pinned the panel and not something in between.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import chalk from 'chalk';
|
|
13
|
+
import { emit } from '../ndjson.js';
|
|
14
|
+
import { readPanelIdentity } from '../panel-identity.js';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @param {{ json: boolean }} options
|
|
18
|
+
*/
|
|
19
|
+
export async function runPanelPin({ json }) {
|
|
20
|
+
const identity = await readPanelIdentity();
|
|
21
|
+
const pin = `sha256//${identity.pin}`;
|
|
22
|
+
if (json) {
|
|
23
|
+
emit({
|
|
24
|
+
pin,
|
|
25
|
+
address: identity.address,
|
|
26
|
+
port: identity.port,
|
|
27
|
+
certificate: identity.certPath,
|
|
28
|
+
});
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
console.log(
|
|
32
|
+
`${chalk.bold('Panel:')} https://${identity.address}:${identity.port} ${chalk.dim(`(${identity.certPath})`)}`,
|
|
33
|
+
);
|
|
34
|
+
console.log(`${chalk.bold('Key pin:')} ${chalk.cyan(pin)}`);
|
|
35
|
+
console.log(
|
|
36
|
+
chalk.dim(
|
|
37
|
+
'Agents and the desktop app pin this key the first time they connect; the pin they show must be this one.',
|
|
38
|
+
),
|
|
39
|
+
);
|
|
40
|
+
}
|