@impetik/xeer-mcp 0.2.7 → 0.2.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@impetik/xeer-mcp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Model Context Protocol server for Xeer: the scaffold, check, dev, build, and deploy loop as agent tools.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
49
49
|
"zod": "^4.0.10",
|
|
50
|
-
"@impetik/xeer": "0.2.
|
|
50
|
+
"@impetik/xeer": "0.2.8"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/node": "^24.1.0"
|
|
@@ -145,9 +145,9 @@ export const DIAGNOSTIC_DEFINITIONS = [
|
|
|
145
145
|
+ 'reaches the opposite entrypoint, or the module is reachable from both graphs while living outside '
|
|
146
146
|
+ 'src/shared/.', 'Keep imports relative and inside the project. Move genuinely shared code to src/shared/ and update '
|
|
147
147
|
+ 'both importers; never import one entrypoint from the other.', CHECKED_BY_EVERY_COMPILE),
|
|
148
|
-
define('XE1202', 'A package import is not on the allowlist for that zone.', 'The client zone may import @impetik/xeer/client, /shared, the JSX runtimes, and
|
|
149
|
-
+ 'zone may import @impetik/xeer/server and /shared. Node builtins are never
|
|
150
|
-
+ 'to the zone that owns it instead of widening the import.', CHECKED_BY_EVERY_COMPILE),
|
|
148
|
+
define('XE1202', 'A package import is not on the allowlist for that zone.', 'The client zone may import @impetik/xeer/client, /client/core, /shared, the JSX runtimes, and '
|
|
149
|
+
+ 'preact; the server zone may import @impetik/xeer/server and /shared. Node builtins are never '
|
|
150
|
+
+ 'importable. Move the code to the zone that owns it instead of widening the import.', CHECKED_BY_EVERY_COMPILE),
|
|
151
151
|
define('XE1203', 'A dynamic import() specifier is not a string literal.', 'Use a literal specifier so the module graph stays statically knowable, or a static import.', CHECKED_BY_EVERY_COMPILE),
|
|
152
152
|
define('XE1204', 'A relative source import does not resolve to a file.', 'Write the specifier without an extension, or with the file\'s real one: the resolver appends '
|
|
153
153
|
+ 'candidate extensions rather than rewriting them, so ./shared/title.js does not find '
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const INVALIDATION_PROTOCOL: "xeer.invalidation.v1";
|
|
2
|
+
export interface InvalidationCursor {
|
|
3
|
+
readonly instance: string;
|
|
4
|
+
readonly revision: number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Metadata shared by mutation RPC responses, BroadcastChannel messages, and live frames.
|
|
8
|
+
* `fromRevision` is inclusive; when present, `tables` is the union of every committed write
|
|
9
|
+
* from that revision through `cursor.revision`.
|
|
10
|
+
*/
|
|
11
|
+
export interface InvalidationEnvelope {
|
|
12
|
+
readonly protocol: typeof INVALIDATION_PROTOCOL;
|
|
13
|
+
readonly scope: string;
|
|
14
|
+
readonly cursor: InvalidationCursor;
|
|
15
|
+
readonly fromRevision?: number;
|
|
16
|
+
readonly tables?: readonly string[];
|
|
17
|
+
}
|
|
18
|
+
export declare function invalidationCursor(value: unknown): InvalidationCursor | undefined;
|
|
19
|
+
export declare function invalidationEnvelope(value: unknown): InvalidationEnvelope | undefined;
|
|
20
|
+
export declare function cursorSatisfies(snapshot: InvalidationCursor | undefined, required: InvalidationCursor): boolean;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export const INVALIDATION_PROTOCOL = 'xeer.invalidation.v1';
|
|
2
|
+
export function invalidationCursor(value) {
|
|
3
|
+
if (!value || typeof value !== 'object')
|
|
4
|
+
return undefined;
|
|
5
|
+
const candidate = value;
|
|
6
|
+
if (typeof candidate.instance !== 'string' || candidate.instance.length === 0
|
|
7
|
+
|| !Number.isSafeInteger(candidate.revision) || candidate.revision < 0)
|
|
8
|
+
return undefined;
|
|
9
|
+
return { instance: candidate.instance, revision: candidate.revision };
|
|
10
|
+
}
|
|
11
|
+
export function invalidationEnvelope(value) {
|
|
12
|
+
if (!value || typeof value !== 'object')
|
|
13
|
+
return undefined;
|
|
14
|
+
const candidate = value;
|
|
15
|
+
if (candidate.protocol !== INVALIDATION_PROTOCOL || typeof candidate.scope !== 'string')
|
|
16
|
+
return undefined;
|
|
17
|
+
const cursor = invalidationCursor(candidate.cursor);
|
|
18
|
+
if (!cursor)
|
|
19
|
+
return undefined;
|
|
20
|
+
const fromRevision = candidate.fromRevision === undefined
|
|
21
|
+
? undefined
|
|
22
|
+
: Number.isSafeInteger(candidate.fromRevision) && candidate.fromRevision > 0
|
|
23
|
+
? candidate.fromRevision
|
|
24
|
+
: undefined;
|
|
25
|
+
if (candidate.fromRevision !== undefined && fromRevision === undefined)
|
|
26
|
+
return undefined;
|
|
27
|
+
if (fromRevision !== undefined && fromRevision > cursor.revision)
|
|
28
|
+
return undefined;
|
|
29
|
+
const tables = candidate.tables === undefined
|
|
30
|
+
? undefined
|
|
31
|
+
: Array.isArray(candidate.tables) && candidate.tables.every((table) => typeof table === 'string')
|
|
32
|
+
? candidate.tables
|
|
33
|
+
: undefined;
|
|
34
|
+
if (candidate.tables !== undefined && tables === undefined)
|
|
35
|
+
return undefined;
|
|
36
|
+
return {
|
|
37
|
+
protocol: INVALIDATION_PROTOCOL,
|
|
38
|
+
scope: candidate.scope,
|
|
39
|
+
cursor,
|
|
40
|
+
...(fromRevision === undefined ? {} : { fromRevision }),
|
|
41
|
+
...(tables === undefined ? {} : { tables }),
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export function cursorSatisfies(snapshot, required) {
|
|
45
|
+
if (!snapshot)
|
|
46
|
+
return false;
|
|
47
|
+
return snapshot.instance !== required.instance || snapshot.revision >= required.revision;
|
|
48
|
+
}
|