@omnitron-dev/titan-lumen 0.0.0-stage → 0.4.8

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.
Files changed (47) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +44 -2
  3. package/dist/access/access-filter.service.d.ts +25 -0
  4. package/dist/access/access-filter.service.d.ts.map +1 -0
  5. package/dist/access/access-filter.service.js +61 -0
  6. package/dist/access/access-filter.service.js.map +1 -0
  7. package/dist/constants.d.ts +3 -0
  8. package/dist/constants.d.ts.map +1 -0
  9. package/dist/constants.js +3 -0
  10. package/dist/constants.js.map +1 -0
  11. package/dist/corpus-files.d.ts +12 -0
  12. package/dist/corpus-files.d.ts.map +1 -0
  13. package/dist/corpus-files.js +114 -0
  14. package/dist/corpus-files.js.map +1 -0
  15. package/dist/index.d.ts +10 -0
  16. package/dist/index.d.ts.map +1 -0
  17. package/dist/index.js +8 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/live/live-edit.service.d.ts +47 -0
  20. package/dist/live/live-edit.service.d.ts.map +1 -0
  21. package/dist/live/live-edit.service.js +253 -0
  22. package/dist/live/live-edit.service.js.map +1 -0
  23. package/dist/live/migration.d.ts +4 -0
  24. package/dist/live/migration.d.ts.map +1 -0
  25. package/dist/live/migration.js +38 -0
  26. package/dist/live/migration.js.map +1 -0
  27. package/dist/live/schema.d.ts +19 -0
  28. package/dist/live/schema.d.ts.map +1 -0
  29. package/dist/live/schema.js +2 -0
  30. package/dist/live/schema.js.map +1 -0
  31. package/dist/lumen.module.d.ts +8 -0
  32. package/dist/lumen.module.d.ts.map +1 -0
  33. package/dist/lumen.module.js +58 -0
  34. package/dist/lumen.module.js.map +1 -0
  35. package/dist/lumen.service.d.ts +32 -0
  36. package/dist/lumen.service.d.ts.map +1 -0
  37. package/dist/lumen.service.js +710 -0
  38. package/dist/lumen.service.js.map +1 -0
  39. package/dist/mcp.d.ts +16 -0
  40. package/dist/mcp.d.ts.map +1 -0
  41. package/dist/mcp.js +52 -0
  42. package/dist/mcp.js.map +1 -0
  43. package/dist/types.d.ts +119 -0
  44. package/dist/types.d.ts.map +1 -0
  45. package/dist/types.js +2 -0
  46. package/dist/types.js.map +1 -0
  47. package/package.json +54 -3
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 LuxQuant
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,45 @@
1
- # Temporary Holding Version
1
+ # @omnitron-dev/titan-lumen
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Lumen document services for Titan applications. The module exposes authorized reads, search, theorem graphs and optional durable authoring through the application's existing Netron peer.
4
+
5
+ ## Capabilities
6
+
7
+ - Document reads and search projected for the admitted caller.
8
+ - Symbol contracts and theorem graphs.
9
+ - Explicitly authorized playground execution.
10
+ - Revision-checked editing backed by the application's database.
11
+
12
+ ## Quick start
13
+
14
+ ```sh
15
+ pnpm add @omnitron-dev/titan-lumen
16
+ ```
17
+
18
+ ```ts
19
+ import { LumenModule } from '@omnitron-dev/titan-lumen';
20
+
21
+ export const documents = LumenModule.forRoot({
22
+ docsDir: '/absolute/docs',
23
+ enablePlayground: false,
24
+ });
25
+ ```
26
+
27
+ Add the module to an existing Titan application. Resolve `LumenService` and expose it with `peer.exposeService(app.resolve(LumenService))` on that application's Netron peer. The host owns its listeners and authentication provider. `LumenServiceContract` describes the published `Lumen` service; no separate controller or request-supplied session is needed.
28
+
29
+ An empty corpus returns empty results. A missing configured corpus is an error. Direct in-process reads outside an admitted invocation are anonymous.
30
+
31
+ ## Authorization and editing
32
+
33
+ Netron supplies the verified invocation identity. `getEditableDocument` and `saveLiveEdit` require `lumen.documents.write`; `executePlayground` independently requires `lumen.playground.execute`. Caller-supplied roles or extra arguments cannot grant those permissions.
34
+
35
+ Without `liveEdit`, the service reads files and refuses edits. Durable authoring uses `liveEdit: { corpusId, connectionName }`, the existing `TitanDatabaseModule`, and PostgreSQL or file-backed SQLite. Apply `lumenAuthoringMigration` through the application's migration workflow before enabling it. An unavailable store or missing schema is an error, not a fallback to stale files.
36
+
37
+ `getEditableDocument` returns the original source, revision and hash only when the caller can edit the whole document. Pass that source to Prism's `ResearchEditor.initialSource`, then save snapshot `getSource()` with `baseRevision` and `baseHash`. `saveLiveEdit` reports a conflict when those no longer match. Projected Markdown is for reading or export, not overwriting the original.
38
+
39
+ ## Documentation
40
+
41
+ [Public API](src/index.ts) · [Package exports](package.json) · [Lumen](../lumen/README.md) · [Prism authoring](../prism/README.md#research-documents-and-authoring)
42
+
43
+ ## License
44
+
45
+ [MIT](../../LICENSE).
@@ -0,0 +1,25 @@
1
+ import { type DocumentAccessOptions, type LumenDocumentAst } from '@omnitron-dev/lumen-ast';
2
+ export declare function extractDocumentMetadata(content: string): {
3
+ id?: string;
4
+ title?: string;
5
+ access: string;
6
+ };
7
+ export declare function extractDocumentAccess(content: string): string;
8
+ export declare class AccessFilterService {
9
+ private readonly options;
10
+ constructor(options?: DocumentAccessOptions);
11
+ isAllowed(userRoles: string[], accessLevel?: unknown): boolean;
12
+ filterSections<T extends {
13
+ access?: string;
14
+ level?: string;
15
+ }>(sections: T[], userRoles: string[]): T[];
16
+ projectContent(content: string, userRoles: string[], explicitAccess?: string): {
17
+ allowed: boolean;
18
+ ast: LumenDocumentAst;
19
+ strippedAny: boolean;
20
+ content: string | null;
21
+ };
22
+ filterRawMarkdownContent(content: string, userRoles: string[], explicitAccess?: string): string | null;
23
+ filterAst(ast: LumenDocumentAst, userRoles: string[]): LumenDocumentAst;
24
+ }
25
+ //# sourceMappingURL=access-filter.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"access-filter.service.d.ts","sourceRoot":"","sources":["../../src/access/access-filter.service.ts"],"names":[],"mappings":"AACA,OAAO,EAML,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AAEjC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAUxG;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED,qBACa,mBAAmB;IAClB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAApC,YAA6B,OAAO,GAAE,qBAA0B,EAAI;IAEpE,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,CAE7D;IAED,cAAc,CAAC,CAAC,SAAS;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,CAGrG;IAED,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,cAAc,CAAC,EAAE,MAAM;;;;;MAc3E;IAED,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAErG;IAED,SAAS,CAAC,GAAG,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,gBAAgB,CAEtE;CACF"}
@@ -0,0 +1,61 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { Injectable } from '@omnitron-dev/titan';
11
+ import { createDocumentAccessPredicate, projectDocumentAccess, parseDocumentSync, parseSafeFrontmatter, toCleanMarkdown, } from '@omnitron-dev/lumen-ast';
12
+ export function extractDocumentMetadata(content) {
13
+ const parsed = parseSafeFrontmatter(content);
14
+ const { id, title, access } = parsed.frontmatter;
15
+ return {
16
+ id,
17
+ title,
18
+ access: parsed.diagnostics.some((diagnostic) => diagnostic.severity === 'error')
19
+ ? 'restricted'
20
+ : (access ?? 'public'),
21
+ };
22
+ }
23
+ export function extractDocumentAccess(content) {
24
+ return extractDocumentMetadata(content).access;
25
+ }
26
+ let AccessFilterService = class AccessFilterService {
27
+ constructor(options = {}) {
28
+ this.options = options;
29
+ }
30
+ isAllowed(userRoles, accessLevel) {
31
+ return createDocumentAccessPredicate(userRoles, this.options)(accessLevel);
32
+ }
33
+ filterSections(sections, userRoles) {
34
+ const allows = createDocumentAccessPredicate(userRoles, this.options);
35
+ return sections.filter((section) => allows(Object.hasOwn(section, 'access') ? section.access : section.level));
36
+ }
37
+ projectContent(content, userRoles, explicitAccess) {
38
+ const allows = createDocumentAccessPredicate(userRoles, this.options);
39
+ const result = projectDocumentAccess(parseDocumentSync(content), (access) => allows(explicitAccess) && allows(access));
40
+ return {
41
+ ...result,
42
+ content: result.allowed
43
+ ? result.strippedAny
44
+ ? toCleanMarkdown(result.ast, { includeFrontmatter: true })
45
+ : content
46
+ : null,
47
+ };
48
+ }
49
+ filterRawMarkdownContent(content, userRoles, explicitAccess) {
50
+ return this.projectContent(content, userRoles, explicitAccess).content;
51
+ }
52
+ filterAst(ast, userRoles) {
53
+ return projectDocumentAccess(ast, createDocumentAccessPredicate(userRoles, this.options)).ast;
54
+ }
55
+ };
56
+ AccessFilterService = __decorate([
57
+ Injectable(),
58
+ __metadata("design:paramtypes", [Object])
59
+ ], AccessFilterService);
60
+ export { AccessFilterService };
61
+ //# sourceMappingURL=access-filter.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"access-filter.service.js","sourceRoot":"","sources":["../../src/access/access-filter.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,GAGhB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,UAAU,uBAAuB,CAAC,OAAe;IACrD,MAAM,MAAM,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAC7C,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,WAAW,CAAC;IACjD,OAAO;QACL,EAAE;QACF,KAA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L,GAAG,MAAM;YACT,OAAO,EAAE,MAAM,CAAC,OAAO;gBACrB,CAAC,CAAC,MAAM,CAAC,WAAW;oBAClB,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,CAAC;oBAC3D,CAAC,CAAC,OAAO;gBACX,CAAC,CAAC,IAAI;SACT,CAAC;IACJ,CAAC;IAED,wBAAwB,CAAC,OAAe,EAAE,SAAmB,EAAE,cAAuB;QACpF,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC,OAAO,CAAC;IACzE,CAAC;IAED,SAAS,CAAC,GAAqB,EAAE,SAAmB;QAClD,OAAO,qBAAqB,CAAC,GAAG,EAAE,6BAA6B,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;IAChG,CAAC;CACF,CAAA;AAnCY,mBAAmB;IAD/B,UAAU,EAAE;;GACA,mBAAmB,CAmC/B"}
@@ -0,0 +1,3 @@
1
+ export declare const LUMEN_OPTIONS_TOKEN: unique symbol;
2
+ export declare const DEFAULT_DOCS_DIR = "docs";
3
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,eAAoC,CAAC;AACrE,eAAO,MAAM,gBAAgB,SAAS,CAAC"}
@@ -0,0 +1,3 @@
1
+ export const LUMEN_OPTIONS_TOKEN = Symbol.for('titan:lumen:options');
2
+ export const DEFAULT_DOCS_DIR = 'docs';
3
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;AACrE,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC"}
@@ -0,0 +1,12 @@
1
+ export interface CorpusScanLimits {
2
+ maxEntries?: number;
3
+ maxBytes?: number;
4
+ maxDepth?: number;
5
+ }
6
+ export declare function isCanonicalDocumentPath(path: unknown, extensions: ReadonlySet<string>): path is string;
7
+ export declare function readCorpusFile(root: string, path: string, maxBytes: number): Promise<string | null>;
8
+ export declare function scanCorpusFiles(root: string, extensions: ReadonlySet<string>, maxFileBytes: number, options?: CorpusScanLimits, ownedPaths?: ReadonlySet<string>): Promise<Array<{
9
+ path: string;
10
+ content: string;
11
+ }>>;
12
+ //# sourceMappingURL=corpus-files.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"corpus-files.d.ts","sourceRoot":"","sources":["../src/corpus-files.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,gBAAgB;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAOD,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,IAAI,IAAI,MAAM,CAMtG;AAGD,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAsCzG;AAGD,wBAAsB,eAAe,CACnC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB,EACnG,UAAU,GAAE,WAAW,CAAC,MAAM,CAAa,GAC1C,OAAO,CAAC,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CAiCnD"}
@@ -0,0 +1,114 @@
1
+ import { constants } from 'node:fs';
2
+ import { lstat, open, opendir, realpath } from 'node:fs/promises';
3
+ import { extname, isAbsolute, relative, resolve, sep } from 'node:path';
4
+ function inside(root, target) {
5
+ const path = relative(root, target);
6
+ return path !== '' && path !== '..' && !path.startsWith(`..${sep}`) && !isAbsolute(path);
7
+ }
8
+ export function isCanonicalDocumentPath(path, extensions) {
9
+ if (typeof path !== 'string' || !path || Buffer.byteLength(path) > 1024 || /[\\%:?#]/.test(path) || isAbsolute(path))
10
+ return false;
11
+ if ([...path].some(char => char.charCodeAt(0) < 32 || char.charCodeAt(0) === 127))
12
+ return false;
13
+ if (path.split('/').some((part) => !part || part.startsWith('.') || ['~', 'node_modules', 'dist'].includes(part)))
14
+ return false;
15
+ const extension = extname(path).toLowerCase();
16
+ return !extension || extensions.has(extension);
17
+ }
18
+ export async function readCorpusFile(root, path, maxBytes) {
19
+ if (!Number.isSafeInteger(maxBytes) || maxBytes < 0)
20
+ throw new TypeError('Corpus byte budget must be a non-negative safe integer');
21
+ const target = resolve(root, path);
22
+ if (!inside(root, target))
23
+ return null;
24
+ let current = root;
25
+ for (const component of relative(root, target).split(sep)) {
26
+ current = resolve(current, component);
27
+ try {
28
+ if ((await lstat(current)).isSymbolicLink())
29
+ return null;
30
+ }
31
+ catch (error) {
32
+ if (error.code === 'ENOENT')
33
+ return null;
34
+ throw error;
35
+ }
36
+ }
37
+ const before = await lstat(target);
38
+ if (!before.isFile())
39
+ return null;
40
+ if (before.size > maxBytes)
41
+ throw new RangeError(`Corpus file exceeds ${maxBytes} bytes`);
42
+ const canonical = await realpath(target);
43
+ if (!inside(root, canonical))
44
+ return null;
45
+ const file = await open(canonical, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK);
46
+ try {
47
+ const opened = await file.stat();
48
+ if (!opened.isFile() || opened.dev !== before.dev || opened.ino !== before.ino)
49
+ throw new Error('Corpus file changed before reading');
50
+ const buffer = Buffer.alloc(Math.min(opened.size + 1, maxBytes + 1));
51
+ let offset = 0;
52
+ while (offset < buffer.length) {
53
+ const { bytesRead } = await file.read(buffer, offset, buffer.length - offset, offset);
54
+ if (!bytesRead)
55
+ break;
56
+ offset += bytesRead;
57
+ }
58
+ const after = await file.stat();
59
+ const currentPath = await lstat(target);
60
+ if (offset > maxBytes || after.size > maxBytes)
61
+ throw new RangeError(`Corpus file exceeds ${maxBytes} bytes`);
62
+ if (after.size !== offset || after.mtimeMs !== opened.mtimeMs || after.ctimeMs !== opened.ctimeMs ||
63
+ currentPath.ino !== opened.ino || currentPath.dev !== opened.dev || currentPath.isSymbolicLink() ||
64
+ await realpath(target) !== canonical)
65
+ throw new Error('Corpus file changed while reading');
66
+ return new TextDecoder('utf-8', { fatal: true, ignoreBOM: true }).decode(buffer.subarray(0, offset));
67
+ }
68
+ finally {
69
+ await file.close();
70
+ }
71
+ }
72
+ export async function scanCorpusFiles(root, extensions, maxFileBytes, options = {}, ownedPaths = new Set()) {
73
+ const maxEntries = options.maxEntries ?? 10_000;
74
+ const maxBytes = options.maxBytes ?? 64 * 1024 * 1024;
75
+ const maxDepth = options.maxDepth ?? 32;
76
+ if (!Number.isSafeInteger(maxFileBytes) || maxFileBytes < 1)
77
+ throw new TypeError('Corpus file limit must be a positive safe integer');
78
+ if ([maxEntries, maxDepth].some((value) => !Number.isSafeInteger(value) || value < 1) ||
79
+ !Number.isSafeInteger(maxBytes) || maxBytes < 0) {
80
+ throw new TypeError('Corpus entry/depth limits must be positive and byte budget non-negative safe integers');
81
+ }
82
+ const files = [];
83
+ const directories = [{ path: root, depth: 0 }];
84
+ let entries = 0;
85
+ let bytes = 0;
86
+ while (directories.length) {
87
+ const directory = directories.pop();
88
+ if (directory.depth > maxDepth)
89
+ throw new RangeError(`Corpus directory depth exceeds ${maxDepth}`);
90
+ if (await realpath(directory.path) !== directory.path)
91
+ throw new Error('Corpus directory changed during scan');
92
+ for await (const entry of await opendir(directory.path)) {
93
+ if (++entries > maxEntries)
94
+ throw new RangeError(`Corpus entries exceed ${maxEntries}`);
95
+ if (entry.name.startsWith('.') || ['node_modules', 'dist'].includes(entry.name) || entry.isSymbolicLink())
96
+ continue;
97
+ const target = resolve(directory.path, entry.name);
98
+ if (entry.isDirectory())
99
+ directories.push({ path: target, depth: directory.depth + 1 });
100
+ else if (entry.isFile() && extensions.has(extname(entry.name).toLowerCase())) {
101
+ const path = relative(root, target).split(sep).join('/');
102
+ if (ownedPaths.has(path))
103
+ continue;
104
+ const content = await readCorpusFile(root, path, Math.min(maxFileBytes, maxBytes - bytes));
105
+ if (content === null)
106
+ throw new Error('Corpus file changed during scan');
107
+ bytes += Buffer.byteLength(content);
108
+ files.push({ path, content });
109
+ }
110
+ }
111
+ }
112
+ return files.sort((a, b) => a.path < b.path ? -1 : a.path > b.path ? 1 : 0);
113
+ }
114
+ //# sourceMappingURL=corpus-files.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"corpus-files.js","sourceRoot":"","sources":["../src/corpus-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAQxE,SAAS,MAAM,CAAC,IAAY,EAAE,MAAc;IAC1C,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACpC,OAAO,IAAI,KAAK,EAAE,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAC3F,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,IAAa,EAAE,UAA+B;IACpF,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,C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AAC,CAAC,CAAC;gBAC3F,IAAI,OAAO,KAAK,IAAI;oBAAE,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;gBACzE,KAAK,IAAI,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;gBACpC,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;YAChC,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9E,CAAC"}
@@ -0,0 +1,10 @@
1
+ export { LumenModule } from './lumen.module.js';
2
+ export { LumenService } from './lumen.service.js';
3
+ export { LUMEN_OPTIONS_TOKEN, DEFAULT_DOCS_DIR } from './constants.js';
4
+ export { AccessFilterService, extractDocumentAccess, extractDocumentMetadata, } from './access/access-filter.service.js';
5
+ export { LiveEditService, DEFAULT_MAX_PATCH_BYTES, DEFAULT_MAX_DOCUMENT_BYTES, type DocumentState, type DocumentRevision, } from './live/live-edit.service.js';
6
+ export { lumenAuthoringMigration } from './live/migration.js';
7
+ export type { LumenAuthoringDatabase } from './live/schema.js';
8
+ export { LumenMcpAdapter, type LumenMcpOptions } from './mcp.js';
9
+ export type * from './types.js';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,0BAA0B,EAC1B,KAAK,aAAa,EAClB,KAAK,gBAAgB,GACtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,YAAY,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AACjE,mBAAmB,YAAY,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ export { LumenModule } from './lumen.module.js';
2
+ export { LumenService } from './lumen.service.js';
3
+ export { LUMEN_OPTIONS_TOKEN, DEFAULT_DOCS_DIR } from './constants.js';
4
+ export { AccessFilterService, extractDocumentAccess, extractDocumentMetadata, } from './access/access-filter.service.js';
5
+ export { LiveEditService, DEFAULT_MAX_PATCH_BYTES, DEFAULT_MAX_DOCUMENT_BYTES, } from './live/live-edit.service.js';
6
+ export { lumenAuthoringMigration } from './live/migration.js';
7
+ export { LumenMcpAdapter } from './mcp.js';
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,0BAA0B,GAG3B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,OAAO,EAAE,eAAe,EAAwB,MAAM,UAAU,CAAC"}
@@ -0,0 +1,47 @@
1
+ import { EventEmitter } from 'node:events';
2
+ import { type DatabaseManager } from '@omnitron-dev/titan-database';
3
+ import { AccessFilterService } from '../access/access-filter.service.js';
4
+ import type { LiveEditActor, LiveEditPayload, LiveEditResult, LiveEditServiceOptions } from '../types.js';
5
+ export declare const DEFAULT_MAX_PATCH_BYTES = 262144;
6
+ export declare const DEFAULT_MAX_DOCUMENT_BYTES = 2097152;
7
+ export interface DocumentState {
8
+ docId: string;
9
+ content: string;
10
+ revision: number;
11
+ hash: string;
12
+ updatedAt: number;
13
+ access: string;
14
+ byteLength: number;
15
+ author: string;
16
+ origin: 'disk' | 'created';
17
+ seedHash: string;
18
+ }
19
+ export type DocumentRevision = Omit<DocumentState, 'origin' | 'seedHash'>;
20
+ export declare class LiveEditService extends EventEmitter {
21
+ private readonly database?;
22
+ private readonly options?;
23
+ private readonly maxPatchBytes;
24
+ private readonly maxDocumentBytes;
25
+ private readonly accessFilter;
26
+ constructor(options?: LiveEditServiceOptions, database?: DatabaseManager | undefined, accessFilter?: AccessFilterService);
27
+ isEnabled(): boolean;
28
+ private connection;
29
+ validatePayload(payload: unknown): {
30
+ valid: boolean;
31
+ error?: string;
32
+ };
33
+ private authorize;
34
+ getDocument(docId: string): Promise<DocumentState | undefined>;
35
+ readCorpus(limits?: {
36
+ maxEntries?: number;
37
+ maxBytes?: number;
38
+ }): Promise<DocumentState[]>;
39
+ getHistory(docId: string, actor: LiveEditActor, options?: {
40
+ beforeRevision?: number;
41
+ limit?: number;
42
+ maxBytes?: number;
43
+ }): Promise<DocumentRevision[]>;
44
+ private conflict;
45
+ applyEdit(payload: LiveEditPayload, actor: LiveEditActor, initialContent?: string): Promise<LiveEditResult>;
46
+ }
47
+ //# sourceMappingURL=live-edit.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file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