@amalgm/core 0.5.1-preview.37556608028 → 0.5.1-preview.44182200738
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/PURPOSE.md +17 -7
- package/README.md +2 -2
- package/dist/identity/authorization/policy.d.ts +2 -0
- package/dist/identity/authorization/policy.d.ts.map +1 -1
- package/dist/identity/authorization/policy.js +7 -0
- package/dist/identity/authorization/policy.js.map +1 -1
- package/dist/identity/index.d.ts +0 -1
- package/dist/identity/index.d.ts.map +1 -1
- package/dist/identity/index.js +0 -1
- package/dist/identity/index.js.map +1 -1
- package/dist/identity/layout.d.ts +133 -171
- package/dist/identity/layout.d.ts.map +1 -1
- package/dist/identity/layout.js +191 -220
- package/dist/identity/layout.js.map +1 -1
- package/dist/identity/local/api.d.ts.map +1 -1
- package/dist/identity/local/api.js +0 -11
- package/dist/identity/local/api.js.map +1 -1
- package/dist/identity/local/types.d.ts +0 -4
- package/dist/identity/local/types.d.ts.map +1 -1
- package/dist/identity/machine-setup.d.ts +2 -3
- package/dist/identity/machine-setup.d.ts.map +1 -1
- package/dist/identity/machine-setup.js +1 -6
- package/dist/identity/machine-setup.js.map +1 -1
- package/dist/supervision/activity.d.ts +48 -0
- package/dist/supervision/activity.d.ts.map +1 -0
- package/dist/supervision/activity.js +56 -0
- package/dist/supervision/activity.js.map +1 -0
- package/dist/supervision/index.d.ts +4 -3
- package/dist/supervision/index.d.ts.map +1 -1
- package/dist/supervision/index.js +4 -3
- package/dist/supervision/index.js.map +1 -1
- package/dist/supervision/service-registration.d.ts +4 -4
- package/dist/supervision/service-registration.d.ts.map +1 -1
- package/dist/supervision/service-registration.js +2 -2
- package/dist/supervision/update.d.ts +2 -38
- package/dist/supervision/update.d.ts.map +1 -1
- package/dist/supervision/update.js +2 -38
- package/dist/supervision/update.js.map +1 -1
- package/dist/transport/pty/session-manager.d.ts.map +1 -1
- package/dist/transport/pty/session-manager.js +11 -1
- package/dist/transport/pty/session-manager.js.map +1 -1
- package/dist/transport/pty/types.d.ts +2 -0
- package/dist/transport/pty/types.d.ts.map +1 -1
- package/dist/transport/routing.d.ts +1 -1
- package/dist/transport/routing.d.ts.map +1 -1
- package/docs/authorization.md +3 -1
- package/package.json +4 -4
- package/dist/identity/product-state.d.ts +0 -51
- package/dist/identity/product-state.d.ts.map +0 -1
- package/dist/identity/product-state.js +0 -60
- package/dist/identity/product-state.js.map +0 -1
package/dist/identity/layout.js
CHANGED
|
@@ -1,167 +1,195 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* here is a string/record computation. Reading, writing, migrating, and
|
|
7
|
-
* resolving against the real filesystem stay host-side.
|
|
2
|
+
* Where Amalgm keeps things on disk. This file is the ONLY place that knows
|
|
3
|
+
* Amalgm's folder and file names. Shell composes these layouts once and hands
|
|
4
|
+
* each product the folders it owns; products never join an Amalgm path, never
|
|
5
|
+
* default a folder, and never read an env var to find one.
|
|
8
6
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
7
|
+
* ~/.amalgm/ installer home: bin, toolchains, downloads, cache
|
|
8
|
+
* <lane>/ ~/amalgm | ~/amalgm-preview | ~/amalgm-dev/<session>
|
|
9
|
+
* .amalgm-root.json lane manifest
|
|
10
|
+
* .amalgm/ lane computer-only: device, device key, launcher pointer, runtime packages, services
|
|
11
|
+
* users/<email folder>/ one user's home: agents, apps, toolbox, workspaces
|
|
12
|
+
* .amalgm/ that user's computer-only files, flat, one folder per product
|
|
12
13
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* macOS/Linux, where every shipped runtime lives. The grammar (segment
|
|
16
|
-
* names and nesting) is the law; the separator belongs to the host.
|
|
14
|
+
* Pure string functions. Paths are glued with `/`, which every Node file API
|
|
15
|
+
* accepts on every platform.
|
|
17
16
|
*/
|
|
18
|
-
import {
|
|
19
|
-
/**
|
|
20
|
-
|
|
17
|
+
import { runtimeRootSegments } from './runtime-binding.js';
|
|
18
|
+
/** The layout this code reads and writes. An older lane is refused, never migrated. */
|
|
19
|
+
export const LAYOUT_VERSION = 2;
|
|
21
20
|
export const ROOT_MANIFEST_NAME = '.amalgm-root.json';
|
|
22
|
-
/** Stable user identity inside a user folder (layout.js:33). */
|
|
23
21
|
export const USER_MANIFEST_NAME = '.amalgm-user.json';
|
|
24
|
-
/** Root/user manifest schema version (layout.js:34). */
|
|
25
|
-
export const LAYOUT_VERSION = 1;
|
|
26
|
-
/** Basename of the user-home manifest (layout.js:35). The file itself lives
|
|
27
|
-
* at `system/home.json` inside the user dir — the `home-manifest` entry of
|
|
28
|
-
* {@link shippedUserHomeDeclaration}. */
|
|
29
|
-
export const USER_HOME_MANIFEST_NAME = 'home.json';
|
|
30
|
-
/** User-home graph schema version (layout.js:38). Changing the declared
|
|
31
|
-
* exact graph changes the identity contract: a client must never accept a
|
|
32
|
-
* prior graph and silently invent a new managed child. */
|
|
33
|
-
export const USER_HOME_SCHEMA_VERSION = 3;
|
|
34
|
-
/** Root policy file. It is portable user ground and travels with the home
|
|
35
|
-
* whose enrollment policy it declares. */
|
|
36
22
|
export const USER_IGNORE_FILE_NAME = '.amalgmignore';
|
|
37
|
-
/**
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
'agents',
|
|
47
|
-
'apps',
|
|
48
|
-
'automations',
|
|
49
|
-
'toolbox',
|
|
50
|
-
'workspaces',
|
|
51
|
-
'system',
|
|
52
|
-
'browser',
|
|
53
|
-
]);
|
|
54
|
-
/**
|
|
55
|
-
* ONE sanitizer, two engine homes: runtime-identity.js:59-65
|
|
56
|
-
* (`sanitizeScopeSegment`) and layout.js:161-167 (`sanitizeFolderSegment`)
|
|
57
|
-
* carry the deliberately identical charset `[^A-Za-z0-9_.@-] → _`, trimmed
|
|
58
|
-
* of leading/trailing underscores, falling back to `'local'` — kept in
|
|
59
|
-
* lockstep so legacy uuid folders resolve to the exact names they were
|
|
60
|
-
* created with. Ported once; {@link sanitizeFolderSegment} is the same
|
|
61
|
-
* function under its layout-side name.
|
|
62
|
-
*/
|
|
63
|
-
export function sanitizeScopeSegment(value, fallback = 'local') {
|
|
64
|
-
const clean = String(value || '')
|
|
65
|
-
.trim()
|
|
66
|
-
.replace(/[^A-Za-z0-9_.@-]/g, '_')
|
|
67
|
-
.replace(/^_+|_+$/g, '');
|
|
68
|
-
return clean || fallback;
|
|
69
|
-
}
|
|
70
|
-
/** The shared sanitizer under its layout.js name — the same function, not a
|
|
71
|
-
* copy, so the two names can never drift. */
|
|
72
|
-
export const sanitizeFolderSegment = sanitizeScopeSegment;
|
|
73
|
-
/** Folder name for a user identified by email (layout.js:170-172):
|
|
74
|
-
* lowercased, same charset, and — unlike a scope — an empty email yields
|
|
75
|
-
* `''`, never the `'local'` fallback. */
|
|
76
|
-
export function emailFolderName(email) {
|
|
77
|
-
return sanitizeFolderSegment(String(email || '').trim().toLowerCase(), '');
|
|
78
|
-
}
|
|
79
|
-
const USER_HOME_ROOTS = Object.freeze([
|
|
80
|
-
{ key: 'agents', relativePath: 'agents' },
|
|
81
|
-
{ key: 'apps', relativePath: 'apps' },
|
|
82
|
-
{ key: 'automations', relativePath: 'automations' },
|
|
83
|
-
{ key: 'toolbox', relativePath: 'toolbox' },
|
|
84
|
-
{ key: 'workspaces', relativePath: 'workspaces' },
|
|
85
|
-
{ key: 'system', relativePath: 'system' },
|
|
86
|
-
{ key: 'browser', relativePath: 'browser' },
|
|
87
|
-
]);
|
|
88
|
-
// A Toolbox tool is one complete entity: its definition and actions travel
|
|
89
|
-
// in the same file. These names are deliberately stable and human-readable.
|
|
90
|
-
const SYSTEM_TOOL_ARTIFACTS = Object.freeze([
|
|
91
|
-
{ key: 'amalgm-automations', toolId: 'automations', relativePath: 'toolbox/amalgm-automations.json', rootKey: 'toolbox' },
|
|
92
|
-
{ key: 'amalgm-notifications', toolId: 'notifications', relativePath: 'toolbox/amalgm-notifications.json', rootKey: 'toolbox' },
|
|
93
|
-
{ key: 'amalgm-memories', toolId: 'memories', relativePath: 'toolbox/amalgm-memories.json', rootKey: 'toolbox' },
|
|
94
|
-
{ key: 'amalgm-agents', toolId: 'agents', relativePath: 'toolbox/amalgm-agents.json', rootKey: 'toolbox' },
|
|
95
|
-
{ key: 'amalgm-apps', toolId: 'apps', relativePath: 'toolbox/amalgm-apps.json', rootKey: 'toolbox' },
|
|
96
|
-
{ key: 'amalgm-cua', toolId: 'computer-use', relativePath: 'toolbox/amalgm-cua.json', rootKey: 'toolbox' },
|
|
97
|
-
{ key: 'amalgm-browser', toolId: 'browser', relativePath: 'toolbox/amalgm-browser.json', rootKey: 'toolbox' },
|
|
98
|
-
]);
|
|
99
|
-
/**
|
|
100
|
-
* The user-home graph the managed product ships: the seven
|
|
101
|
-
* roots, one `<key>-root` managed node per root, the home manifest at
|
|
102
|
-
* `system/home.json`, `system/defaults`, `system/policy`, and the seven
|
|
103
|
-
* system tool artifacts. These CONTENTS are PRODUCT declarations, not
|
|
104
|
-
* kernel law — the builder ({@link buildUserHomeManifest}) takes any
|
|
105
|
-
* declaration as input. The shipped set lives here only until the products
|
|
106
|
-
* register their own declarations.
|
|
107
|
-
*/
|
|
108
|
-
export const shippedUserHomeDeclaration = Object.freeze({
|
|
109
|
-
roots: USER_HOME_ROOTS,
|
|
110
|
-
systemToolArtifacts: SYSTEM_TOOL_ARTIFACTS,
|
|
111
|
-
exactManaged: Object.freeze([
|
|
112
|
-
...USER_HOME_ROOTS.map(({ key, relativePath }) => ({
|
|
113
|
-
key: `${key}-root`, relativePath, rootKey: key,
|
|
114
|
-
})),
|
|
115
|
-
{ key: 'home-manifest', relativePath: 'system/home.json', rootKey: 'system' },
|
|
116
|
-
{ key: 'defaults', relativePath: 'system/defaults', rootKey: 'system' },
|
|
117
|
-
{ key: 'policy', relativePath: 'system/policy', rootKey: 'system' },
|
|
118
|
-
...SYSTEM_TOOL_ARTIFACTS,
|
|
119
|
-
]),
|
|
23
|
+
/** Computer-only folder: `~/.amalgm`, `<lane>/.amalgm` and `<user>/.amalgm`. Never synced. */
|
|
24
|
+
export const LOCAL_DIR_NAME = '.amalgm';
|
|
25
|
+
/** Computer-only folder inside one agent, app or tool. Never synced. */
|
|
26
|
+
export const PRIVATE_DIR_NAME = '.private';
|
|
27
|
+
/** The three kinds of entity that live as one folder each in a user's home. */
|
|
28
|
+
export const ENTITY_KINDS = Object.freeze({
|
|
29
|
+
agent: Object.freeze({ root: 'agents', identityFile: '.amalgm-agent.json' }),
|
|
30
|
+
app: Object.freeze({ root: 'apps', identityFile: '.amalgm-app.json' }),
|
|
31
|
+
tool: Object.freeze({ root: 'toolbox', identityFile: '.amalgm-tool.json' }),
|
|
120
32
|
});
|
|
121
|
-
/**
|
|
122
|
-
*
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
33
|
+
/** The folders of a user's home. Nothing else sits at the top level except
|
|
34
|
+
* the manifest, the ignore file, `instructions.md` and `.amalgm/`. */
|
|
35
|
+
export const USER_ROOTS = Object.freeze(['agents', 'apps', 'toolbox', 'workspaces']);
|
|
36
|
+
const ENTITY_FOLDER_MAX = 40;
|
|
37
|
+
const USER_FOLDER_MAX = 40;
|
|
38
|
+
function join(...segments) {
|
|
39
|
+
return segments.join('/');
|
|
40
|
+
}
|
|
41
|
+
/** `~/.amalgm`: what the installer puts on a computer. Runtime state never lives here. */
|
|
42
|
+
export function installerHome(homeDir) {
|
|
43
|
+
const root = join(homeDir, LOCAL_DIR_NAME);
|
|
130
44
|
return {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
45
|
+
root,
|
|
46
|
+
bin: join(root, 'bin'),
|
|
47
|
+
toolchains: join(root, 'toolchains'),
|
|
48
|
+
downloads: join(root, 'downloads'),
|
|
49
|
+
cache: join(root, 'cache'),
|
|
50
|
+
setupLease: join(root, 'setup.sqlite'),
|
|
137
51
|
};
|
|
138
52
|
}
|
|
139
|
-
/**
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
*/
|
|
147
|
-
export function buildRootManifest(existing, ports) {
|
|
148
|
-
if (existing?.installationId)
|
|
149
|
-
return existing;
|
|
53
|
+
/** The lane root for a binding: `~/amalgm`, `~/amalgm-preview` or `~/amalgm-dev/<session>`. */
|
|
54
|
+
export function laneRoot(homeDir, binding) {
|
|
55
|
+
return join(homeDir, ...runtimeRootSegments(binding));
|
|
56
|
+
}
|
|
57
|
+
/** Everything one lane keeps outside its users. */
|
|
58
|
+
export function laneLayout(root) {
|
|
59
|
+
const dir = join(root, LOCAL_DIR_NAME);
|
|
150
60
|
return {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
61
|
+
root,
|
|
62
|
+
manifest: join(root, ROOT_MANIFEST_NAME),
|
|
63
|
+
dir,
|
|
64
|
+
device: join(dir, 'device.json'),
|
|
65
|
+
/** This installation's device key and its recovery copy. */
|
|
66
|
+
authorization: join(dir, 'authorization'),
|
|
67
|
+
/** The launcher's pointer to the runtime package it starts. */
|
|
68
|
+
current: join(dir, 'current.json'),
|
|
69
|
+
/** Unpacked runtime packages, one folder per package id. */
|
|
70
|
+
rt: join(dir, 'rt'),
|
|
71
|
+
/** One OS service's files and every lease it holds. */
|
|
72
|
+
service: (serviceId) => join(dir, 'service', safeSegment(serviceId, 'service id')),
|
|
73
|
+
users: join(root, 'users'),
|
|
74
|
+
user: (email) => join(root, 'users', userFolderName(email)),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/** A user's folder name: the email, lowercased and made safe for every file
|
|
78
|
+
* system. A name longer than 40 characters is cut and given a stable suffix. */
|
|
79
|
+
export function userFolderName(email) {
|
|
80
|
+
const clean = String(email ?? '').trim().toLowerCase()
|
|
81
|
+
.replace(/[^a-z0-9._@-]/g, '_')
|
|
82
|
+
.replace(/^[._]+|[._]+$/g, '');
|
|
83
|
+
if (!clean)
|
|
84
|
+
throw new Error('A user folder needs the user\'s email.');
|
|
85
|
+
if (clean.length <= USER_FOLDER_MAX)
|
|
86
|
+
return clean;
|
|
87
|
+
const suffix = `-${fnv1aHex(clean)}`;
|
|
88
|
+
return clean.slice(0, USER_FOLDER_MAX - suffix.length) + suffix;
|
|
89
|
+
}
|
|
90
|
+
/** Everything in one user's home, and that user's computer-only files. */
|
|
91
|
+
export function userLayout(root) {
|
|
92
|
+
const dir = join(root, LOCAL_DIR_NAME);
|
|
93
|
+
return {
|
|
94
|
+
root,
|
|
95
|
+
manifest: join(root, USER_MANIFEST_NAME),
|
|
96
|
+
ignoreFile: join(root, USER_IGNORE_FILE_NAME),
|
|
97
|
+
/** The user's instructions for every agent. */
|
|
98
|
+
instructions: join(root, 'instructions.md'),
|
|
99
|
+
agents: join(root, 'agents'),
|
|
100
|
+
apps: join(root, 'apps'),
|
|
101
|
+
toolbox: join(root, 'toolbox'),
|
|
102
|
+
workspaces: join(root, 'workspaces'),
|
|
103
|
+
computer: {
|
|
104
|
+
dir,
|
|
105
|
+
record: join(dir, 'computer.json'),
|
|
106
|
+
auth: join(dir, 'auth.json'),
|
|
107
|
+
installation: join(dir, 'installation.json'),
|
|
108
|
+
status: join(dir, 'status.json'),
|
|
109
|
+
sync: join(dir, 'sync.json'),
|
|
110
|
+
/** The one credential vault. Products ask Shell; they never open it. */
|
|
111
|
+
credentials: join(dir, 'credentials.json'),
|
|
112
|
+
runtime: join(dir, 'runtime.json'),
|
|
113
|
+
runtimeToken: join(dir, 'runtime-token.json'),
|
|
114
|
+
workspaces: join(dir, 'workspaces.json'),
|
|
115
|
+
stateEvents: join(dir, 'state-events.jsonl'),
|
|
116
|
+
logs: join(dir, 'logs'),
|
|
117
|
+
parked: join(dir, 'parked'),
|
|
118
|
+
chat: join(dir, 'chat'),
|
|
119
|
+
apps: join(dir, 'apps'),
|
|
120
|
+
tools: join(dir, 'tools'),
|
|
121
|
+
browser: join(dir, 'browser'),
|
|
122
|
+
live: join(dir, 'live'),
|
|
123
|
+
},
|
|
155
124
|
};
|
|
156
125
|
}
|
|
126
|
+
/** One agent, app or tool folder inside the root its kind lives in. */
|
|
127
|
+
export function entityLayout(kind, root, folderName) {
|
|
128
|
+
const dir = join(root, safeSegment(folderName, 'folder name'));
|
|
129
|
+
return {
|
|
130
|
+
dir,
|
|
131
|
+
identity: join(dir, ENTITY_KINDS[kind].identityFile),
|
|
132
|
+
private: join(dir, PRIVATE_DIR_NAME),
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
const WINDOWS_RESERVED = /^(con|prn|aux|nul|com[0-9]|lpt[0-9])$/i;
|
|
157
136
|
/**
|
|
158
|
-
* The
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
* canonical email joins the history, nothing ever leaves it, so every name
|
|
162
|
-
* this user has worn stays resolvable. `createdAt` is preserved;
|
|
163
|
-
* `updatedAt` is stamped now.
|
|
137
|
+
* The folder name for an entity called `name`: the name itself, made safe
|
|
138
|
+
* for Windows, macOS and Linux and kept to 40 characters. A name already in
|
|
139
|
+
* `taken` (compared without case) gets "-2", "-3", ….
|
|
164
140
|
*/
|
|
141
|
+
export function entityFolderName(name, taken = []) {
|
|
142
|
+
let base = String(name ?? '')
|
|
143
|
+
.replace(/[\u0000-\u001f<>:"/\\|?*]/g, ' ')
|
|
144
|
+
.replace(/\s+/g, ' ')
|
|
145
|
+
.trim()
|
|
146
|
+
.replace(/^\.+/, '')
|
|
147
|
+
.replace(/[. ]+$/, '');
|
|
148
|
+
if (!base)
|
|
149
|
+
base = 'Untitled';
|
|
150
|
+
if (WINDOWS_RESERVED.test(base.split('.')[0]))
|
|
151
|
+
base = `${base}_`;
|
|
152
|
+
base = fit(base, ENTITY_FOLDER_MAX);
|
|
153
|
+
const used = new Set([...taken].map((folder) => folder.toLowerCase()));
|
|
154
|
+
if (!used.has(base.toLowerCase()))
|
|
155
|
+
return base;
|
|
156
|
+
for (let n = 2;; n += 1) {
|
|
157
|
+
const candidate = fit(base, ENTITY_FOLDER_MAX - `-${n}`.length) + `-${n}`;
|
|
158
|
+
if (!used.has(candidate.toLowerCase()))
|
|
159
|
+
return candidate;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
/** Where a deleted entity's `.private` folder is kept: `<parked>/<kind>/<id>`,
|
|
163
|
+
* with `parked` from {@link userLayout}'s `computer.parked`. */
|
|
164
|
+
export function parkedDir(parked, kind, id) {
|
|
165
|
+
return join(parked, kind, safeSegment(id, 'id'));
|
|
166
|
+
}
|
|
167
|
+
/** True when a path inside a user's home is computer-only: any segment is
|
|
168
|
+
* `.amalgm` or `.private`, in any letter case (macOS and Windows disks treat
|
|
169
|
+
* `.Private` as the same folder). Such paths are never synced, watched or served. */
|
|
170
|
+
export function isLocalOnlyPath(relativePath) {
|
|
171
|
+
return relativePath.split(/[\\/]/).some((segment) => {
|
|
172
|
+
const name = segment.toLowerCase();
|
|
173
|
+
return name === LOCAL_DIR_NAME || name === PRIVATE_DIR_NAME;
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
/** The lane manifest to keep: an existing current one untouched (identity is
|
|
177
|
+
* minted once), otherwise a new one. */
|
|
178
|
+
export function buildRootManifest(existing, ports) {
|
|
179
|
+
if (existing?.installationId) {
|
|
180
|
+
requireCurrentLayout(existing);
|
|
181
|
+
return existing;
|
|
182
|
+
}
|
|
183
|
+
return { schemaVersion: LAYOUT_VERSION, installationId: ports.randomHex(8), createdAt: ports.nowIso() };
|
|
184
|
+
}
|
|
185
|
+
/** Refuses a lane made by an older Amalgm. There is no migration. */
|
|
186
|
+
export function requireCurrentLayout(manifest) {
|
|
187
|
+
if (manifest?.schemaVersion !== LAYOUT_VERSION) {
|
|
188
|
+
throw new Error(`This Amalgm folder uses layout ${String(manifest?.schemaVersion ?? 'unknown')}; this version needs layout ${LAYOUT_VERSION}. Reinstall Amalgm.`);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
/** The next user manifest. Email history only grows, so every email this
|
|
192
|
+
* user has had still finds the folder. */
|
|
165
193
|
export function buildUserManifest(identity, existing, ports) {
|
|
166
194
|
const canonicalEmail = String(identity.email || existing?.canonicalEmail || '').trim().toLowerCase();
|
|
167
195
|
const emailHistory = Array.isArray(existing?.emailHistory) ? [...existing.emailHistory] : [];
|
|
@@ -176,80 +204,23 @@ export function buildUserManifest(identity, existing, ports) {
|
|
|
176
204
|
updatedAt: ports.nowIso(),
|
|
177
205
|
};
|
|
178
206
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
return
|
|
207
|
+
function safeSegment(value, label) {
|
|
208
|
+
const segment = String(value ?? '');
|
|
209
|
+
if (!segment || segment === '.' || segment === '..' || /[\\/\u0000]/.test(segment)) {
|
|
210
|
+
throw new Error(`Invalid ${label} "${segment}": it must be one folder name.`);
|
|
211
|
+
}
|
|
212
|
+
return segment;
|
|
185
213
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
* The name-derived user dir: `<homeDir>/users/<sanitized scope>` (engine
|
|
189
|
-
* scopedAmalgmDir, runtime-identity.js:137-142). DELIBERATE DEVIATION: the
|
|
190
|
-
* engine signature takes a third `label` parameter it asserts and then
|
|
191
|
-
* IGNORES — vestigial since manifest identity won over label-scoped
|
|
192
|
-
* folders — so the honest signature drops it. This is only the fallback
|
|
193
|
-
* path grammar: manifest-based resolution (find-by-userId across
|
|
194
|
-
* `.amalgm-user.json` files) reads the filesystem and stays host-side.
|
|
195
|
-
*/
|
|
196
|
-
export function scopedAmalgmDir(homeDir, userScope) {
|
|
197
|
-
return join(homeDir, 'users', sanitizeScopeSegment(userScope));
|
|
198
|
-
}
|
|
199
|
-
/** The tracked ignore policy at the root of one user ground. */
|
|
200
|
-
export function userIgnoreFile(userDir) {
|
|
201
|
-
return join(userDir, USER_IGNORE_FILE_NAME);
|
|
202
|
-
}
|
|
203
|
-
/** The reserved, unregistered control namespace for one user. */
|
|
204
|
-
export function userControlDir(userDir) {
|
|
205
|
-
return join(userDir, USER_CONTROL_DIR_NAME);
|
|
206
|
-
}
|
|
207
|
-
/** Machine-local state for one physical device under one user's home. */
|
|
208
|
-
export function userMachineDir(userDir, deviceId) {
|
|
209
|
-
const segment = sanitizeScopeSegment(deviceId, '');
|
|
210
|
-
if (!segment)
|
|
211
|
-
throw new Error('A device id is required for machine-local user state.');
|
|
212
|
-
return join(userControlDir(userDir), 'machines', segment);
|
|
213
|
-
}
|
|
214
|
-
/** Files/Live's machine-local databases and immutable content cache. */
|
|
215
|
-
export function liveMachineStateDir(userDir, deviceId) {
|
|
216
|
-
return join(userMachineDir(userDir, deviceId), 'live');
|
|
217
|
-
}
|
|
218
|
-
/** Per-label runtime state inside the reserved per-device control namespace.
|
|
219
|
-
* The label must be one of the three — junk never names a state dir. */
|
|
220
|
-
export function runtimeStateDir(userDir, deviceId, label) {
|
|
221
|
-
return join(userMachineDir(userDir, deviceId), 'runtimes', assertRuntimeLabel(label));
|
|
222
|
-
}
|
|
223
|
-
/** `runtime-state.json` inside a runtime state dir (runtime-paths.js:88-90). */
|
|
224
|
-
export function runtimeStateFile(stateDir) {
|
|
225
|
-
return join(stateDir, 'runtime-state.json');
|
|
226
|
-
}
|
|
227
|
-
/** `runtime-token.json` inside a runtime state dir (runtime-paths.js:92-94). */
|
|
228
|
-
export function runtimeTokenFile(stateDir) {
|
|
229
|
-
return join(stateDir, 'runtime-token.json');
|
|
230
|
-
}
|
|
231
|
-
/** `logs/` inside a runtime state dir (runtime-paths.js:96-98). */
|
|
232
|
-
export function runtimeLogDir(stateDir) {
|
|
233
|
-
return join(stateDir, 'logs');
|
|
234
|
-
}
|
|
235
|
-
/** `computer.json` — the public computer record beside a state or user dir
|
|
236
|
-
* (engine config.js:37-40, proxy-token-store.js:25-28). */
|
|
237
|
-
export function computerRecordFile(dir) {
|
|
238
|
-
return join(dir, 'computer.json');
|
|
239
|
-
}
|
|
240
|
-
/** `auth.json` — the secret auth envelope beside a state or user dir
|
|
241
|
-
* (engine config.js:37-40, proxy-token-store.js:25-28). */
|
|
242
|
-
export function computerAuthFile(dir) {
|
|
243
|
-
return join(dir, 'auth.json');
|
|
214
|
+
function fit(value, max) {
|
|
215
|
+
return [...value].slice(0, max).join('').replace(/[. ]+$/, '') || 'Untitled'.slice(0, max);
|
|
244
216
|
}
|
|
245
|
-
/**
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
throw new Error(`Unknown primitive root "${kind}". Use one of: ${PRIMITIVE_DIRS.join(', ')}`);
|
|
217
|
+
/** 32-bit FNV-1a as 8 hex characters: a short, stable suffix for cut names. */
|
|
218
|
+
function fnv1aHex(value) {
|
|
219
|
+
let hash = 0x811c9dc5;
|
|
220
|
+
for (const byte of new TextEncoder().encode(value)) {
|
|
221
|
+
hash ^= byte;
|
|
222
|
+
hash = Math.imul(hash, 0x01000193) >>> 0;
|
|
252
223
|
}
|
|
253
|
-
return
|
|
224
|
+
return hash.toString(16).padStart(8, '0');
|
|
254
225
|
}
|
|
255
226
|
//# sourceMappingURL=layout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../src/identity/layout.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../src/identity/layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,mBAAmB,EAAuB,MAAM,sBAAsB,CAAC;AAGhF,uFAAuF;AACvF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC;AAEhC,MAAM,CAAC,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;AACtD,MAAM,CAAC,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;AACt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CAAC,KAAK,CAAC,EAAE,CAAC;QACnD,IAAI,IAAI,IAAI,CAAC;QACb,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/identity/local/api.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAE3E,wBAAgB,cAAc,CAAC,OAAO,EAAE;IACtC,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAC;IACvC,QAAQ,CAAC,WAAW,EAAE,oBAAoB,CAAC;CAC5C,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/identity/local/api.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAE3E,wBAAgB,cAAc,CAAC,OAAO,EAAE;IACtC,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAC;IACvC,QAAQ,CAAC,WAAW,EAAE,oBAAoB,CAAC;CAC5C,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAY1C"}
|
|
@@ -9,17 +9,6 @@ export function createLocalApi(options) {
|
|
|
9
9
|
workspaceRoot: options.environment.workspaceRoot,
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
if (request.method === 'POST' && url.pathname === '/local/init') {
|
|
13
|
-
const initialized = options.environment.ensure();
|
|
14
|
-
return json(200, {
|
|
15
|
-
ok: true,
|
|
16
|
-
created: initialized.created,
|
|
17
|
-
amalgmPath: initialized.path,
|
|
18
|
-
homedir: options.environment.homedir,
|
|
19
|
-
workspaceRoot: options.environment.workspaceRoot,
|
|
20
|
-
agents: discoverLocalHarnesses(options.discovery),
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
12
|
return json(404, { error: 'not found' });
|
|
24
13
|
};
|
|
25
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/identity/local/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAGxD,MAAM,UAAU,cAAc,CAAC,OAG9B;IACC,OAAO,KAAK,EAAE,OAAO,EAAE,EAAE;QACvB,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACjC,IAAI,OAAO,CAAC,MAAM,KAAK,KAAK,IAAI,CAAC,GAAG,CAAC,QAAQ,KAAK,QAAQ,IAAI,GAAG,CAAC,QAAQ,KAAK,oBAAoB,CAAC,EAAE,CAAC;YACrG,OAAO,IAAI,CAAC,GAAG,EAAE;gBACf,MAAM,EAAE,sBAAsB,CAAC,OAAO,CAAC,SAAS,CAAC;gBACjD,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,OAAO;gBACpC,aAAa,EAAE,OAAO,CAAC,WAAW,CAAC,aAAa;aACjD,CAAC,CAAC;QACL,CAAC;QACD,
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/identity/local/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAGxD,MAAM,UAAU,cAAc,CAAC,OAG9B;IACC,OAAO,KAAK,EAAE,OAAO,EAAE,EAAE;QACvB,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACjC,IAAI,OAAO,CAAC,MAAM,KAAK,KAAK,IAAI,CAAC,GAAG,CAAC,QAAQ,KAAK,QAAQ,IAAI,GAAG,CAAC,QAAQ,KAAK,oBAAoB,CAAC,EAAE,CAAC;YACrG,OAAO,IAAI,CAAC,GAAG,EAAE;gBACf,MAAM,EAAE,sBAAsB,CAAC,OAAO,CAAC,SAAS,CAAC;gBACjD,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,OAAO;gBACpC,aAAa,EAAE,OAAO,CAAC,WAAW,CAAC,aAAa;aACjD,CAAC,CAAC;QACL,CAAC;QACD,OAAO,IAAI,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC;IAC3C,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,IAAI,CAAC,MAAc,EAAE,IAAa;IACzC,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE;QACxC,MAAM;QACN,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE,eAAe,EAAE,UAAU,EAAE;KAC7E,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -22,9 +22,5 @@ export interface LocalDiscoveryHost {
|
|
|
22
22
|
export interface LocalEnvironmentHost {
|
|
23
23
|
readonly homedir: string;
|
|
24
24
|
readonly workspaceRoot: string;
|
|
25
|
-
ensure(): {
|
|
26
|
-
readonly created: boolean;
|
|
27
|
-
readonly path: string;
|
|
28
|
-
};
|
|
29
25
|
}
|
|
30
26
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/identity/local/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,WAAW,CAAC,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;QAAC,QAAQ,CAAC,IAAI,EA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G,OAAO,GAAG,UAAU,GAAG,IAAI,GAAG,KAAK,GAAG,QAAQ,CAAC;IAC5E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IACjC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9B,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACtC,UAAU,CAAC,SAAS,EAAE,YAAY,CAAC,IAAI,CAAC,GAAG,eAAe,GAAG,IAAI,CAAC;CACnE;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC"}
|
|
@@ -75,12 +75,13 @@ export interface InstallerPort {
|
|
|
75
75
|
install(plan: InstallationPlan): Promise<InstalledRelease>;
|
|
76
76
|
rollback(installed: InstalledRelease): Promise<void>;
|
|
77
77
|
}
|
|
78
|
+
/** What a started runtime proves locally. Its cloud connection is lifecycle,
|
|
79
|
+
* not readiness: a machine with no network starts and joins when it returns. */
|
|
78
80
|
export interface RuntimeEvidence {
|
|
79
81
|
readonly userId: string;
|
|
80
82
|
readonly computerId: string;
|
|
81
83
|
readonly deviceId: string;
|
|
82
84
|
readonly services: readonly string[];
|
|
83
|
-
readonly tunnelsAuthenticated: boolean;
|
|
84
85
|
readonly proxyContext: {
|
|
85
86
|
readonly userId: string;
|
|
86
87
|
readonly computerId: string;
|
|
@@ -105,13 +106,11 @@ interface UserGroundIdentityEvidence {
|
|
|
105
106
|
export type UserGroundEvidence = UserGroundIdentityEvidence & ({
|
|
106
107
|
readonly cloudHead: string;
|
|
107
108
|
readonly mode: Exclude<UserGroundMode, 'paused'>;
|
|
108
|
-
readonly entityCount: number;
|
|
109
109
|
readonly watcherRoots: number;
|
|
110
110
|
readonly watching: true;
|
|
111
111
|
} | {
|
|
112
112
|
readonly mode: 'paused';
|
|
113
113
|
readonly cloudHead: null;
|
|
114
|
-
readonly entityCount: null;
|
|
115
114
|
readonly watcherRoots: 0;
|
|
116
115
|
readonly watching: false;
|
|
117
116
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"machine-setup.d.ts","sourceRoot":"","sources":["../../src/identity/machine-setup.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,KAAK,EACV,gBAAgB,EAChB,0BAA0B,EAC1B,oBAAoB,EACrB,MAAM,qCAAqC,CAAC;AAG7C,KAAK,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAMpC,MAAM,MAAM,iBAAiB,GACzB,QAAQ,GACR,UAAU,GACV,cAAc,GACd,SAAS,GACT,cAAc,GACd,aAAa,GACb,aAAa,GACb,SAAS,GACT,OAAO,CAAC;AAEZ,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;gBAElB,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,UAAQ,EAAE,OAAO,CAAC,EAAE,YAAY;CAOhG;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CA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