@cleocode/lafs-protocol 1.3.1 → 1.3.2
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/src/discovery.js +9 -1
- package/dist/src/health/index.js +10 -1
- package/dist/src/types.d.ts +2 -1
- package/package.json +2 -1
package/dist/src/discovery.js
CHANGED
|
@@ -10,6 +10,14 @@ import { createRequire } from "node:module";
|
|
|
10
10
|
import { createHash } from "crypto";
|
|
11
11
|
import { buildLafsExtension } from './a2a/extensions.js';
|
|
12
12
|
const require = createRequire(import.meta.url);
|
|
13
|
+
// Resolve package.json from project root (works from both src/ and dist/src/)
|
|
14
|
+
let pkg;
|
|
15
|
+
try {
|
|
16
|
+
pkg = require('../package.json');
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
pkg = require('../../package.json');
|
|
20
|
+
}
|
|
13
21
|
// ============================================================================
|
|
14
22
|
// Utility Functions
|
|
15
23
|
// ============================================================================
|
|
@@ -102,7 +110,7 @@ function buildAgentCard(config, req) {
|
|
|
102
110
|
*/
|
|
103
111
|
function buildLegacyDiscoveryDocument(config, req) {
|
|
104
112
|
const schemaUrl = config.schemaUrl || "https://lafs.dev/schemas/v1/discovery.schema.json";
|
|
105
|
-
const lafsVersion = config.lafsVersion ||
|
|
113
|
+
const lafsVersion = config.lafsVersion || pkg.version;
|
|
106
114
|
return {
|
|
107
115
|
$schema: schemaUrl,
|
|
108
116
|
lafs_version: lafsVersion,
|
package/dist/src/health/index.js
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Provides health check endpoints for monitoring and orchestration
|
|
5
5
|
*/
|
|
6
|
+
import { createRequire } from 'node:module';
|
|
7
|
+
const require = createRequire(import.meta.url);
|
|
8
|
+
let pkg;
|
|
9
|
+
try {
|
|
10
|
+
pkg = require('../../package.json');
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
pkg = require('../../../package.json');
|
|
14
|
+
}
|
|
6
15
|
/**
|
|
7
16
|
* Health check middleware for Express applications
|
|
8
17
|
*
|
|
@@ -70,7 +79,7 @@ export function healthCheck(config = {}) {
|
|
|
70
79
|
const health = {
|
|
71
80
|
status,
|
|
72
81
|
timestamp,
|
|
73
|
-
version:
|
|
82
|
+
version: pkg.version,
|
|
74
83
|
uptime: Math.floor((Date.now() - startTime) / 1000),
|
|
75
84
|
checks: checkResults
|
|
76
85
|
};
|
package/dist/src/types.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export interface Warning {
|
|
|
7
7
|
replacement?: string;
|
|
8
8
|
removeBy?: string;
|
|
9
9
|
}
|
|
10
|
+
export type MVILevel = 'minimal' | 'standard' | 'full' | 'custom';
|
|
10
11
|
export interface LAFSMeta {
|
|
11
12
|
specVersion: string;
|
|
12
13
|
schemaVersion: string;
|
|
@@ -15,7 +16,7 @@ export interface LAFSMeta {
|
|
|
15
16
|
requestId: string;
|
|
16
17
|
transport: LAFSTransport;
|
|
17
18
|
strict: boolean;
|
|
18
|
-
mvi:
|
|
19
|
+
mvi: MVILevel;
|
|
19
20
|
contextVersion: number;
|
|
20
21
|
/** Session identifier for correlating multi-step agent workflows */
|
|
21
22
|
sessionId?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cleocode/lafs-protocol",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "LLM-Agent-First Specification schemas and conformance tooling",
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"lafs-conformance": "dist/src/cli.js"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
49
|
+
"version": "node scripts/sync-version.mjs",
|
|
49
50
|
"build": "rm -rf dist && tsc -p tsconfig.build.json",
|
|
50
51
|
"prepack": "npm run build",
|
|
51
52
|
"typecheck": "tsc --noEmit",
|