@egen-civitas/esm-embed-testing 0.0.0-stage → 0.2.0

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/dist/server.js ADDED
@@ -0,0 +1,310 @@
1
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
2
+ try {
3
+ var info = gen[key](arg);
4
+ var value = info.value;
5
+ } catch (error) {
6
+ reject(error);
7
+ return;
8
+ }
9
+ if (info.done) {
10
+ resolve(value);
11
+ } else {
12
+ Promise.resolve(value).then(_next, _throw);
13
+ }
14
+ }
15
+ function _async_to_generator(fn) {
16
+ return function() {
17
+ var self = this, args = arguments;
18
+ return new Promise(function(resolve, reject) {
19
+ var gen = fn.apply(self, args);
20
+ function _next(value) {
21
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
22
+ }
23
+ function _throw(err) {
24
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
25
+ }
26
+ _next(undefined);
27
+ });
28
+ };
29
+ }
30
+ function _ts_generator(thisArg, body) {
31
+ var f, y, t, _ = {
32
+ label: 0,
33
+ sent: function() {
34
+ if (t[0] & 1) throw t[1];
35
+ return t[1];
36
+ },
37
+ trys: [],
38
+ ops: []
39
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
40
+ return d(g, "next", {
41
+ value: verb(0)
42
+ }), d(g, "throw", {
43
+ value: verb(1)
44
+ }), d(g, "return", {
45
+ value: verb(2)
46
+ }), typeof Symbol === "function" && d(g, Symbol.iterator, {
47
+ value: function() {
48
+ return this;
49
+ }
50
+ }), g;
51
+ function verb(n) {
52
+ return function(v) {
53
+ return step([
54
+ n,
55
+ v
56
+ ]);
57
+ };
58
+ }
59
+ function step(op) {
60
+ if (f) throw new TypeError("Generator is already executing.");
61
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
62
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
63
+ if (y = 0, t) op = [
64
+ op[0] & 2,
65
+ t.value
66
+ ];
67
+ switch(op[0]){
68
+ case 0:
69
+ case 1:
70
+ t = op;
71
+ break;
72
+ case 4:
73
+ _.label++;
74
+ return {
75
+ value: op[1],
76
+ done: false
77
+ };
78
+ case 5:
79
+ _.label++;
80
+ y = op[1];
81
+ op = [
82
+ 0
83
+ ];
84
+ continue;
85
+ case 7:
86
+ op = _.ops.pop();
87
+ _.trys.pop();
88
+ continue;
89
+ default:
90
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
91
+ _ = 0;
92
+ continue;
93
+ }
94
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
95
+ _.label = op[1];
96
+ break;
97
+ }
98
+ if (op[0] === 6 && _.label < t[1]) {
99
+ _.label = t[1];
100
+ t = op;
101
+ break;
102
+ }
103
+ if (t && _.label < t[2]) {
104
+ _.label = t[2];
105
+ _.ops.push(op);
106
+ break;
107
+ }
108
+ if (t[2]) _.ops.pop();
109
+ _.trys.pop();
110
+ continue;
111
+ }
112
+ op = body.call(thisArg, _);
113
+ } catch (e) {
114
+ op = [
115
+ 6,
116
+ e
117
+ ];
118
+ y = 0;
119
+ } finally{
120
+ f = t = 0;
121
+ }
122
+ if (op[0] & 5) throw op[1];
123
+ return {
124
+ value: op[0] ? op[1] : void 0,
125
+ done: true
126
+ };
127
+ }
128
+ }
129
+ import { createServer } from 'node:http';
130
+ import { readFile } from 'node:fs/promises';
131
+ import { createRequire } from 'node:module';
132
+ import { dirname, join, normalize, sep } from 'node:path';
133
+ import { validateManifest, CAPABILITY_IDS, CAPABILITIES } from '@egen-civitas/esm-embed-protocol';
134
+ var require_ = createRequire(import.meta.url);
135
+ var pkgDist = function pkgDist(name) {
136
+ return dirname(require_.resolve(name));
137
+ };
138
+ var MIME = {
139
+ '.js': 'text/javascript; charset=utf-8',
140
+ '.json': 'application/json; charset=utf-8'
141
+ };
142
+ function approvedFor(manifest, strict) {
143
+ if (strict || !manifest) return {};
144
+ // « tout approuver » : chaque capacité demandée est approuvée avec sa propre configuration (ceiling = demande)
145
+ var out = {};
146
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
147
+ try {
148
+ for(var _iterator = CAPABILITY_IDS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
149
+ var id = _step.value;
150
+ var asked = manifest.capabilities[id];
151
+ if (asked !== undefined && !CAPABILITIES[id].defaultGrant) out[id] = asked;
152
+ }
153
+ } catch (err) {
154
+ _didIteratorError = true;
155
+ _iteratorError = err;
156
+ } finally{
157
+ try {
158
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
159
+ _iterator.return();
160
+ }
161
+ } finally{
162
+ if (_didIteratorError) {
163
+ throw _iteratorError;
164
+ }
165
+ }
166
+ }
167
+ return out;
168
+ }
169
+ export function startSimulator(o) {
170
+ return _async_to_generator(function() {
171
+ var _ref, _o_session, _o_host, appUrl, manifest, r, config, roots, server, addr;
172
+ return _ts_generator(this, function(_state) {
173
+ switch(_state.label){
174
+ case 0:
175
+ appUrl = new URL(o.app);
176
+ if (o.manifest !== undefined) {
177
+ r = validateManifest(o.manifest, {
178
+ allowInsecureLocalhost: true
179
+ });
180
+ if (!r.ok) throw new Error("Manifeste invalide :\n- ".concat(r.errors.join('\n- ')));
181
+ manifest = r.manifest;
182
+ }
183
+ config = {
184
+ app: appUrl.href,
185
+ moduleName: (_ref = manifest === null || manifest === void 0 ? void 0 : manifest.name) !== null && _ref !== void 0 ? _ref : '@acme/esm-sim-app',
186
+ manifestCapabilities: manifest === null || manifest === void 0 ? void 0 : manifest.capabilities,
187
+ approved: approvedFor(manifest, !!o.strict),
188
+ session: (_o_session = o.session) !== null && _o_session !== void 0 ? _o_session : {
189
+ authenticated: true,
190
+ locale: 'fr',
191
+ user: {
192
+ uuid: 'sim-user',
193
+ display: 'Utilisateur simulé',
194
+ username: 'sim'
195
+ },
196
+ sessionId: 'NE-DOIT-JAMAIS-ETRE-VISIBLE'
197
+ }
198
+ };
199
+ roots = {
200
+ protocol: pkgDist('@egen-civitas/esm-embed-protocol'),
201
+ host: pkgDist('@egen-civitas/esm-embed-host')
202
+ };
203
+ server = createServer(function(req, res) {
204
+ return _async_to_generator(function() {
205
+ var _req_url, url, send, m, root, file, _tmp, unused;
206
+ return _ts_generator(this, function(_state) {
207
+ switch(_state.label){
208
+ case 0:
209
+ url = new URL((_req_url = req.url) !== null && _req_url !== void 0 ? _req_url : '/', 'http://x');
210
+ send = function send(code, body) {
211
+ var type = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 'text/plain; charset=utf-8';
212
+ res.writeHead(code, {
213
+ 'content-type': type,
214
+ 'cache-control': 'no-store',
215
+ 'x-content-type-options': 'nosniff'
216
+ });
217
+ res.end(body);
218
+ };
219
+ _state.label = 1;
220
+ case 1:
221
+ _state.trys.push([
222
+ 1,
223
+ 4,
224
+ ,
225
+ 5
226
+ ]);
227
+ if (url.pathname === '/') return [
228
+ 2,
229
+ send(200, PAGE, 'text/html; charset=utf-8')
230
+ ];
231
+ if (url.pathname === '/api/config') return [
232
+ 2,
233
+ send(200, JSON.stringify(config), MIME['.json'])
234
+ ];
235
+ m = /^\/vendor\/(protocol|host)\/(.+)$/.exec(url.pathname);
236
+ if (!m) return [
237
+ 3,
238
+ 3
239
+ ];
240
+ root = roots[m[1]];
241
+ file = normalize(join(root, m[2]));
242
+ if (!file.startsWith(root + sep) || !file.endsWith('.js')) return [
243
+ 2,
244
+ send(404, 'Introuvable')
245
+ ];
246
+ _tmp = [
247
+ 200
248
+ ];
249
+ return [
250
+ 4,
251
+ readFile(file)
252
+ ];
253
+ case 2:
254
+ return [
255
+ 2,
256
+ send.apply(void 0, _tmp.concat([
257
+ _state.sent(),
258
+ MIME['.js']
259
+ ]))
260
+ ];
261
+ case 3:
262
+ send(404, 'Introuvable');
263
+ return [
264
+ 3,
265
+ 5
266
+ ];
267
+ case 4:
268
+ unused = _state.sent();
269
+ send(404, 'Introuvable');
270
+ return [
271
+ 3,
272
+ 5
273
+ ];
274
+ case 5:
275
+ return [
276
+ 2
277
+ ];
278
+ }
279
+ });
280
+ })();
281
+ });
282
+ return [
283
+ 4,
284
+ new Promise(function(resolve) {
285
+ var _o_port, _o_host;
286
+ return server.listen((_o_port = o.port) !== null && _o_port !== void 0 ? _o_port : 4100, (_o_host = o.host) !== null && _o_host !== void 0 ? _o_host : '127.0.0.1', resolve);
287
+ })
288
+ ];
289
+ case 1:
290
+ _state.sent();
291
+ addr = server.address();
292
+ return [
293
+ 2,
294
+ {
295
+ url: "http://".concat((_o_host = o.host) !== null && _o_host !== void 0 ? _o_host : '127.0.0.1', ":").concat(addr.port),
296
+ server: server,
297
+ close: function close() {
298
+ return new Promise(function(r) {
299
+ return server.close(function() {
300
+ return r();
301
+ });
302
+ });
303
+ }
304
+ }
305
+ ];
306
+ }
307
+ });
308
+ })();
309
+ }
310
+ var PAGE = "<!doctype html><html lang=\"fr\"><head><meta charset=\"utf-8\"><title>EGEN — simulateur de Shell</title>\n<meta name=\"viewport\" content=\"width=device-width,initial-scale=1\">\n<script type=\"importmap\">{\"imports\":{\"@egen-civitas/esm-embed-protocol\":\"/vendor/protocol/index.js\"}}</script>\n<style>\n:root{color-scheme:light dark;--b:#d0d7de;font-family:system-ui,sans-serif}\nbody{margin:0;display:grid;grid-template-columns:1fr 360px;height:100vh}\n#stage{min-width:0;display:flex}#stage iframe{flex:1;border:0}\naside{border-left:1px solid var(--b);padding:12px;overflow:auto;font-size:13px}\nbutton{margin:2px 4px 2px 0;padding:4px 8px;cursor:pointer}\npre{white-space:pre-wrap;word-break:break-word;font-size:12px;max-height:50vh;overflow:auto;border:1px solid var(--b);padding:6px;border-radius:6px}\n.toast{border:1px solid var(--b);border-radius:6px;padding:6px;margin:4px 0}\nh1{font-size:14px;margin:0 0 8px}h2{font-size:12px;margin:12px 0 4px;text-transform:uppercase;opacity:.7}\n</style></head><body>\n<div id=\"stage\"></div>\n<aside><h1>Simulateur de Shell EGEN</h1>\n<div id=\"info\"></div>\n<h2>Pousser vers l'app</h2>\n<button id=\"theme\">Th\xe8me clair/sombre</button><button id=\"locale\">Langue fr/en</button><button id=\"session\">Session (autre nom)</button><button id=\"event\">\xc9v\xe9nement core.sim.ping</button>\n<h2>Notifications</h2><div id=\"toasts\"></div>\n<h2>Journal des \xe9changes</h2><pre id=\"log\"></pre></aside>\n<script type=\"module\">\nimport { effectiveGrants } from '@egen-civitas/esm-embed-protocol';\nimport { createEmbedHost } from '/vendor/host/index.js';\nconst cfg = await (await fetch('/api/config')).json();\nconst $ = (id) => document.getElementById(id);\nconst log = (...a) => { $('log').textContent = new Date().toLocaleTimeString() + ' ' + a.map((x) => typeof x === 'string' ? x : JSON.stringify(x)).join(' ') + '\\n' + $('log').textContent; };\nconst watch = (v) => { const s = new Set(); return { get: () => v, subscribe: (cb) => (s.add(cb), () => s.delete(cb)), set: (n) => { v = n; s.forEach((f) => f(n)); } }; };\nconst session = watch(cfg.session), theme = watch({ mode: 'light', tokens: { '--primary': '#2563eb', '--background': '#ffffff', '--foreground': '#111111' } }), locale = watch('fr');\nconst tenant = watch({ id: 'sim-tenant' }), conf = watch({});\nconst topics = new Map();\nconst wrap = (cap, p) => Object.fromEntries(Object.entries(p).map(([k, f]) => [k, typeof f === 'function' ? (...a) => { log('←', cap + '.' + k, a); return f(...a); } : f]));\nconst providers = {\n session: wrap('session', session), theme: wrap('theme', theme), locale: wrap('locale', locale), tenant: wrap('tenant', tenant), config: wrap('config', conf),\n flags: wrap('flags', { isEnabled: () => true }), permissions: wrap('permissions', { can: () => true }),\n events: { publish: (t, p, c) => { log('← events.publish', t, p, 'de', c.moduleName); (topics.get(t) || []).forEach((f) => f(p)); }, subscribe: (t, cb) => { log('← events.subscribe', t); const l = topics.get(t) || []; l.push(cb); topics.set(t, l); return () => topics.set(t, (topics.get(t) || []).filter((f) => f !== cb)); } },\n notifications: { show: (n) => { log('← notifications.show', n); const d = document.createElement('div'); d.className = 'toast'; d.textContent = '[' + n.kind + '] ' + n.title + (n.subtitle ? ' — ' + n.subtitle : ''); $('toasts').prepend(d); } },\n dialogs: { confirm: (d) => { log('← dialogs.confirm', d); return confirm(d.title + '\\n\\n' + d.message); } },\n api: { fetch: async (r) => { log('← api.fetch', r); return { status: 200, headers: { 'content-type': 'application/json' }, body: JSON.stringify({ simulated: true, request: r }) }; } },\n telemetry: { log: (...a) => log('← telemetry.log', a.slice(0, 3)), metric: (...a) => log('← telemetry.metric', a.slice(0, 3)) },\n aiTools: { register: (m, t) => log('← ai-tools.register', t.map((x) => x.name)), unregister: (m, n) => log('← ai-tools.unregister', n) },\n};\nconst grants = effectiveGrants(cfg.manifestCapabilities, cfg.approved);\n$('info').innerHTML = '<b>App</b> ' + cfg.app + '<br><b>Module</b> ' + cfg.moduleName + '<br><b>hostOrigins \xe0 d\xe9clarer dans l’app</b> <code>' + location.origin + '</code><br><b>Capacit\xe9s accord\xe9es</b> ' + Object.keys(grants).join(', ');\nconst host = createEmbedHost({ moduleName: cfg.moduleName, src: cfg.app, grants, providers, onConnect: (g, d) => log('✔ connect\xe9', { accord\xe9es: g.map((x) => x.id), refus\xe9es: d }), onClose: (r) => log('✖ ferm\xe9', r) });\nhost.mount($('stage'));\n$('theme').onclick = () => { const t = theme.get(); const dark = t.mode !== 'dark'; theme.set({ mode: dark ? 'dark' : 'light', tokens: { ...t.tokens, '--background': dark ? '#0b0b0f' : '#ffffff', '--foreground': dark ? '#f5f5f5' : '#111111' } }); };\n$('locale').onclick = () => locale.set(locale.get() === 'fr' ? 'en' : 'fr');\n$('session').onclick = () => { const s = session.get(); session.set({ ...s, user: { ...s.user, display: 'Autre ' + Math.floor(Math.random() * 100) } }); };\n$('event').onclick = () => (topics.get('core.sim.ping') || []).forEach((f) => f({ at: Date.now() }));\n</script></body></html>";
@@ -0,0 +1,80 @@
1
+ import { type ApprovedGrants, type CapabilityId, type GrantConfig } from '@egen-civitas/esm-embed-protocol';
2
+ import type { ConnectOptions } from '@egen-civitas/esm-embed-client';
3
+ import { HostConnection, type ApiRequest, type ApiResponse, type ThemeState } from '@egen-civitas/esm-embed-host';
4
+ export interface TestHostOptions {
5
+ moduleName?: string;
6
+ /** Origine simulée du Shell (à mettre dans `hostOrigins` de l'app). */
7
+ origin?: string;
8
+ /** Capacités demandées par le manifeste de l'app (défaut : aucune demande explicite = l'opérateur définit seul). */
9
+ manifestCapabilities?: Partial<Record<CapabilityId, GrantConfig>>;
10
+ /** Plafond fixé par l'opérateur (défaut : rien d'approuvé hors capacités « par défaut »). */
11
+ approved?: ApprovedGrants;
12
+ session?: Record<string, unknown>;
13
+ tenant?: {
14
+ id: string | null;
15
+ };
16
+ locale?: string;
17
+ theme?: ThemeState;
18
+ config?: Record<string, unknown>;
19
+ flags?: Record<string, boolean>;
20
+ /** Permissions que l'utilisateur simulé possède. */
21
+ permissions?: string[];
22
+ api?: (req: ApiRequest) => ApiResponse | Promise<ApiResponse>;
23
+ confirm?: boolean | ((d: {
24
+ title: string;
25
+ message: string;
26
+ danger?: boolean;
27
+ }) => boolean);
28
+ }
29
+ export interface CallRecord {
30
+ cap: string;
31
+ method: string;
32
+ args: unknown[];
33
+ }
34
+ export interface TestHost {
35
+ /** À passer à `connectToEgen({ ...host.connectOptions, capabilities: [...] })`. */
36
+ connectOptions: Pick<ConnectOptions, 'moduleName' | 'hostOrigins' | 'window' | 'host' | 'timeoutMs'>;
37
+ connection: HostConnection;
38
+ /** Journal des services du Core sollicités par l'app. */
39
+ calls: CallRecord[];
40
+ notifications: Array<{
41
+ kind: string;
42
+ title: string;
43
+ subtitle?: string;
44
+ }>;
45
+ published: Array<{
46
+ topic: string;
47
+ payload: unknown;
48
+ from: string;
49
+ }>;
50
+ tools: Map<string, {
51
+ description: string;
52
+ }>;
53
+ /** Pousse un changement vers l'app (comme le ferait le Core). */
54
+ emit: {
55
+ session(v: Record<string, unknown>): void;
56
+ tenant(v: {
57
+ id: string | null;
58
+ }): void;
59
+ locale(v: string): void;
60
+ theme(v: ThemeState): void;
61
+ config(v: Record<string, unknown>): void;
62
+ event(topic: string, payload?: unknown): void;
63
+ goto(path: string): void;
64
+ visibility(visible: boolean): void;
65
+ };
66
+ /** L'agent IA appelle un outil déclaré par l'app. */
67
+ invokeTool(name: string, args?: Record<string, unknown>): Promise<unknown>;
68
+ destroy(): void;
69
+ }
70
+ /**
71
+ * Hôte EGEN de test, en mémoire : un vrai `HostConnection` (mêmes grants, mêmes refus, même dispatch fermé que le Core)
72
+ * relié à votre app par de fausses fenêtres et un vrai `MessageChannel`. Aucun navigateur, aucun Core.
73
+ *
74
+ * ```ts
75
+ * const sim = createTestHost({ session: { authenticated: true, user: { display: 'Sam' } } });
76
+ * const egen = await connectToEgen({ ...sim.connectOptions, capabilities: ['session'] });
77
+ * ```
78
+ */
79
+ export declare function createTestHost(o?: TestHostOptions): TestHost;
80
+ //# sourceMappingURL=test-host.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-host.d.ts","sourceRoot":"","sources":["../src/test-host.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC7H,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAa,cAAc,EAAE,KAAK,UAAU,EAAE,KAAK,WAAW,EAAsB,KAAK,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAEjJ,MAAM,WAAW,eAAe;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oHAAoH;IACpH,oBAAoB,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC,CAAC;IAClE,6FAA6F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