@moldea.ai/adapter-eve 1.0.0 → 1.0.1
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/README.md +1 -1
- package/dist/index.js +37 -23
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ const core = createCore({ adapters: [eveAdapter] });
|
|
|
19
19
|
|
|
20
20
|
## Verified target
|
|
21
21
|
|
|
22
|
-
Version `1.0.
|
|
22
|
+
Version `1.0.1` supports Repository Format `1` and direct TypeScript Eve filesystem agents using `eve >=0.39.1 <0.40.0`. The experimental target recognizes:
|
|
23
23
|
|
|
24
24
|
- flat and nested root `agent.ts` definitions
|
|
25
25
|
- recursive directory-backed local subagents
|
package/dist/index.js
CHANGED
|
@@ -417,14 +417,8 @@ var classifyPackageDeclarations = (declarations, supportedRange) => {
|
|
|
417
417
|
if (classifications.every((classification) => classification === "unsupported")) return "unsupported";
|
|
418
418
|
return "ambiguous";
|
|
419
419
|
};
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
* @param options The package target, repository callbacks, path, range, and signal.
|
|
423
|
-
* @returns The first observed declaration, invalid manifest, or absence result.
|
|
424
|
-
* @throws If repository reading or the active inspection is aborted.
|
|
425
|
-
*/
|
|
426
|
-
var discoverPackage = async (options) => {
|
|
427
|
-
const { includeManifestPackageName, packageName, reader, signal, sourcePath, supportedRange } = options;
|
|
420
|
+
var readOwningManifest = async (options) => {
|
|
421
|
+
const { reader, signal, sourcePath } = options;
|
|
428
422
|
for (const manifestPath of createPackageManifestCandidatePaths(sourcePath)) {
|
|
429
423
|
signal?.throwIfAborted();
|
|
430
424
|
const entry = await reader.getEntry(manifestPath);
|
|
@@ -452,29 +446,48 @@ var discoverPackage = async (options) => {
|
|
|
452
446
|
});
|
|
453
447
|
}
|
|
454
448
|
signal?.throwIfAborted();
|
|
455
|
-
|
|
456
|
-
kind: "
|
|
449
|
+
return isRecord(parsed) ? Object.freeze({
|
|
450
|
+
kind: "present",
|
|
451
|
+
manifest: parsed,
|
|
457
452
|
path: manifestPath
|
|
458
|
-
})
|
|
459
|
-
const declarations = extractPackageDeclarations(parsed, packageName);
|
|
460
|
-
if (declarations === null) return Object.freeze({
|
|
453
|
+
}) : Object.freeze({
|
|
461
454
|
kind: "invalid",
|
|
462
455
|
path: manifestPath
|
|
463
456
|
});
|
|
464
|
-
if (declarations.length === 0) return Object.freeze({ kind: "absent" });
|
|
465
|
-
return Object.freeze({
|
|
466
|
-
kind: "observed",
|
|
467
|
-
observation: Object.freeze({
|
|
468
|
-
compatibility: classifyPackageDeclarations(declarations, supportedRange),
|
|
469
|
-
declarations: Object.freeze(declarations),
|
|
470
|
-
...includeManifestPackageName === true ? { manifestPackageName: typeof parsed["name"] === "string" ? parsed["name"] : null } : {},
|
|
471
|
-
path: manifestPath
|
|
472
|
-
})
|
|
473
|
-
});
|
|
474
457
|
}
|
|
475
458
|
return Object.freeze({ kind: "absent" });
|
|
476
459
|
};
|
|
477
460
|
/**
|
|
461
|
+
* Discovers the nearest package declaration without repository enumeration.
|
|
462
|
+
* @param options The package target, repository callbacks, path, range, and signal.
|
|
463
|
+
* @returns The first observed declaration, invalid manifest, or absence result.
|
|
464
|
+
* @throws If repository reading or the active inspection is aborted.
|
|
465
|
+
*/
|
|
466
|
+
var discoverPackage = async (options) => {
|
|
467
|
+
const { includeManifestPackageName, packageName, reader, signal, sourcePath, supportedRange } = options;
|
|
468
|
+
const owningManifest = await readOwningManifest({
|
|
469
|
+
reader,
|
|
470
|
+
...signal === void 0 ? {} : { signal },
|
|
471
|
+
sourcePath
|
|
472
|
+
});
|
|
473
|
+
if (owningManifest.kind !== "present") return owningManifest;
|
|
474
|
+
const declarations = extractPackageDeclarations(owningManifest.manifest, packageName);
|
|
475
|
+
if (declarations === null) return Object.freeze({
|
|
476
|
+
kind: "invalid",
|
|
477
|
+
path: owningManifest.path
|
|
478
|
+
});
|
|
479
|
+
if (declarations.length === 0) return Object.freeze({ kind: "absent" });
|
|
480
|
+
return Object.freeze({
|
|
481
|
+
kind: "observed",
|
|
482
|
+
observation: Object.freeze({
|
|
483
|
+
compatibility: classifyPackageDeclarations(declarations, supportedRange),
|
|
484
|
+
declarations: Object.freeze(declarations),
|
|
485
|
+
...includeManifestPackageName === true ? { manifestPackageName: typeof owningManifest.manifest["name"] === "string" ? owningManifest.manifest["name"] : null } : {},
|
|
486
|
+
path: owningManifest.path
|
|
487
|
+
})
|
|
488
|
+
});
|
|
489
|
+
};
|
|
490
|
+
/**
|
|
478
491
|
* Removes the transparent expression wrappers supported by runtime adapters.
|
|
479
492
|
* @param expression The expression to normalize.
|
|
480
493
|
* @returns The underlying expression used by static matching.
|
|
@@ -829,6 +842,7 @@ var resolveStaticStringExpression = async (options, analysis, expression, visite
|
|
|
829
842
|
visited.add(key);
|
|
830
843
|
const importedResult = await options.analyzeSource(importedPath);
|
|
831
844
|
if (importedResult.kind !== "valid") {
|
|
845
|
+
options.onSourceFailure?.(importedPath, importedResult);
|
|
832
846
|
visited.delete(key);
|
|
833
847
|
return Object.freeze({ kind: "unsupported" });
|
|
834
848
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moldea.ai/adapter-eve",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Deterministic runtime evidence and diagnostics for Eve filesystem agents.",
|
|
5
5
|
"homepage": "https://github.com/moldea-ai/packages/tree/main/projects/adapter-eve#readme",
|
|
6
6
|
"bugs": {
|