@moldea.ai/adapter-eve 1.0.4 → 2.0.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/README.md +1 -1
- package/dist/contracts/index.d.ts +6 -5
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/index.js +34 -14
- package/dist/inspection/agent-inspection.d.ts +3 -3
- package/dist/inspection/agent-inspection.d.ts.map +1 -1
- package/dist/inspection/inspection.d.ts.map +1 -1
- package/dist/inspection/instruction-inspection.d.ts +1 -2
- package/dist/inspection/instruction-inspection.d.ts.map +1 -1
- package/dist/inspection/package-inspection.d.ts +3 -4
- package/dist/inspection/package-inspection.d.ts.map +1 -1
- package/dist/inspection/session.d.ts +1 -1
- package/dist/inspection/session.d.ts.map +1 -1
- package/dist/inspection/subagent-inspection.d.ts +2 -1
- package/dist/inspection/subagent-inspection.d.ts.map +1 -1
- package/dist/package-discovery/index.d.ts +3 -2
- package/dist/package-discovery/index.d.ts.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ const core = createCore({ adapters: [eveAdapter] });
|
|
|
19
19
|
|
|
20
20
|
## Verified target
|
|
21
21
|
|
|
22
|
-
Version `
|
|
22
|
+
Version `2.0.0` supports Repository Format `1`, `@moldea.ai/core >=3.0.0 <4.0.0`, and direct TypeScript Eve filesystem agents using `eve >=0.39.1 <0.40.0`. The verified target recognizes:
|
|
23
23
|
|
|
24
24
|
- flat and nested root `agent.ts` definitions
|
|
25
25
|
- recursive directory-backed local subagents
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type ts from 'typescript';
|
|
2
2
|
import type { IStaticAnalysisModuleValueSource, IStaticAnalysisPackageCompatibility, IStaticAnalysisPackageDeclaration, IStaticAnalysisSourceResult } from '@moldea.ai/adapter-static-analysis';
|
|
3
|
-
import type {
|
|
4
|
-
import type { IAdapterDiagnostic } from '@moldea.ai/core/adapter';
|
|
5
|
-
import type { IRepositoryEntry, IRepositoryPath
|
|
3
|
+
import type { ISourceRange } from '@moldea.ai/core';
|
|
4
|
+
import type { IAdapterDiagnostic, IIndexedAgent, IRuntimeAdapterEvidence, IRuntimeAdapterRepository } from '@moldea.ai/core/adapter';
|
|
5
|
+
import type { IRepositoryEntry, IRepositoryPath } from '@moldea.ai/repository';
|
|
6
6
|
export type IEveAdapterDiagnosticCode = 'EVE_PACKAGE_MANIFEST_INVALID' | 'EVE_SDK_VERSION_UNSUPPORTED' | 'EVE_SOURCE_TEXT_INVALID' | 'EVE_SOURCE_SYNTAX_INVALID' | 'EVE_RUNTIME_AGENT_SYMBOL_NOT_FOUND' | 'EVE_INSTRUCTION_LOADER_SYMBOL_NOT_FOUND' | 'EVE_AGENT_OUTPUT_SCHEMA_SYMBOL_NOT_FOUND' | 'EVE_TOOL_IMPLEMENTATION_SYMBOL_NOT_FOUND' | 'EVE_TOOL_REGISTRATION_SYMBOL_NOT_FOUND' | 'EVE_TOOL_INPUT_SCHEMA_SYMBOL_NOT_FOUND' | 'EVE_TOOL_OUTPUT_SCHEMA_SYMBOL_NOT_FOUND' | 'EVE_SKILL_IMPLEMENTATION_SYMBOL_NOT_FOUND' | 'EVE_SKILL_REGISTRATION_SYMBOL_NOT_FOUND' | 'EVE_INSTRUCTION_ROOT_CONFLICT' | 'EVE_INSTRUCTION_LOADER_NOT_WIRED' | 'EVE_AGENT_OUTPUT_SCHEMA_NOT_WIRED' | 'EVE_TOOL_IMPLEMENTATION_NOT_WIRED' | 'EVE_TOOL_REGISTRATION_NOT_WIRED' | 'EVE_TOOL_NAME_INVALID' | 'EVE_TOOL_NAME_RESERVED' | 'EVE_TOOL_RUNTIME_NAME_COLLISION' | 'EVE_TOOL_NAME_MISMATCH' | 'EVE_TOOL_INPUT_SCHEMA_NOT_WIRED' | 'EVE_TOOL_OUTPUT_SCHEMA_NOT_WIRED' | 'EVE_SKILL_IMPLEMENTATION_NOT_WIRED' | 'EVE_SKILL_REGISTRATION_NOT_WIRED' | 'EVE_SKILL_NAME_MISMATCH' | 'EVE_TOOL_SUBAGENT_NAME_COLLISION' | 'EVE_SUBAGENT_PARENT_AMBIGUOUS' | 'EVE_ROUTING_DESCRIPTION_MISSING' | 'EVE_ROUTING_DESCRIPTION_NOT_WIRED';
|
|
7
7
|
export type IEveDiagnosticInput = Omit<IAdapterDiagnostic, 'message' | 'source'> & {
|
|
8
8
|
readonly code: IEveAdapterDiagnosticCode;
|
|
@@ -90,8 +90,9 @@ export interface IEveAgentRootIndex {
|
|
|
90
90
|
readonly subagentCandidates: readonly IEveSubagentCandidate[];
|
|
91
91
|
readonly toolCandidates: readonly IEveToolCandidate[];
|
|
92
92
|
}
|
|
93
|
+
export type IEveScopedAgent = Pick<IIndexedAgent, 'declaration' | 'description' | 'handoffDescription' | 'id'>;
|
|
93
94
|
export interface IEveInspectionSession {
|
|
94
|
-
readonly reader:
|
|
95
|
+
readonly reader: IRuntimeAdapterRepository;
|
|
95
96
|
readonly signal?: AbortSignal;
|
|
96
97
|
analyzeSource(path: IRepositoryPath): Promise<IEveSourceAnalysisResult>;
|
|
97
98
|
discoverPackage(path: IRepositoryPath): Promise<IEvePackageDiscoveryResult>;
|
|
@@ -99,7 +100,7 @@ export interface IEveInspectionSession {
|
|
|
99
100
|
indexAgentRoot(path: IRepositoryPath): Promise<IEveAgentRootIndex>;
|
|
100
101
|
}
|
|
101
102
|
export interface IEveAgentDefinition {
|
|
102
|
-
readonly agent:
|
|
103
|
+
readonly agent: IEveScopedAgent;
|
|
103
104
|
readonly analysis: IEveSourceAnalysis;
|
|
104
105
|
readonly definition: Extract<IEveDefinitionResult, {
|
|
105
106
|
readonly kind: 'present-supported';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,EACV,gCAAgC,EAChC,mCAAmC,EACnC,iCAAiC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-2,6 +2,7 @@ import ts from "typescript";
|
|
|
2
2
|
import { posix } from "node:path";
|
|
3
3
|
import { parseRepositoryPath } from "@moldea.ai/repository";
|
|
4
4
|
import { intersects, subset, validRange } from "semver";
|
|
5
|
+
import { iterateRuntimeAdapterEntries, readRuntimeAdapterFile } from "@moldea.ai/core/adapter";
|
|
5
6
|
//#region src/constants/index.ts
|
|
6
7
|
var EVE_SUPPORTED_PACKAGE_RANGE = ">=0.39.1 <0.40.0";
|
|
7
8
|
var EVE_TARGET_ID = "typescript-filesystem-agent-0-39";
|
|
@@ -1353,7 +1354,7 @@ var addInstructionConflicts = (diagnostics, agentId, candidates) => {
|
|
|
1353
1354
|
var inspectMarkdown = async (session, definition, path, evidence, diagnostics) => {
|
|
1354
1355
|
const binding = definition.agent.declaration.bindings?.instructionLoader;
|
|
1355
1356
|
if (binding === void 0) return;
|
|
1356
|
-
if (!normalizeText(await session.reader
|
|
1357
|
+
if (!normalizeText(await readRuntimeAdapterFile(session.reader, path, session.signal === void 0 ? void 0 : { signal: session.signal })).valid) {
|
|
1357
1358
|
addEveDiagnostic(diagnostics, "EVE_SOURCE_TEXT_INVALID", path, definition.agent.id);
|
|
1358
1359
|
return;
|
|
1359
1360
|
}
|
|
@@ -1436,7 +1437,7 @@ var discoverEvePackage = async (reader, sourcePath, signal) => {
|
|
|
1436
1437
|
packageName: "eve",
|
|
1437
1438
|
reader: {
|
|
1438
1439
|
getEntry: (path) => reader.getEntry(path, signal === void 0 ? void 0 : { signal }),
|
|
1439
|
-
readFile: (path) => reader
|
|
1440
|
+
readFile: (path) => readRuntimeAdapterFile(reader, path, signal === void 0 ? void 0 : { signal })
|
|
1440
1441
|
},
|
|
1441
1442
|
...signal === void 0 ? {} : { signal },
|
|
1442
1443
|
sourcePath,
|
|
@@ -1460,7 +1461,7 @@ var createEveInspectionSession = (context) => {
|
|
|
1460
1461
|
analyzeSource: analyzeEveSource,
|
|
1461
1462
|
discoverPackage: (path, signal) => discoverEvePackage(context.repository, path, signal),
|
|
1462
1463
|
getEntry: (path, signal) => context.repository.getEntry(path, signal === void 0 ? void 0 : { signal }),
|
|
1463
|
-
readFile: (path, signal) => context.repository
|
|
1464
|
+
readFile: (path, signal) => readRuntimeAdapterFile(context.repository, path, signal === void 0 ? void 0 : { signal }),
|
|
1464
1465
|
...context.signal === void 0 ? {} : { signal: context.signal }
|
|
1465
1466
|
});
|
|
1466
1467
|
const rootCache = /* @__PURE__ */ new Map();
|
|
@@ -1470,7 +1471,7 @@ var createEveInspectionSession = (context) => {
|
|
|
1470
1471
|
if (existing !== void 0) return existing;
|
|
1471
1472
|
const indexed = (async () => {
|
|
1472
1473
|
const entries = [];
|
|
1473
|
-
for await (const entry of context.repository
|
|
1474
|
+
for await (const entry of iterateRuntimeAdapterEntries(context.repository, {
|
|
1474
1475
|
prefix: path,
|
|
1475
1476
|
...context.signal === void 0 ? {} : { signal: context.signal }
|
|
1476
1477
|
})) {
|
|
@@ -1574,12 +1575,17 @@ var inspectEveSkills = async (session, definition, evidence, diagnostics) => {
|
|
|
1574
1575
|
//#endregion
|
|
1575
1576
|
//#region src/inspection/subagent-inspection.ts
|
|
1576
1577
|
/** Inspects exact immediate directory-backed local-subagent registrations. */
|
|
1577
|
-
var inspectEveSubagents = (definitions, preparedToolNames, evidence, diagnostics) => {
|
|
1578
|
+
var inspectEveSubagents = (definitions, preparedToolNames, ambiguousParentRoots, evidence, diagnostics) => {
|
|
1578
1579
|
for (const target of definitions) {
|
|
1579
1580
|
if (target.root.agentKind !== "local-subagent" || target.root.parentRoot === null || target.root.runtimeName === null) continue;
|
|
1581
|
+
const ambiguousParentCount = ambiguousParentRoots.get(target.root.parentRoot);
|
|
1582
|
+
if (ambiguousParentCount !== void 0) {
|
|
1583
|
+
addEveDiagnostic(diagnostics, "EVE_SUBAGENT_PARENT_AMBIGUOUS", target.agent.declaration.bindings?.runtimeAgent?.path ?? null, target.agent.id, null, void 0, void 0, { candidateCount: ambiguousParentCount });
|
|
1584
|
+
continue;
|
|
1585
|
+
}
|
|
1580
1586
|
const parents = definitions.filter(({ root }) => root.agentRoot === target.root.parentRoot).sort((left, right) => compareEveStrings(left.agent.id, right.agent.id));
|
|
1581
1587
|
if (parents.length > 1) {
|
|
1582
|
-
addEveDiagnostic(diagnostics, "EVE_SUBAGENT_PARENT_AMBIGUOUS", target.agent.declaration.bindings?.runtimeAgent?.path ?? null, target.agent.id, null, void 0, void 0, {
|
|
1588
|
+
addEveDiagnostic(diagnostics, "EVE_SUBAGENT_PARENT_AMBIGUOUS", target.agent.declaration.bindings?.runtimeAgent?.path ?? null, target.agent.id, null, void 0, void 0, { candidateCount: parents.length });
|
|
1583
1589
|
continue;
|
|
1584
1590
|
}
|
|
1585
1591
|
const parent = parents[0];
|
|
@@ -1814,21 +1820,35 @@ var inspectEve = async (context) => {
|
|
|
1814
1820
|
const evidence = [];
|
|
1815
1821
|
const diagnostics = [];
|
|
1816
1822
|
const definitions = [];
|
|
1817
|
-
const
|
|
1818
|
-
|
|
1819
|
-
context.signal?.throwIfAborted();
|
|
1820
|
-
const definition = await inspectEveAgent(session, agent, evidence, diagnostics);
|
|
1821
|
-
if (definition !== null) definitions.push(definition);
|
|
1822
|
-
}
|
|
1823
|
+
const definition = await inspectEveAgent(session, context.agent, evidence, diagnostics);
|
|
1824
|
+
if (definition !== null) definitions.push(definition);
|
|
1823
1825
|
const preparedToolNames = /* @__PURE__ */ new Map();
|
|
1824
|
-
|
|
1826
|
+
if (definition !== null) {
|
|
1825
1827
|
context.signal?.throwIfAborted();
|
|
1826
1828
|
await inspectEveInstructions(session, definition, evidence, diagnostics);
|
|
1827
1829
|
preparedToolNames.set(definition.agent.id, await inspectEveTools(session, definition, evidence, diagnostics));
|
|
1828
1830
|
await inspectEveSkills(session, definition, evidence, diagnostics);
|
|
1829
1831
|
}
|
|
1832
|
+
const ambiguousParentRoots = /* @__PURE__ */ new Map();
|
|
1833
|
+
if (definition?.root.agentKind === "root") {
|
|
1834
|
+
const runtimeAgent = definition.agent.declaration.bindings?.runtimeAgent;
|
|
1835
|
+
if (runtimeAgent !== void 0) {
|
|
1836
|
+
const parentResolution = context.resolveAgent(runtimeAgent);
|
|
1837
|
+
if (parentResolution.kind === "ambiguous") ambiguousParentRoots.set(definition.root.agentRoot, parentResolution.candidateCount);
|
|
1838
|
+
}
|
|
1839
|
+
for (const candidate of definition.rootIndex.subagentCandidates) {
|
|
1840
|
+
if (!candidate.isDirectoryBacked || candidate.isExtensionReserved) continue;
|
|
1841
|
+
const resolution = context.resolveAgent({
|
|
1842
|
+
path: candidate.agentPath,
|
|
1843
|
+
symbol: "default"
|
|
1844
|
+
});
|
|
1845
|
+
if (resolution.kind !== "matched" || resolution.agent.id === definition.agent.id) continue;
|
|
1846
|
+
const relatedDefinition = await inspectEveAgent(session, resolution.agent, [], []);
|
|
1847
|
+
if (relatedDefinition !== null) definitions.push(relatedDefinition);
|
|
1848
|
+
}
|
|
1849
|
+
}
|
|
1830
1850
|
context.signal?.throwIfAborted();
|
|
1831
|
-
inspectEveSubagents(definitions, preparedToolNames, evidence, diagnostics);
|
|
1851
|
+
inspectEveSubagents(definitions, preparedToolNames, ambiguousParentRoots, evidence, diagnostics);
|
|
1832
1852
|
return Object.freeze({
|
|
1833
1853
|
diagnostics: Object.freeze(diagnostics),
|
|
1834
1854
|
evidence: Object.freeze(evidence)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IRuntimeAdapterEvidence } from '@moldea.ai/core/adapter';
|
|
2
2
|
import type { IAdapterDiagnostic } from '@moldea.ai/core/adapter';
|
|
3
|
-
import type { IEveAgentDefinition, IEveInspectionSession } from '../contracts/index.js';
|
|
3
|
+
import type { IEveAgentDefinition, IEveInspectionSession, IEveScopedAgent } from '../contracts/index.js';
|
|
4
4
|
/** Inspects one exact manifest-bound Eve agent definition and its output schema. */
|
|
5
|
-
export declare const inspectEveAgent: (session: IEveInspectionSession, agent:
|
|
5
|
+
export declare const inspectEveAgent: (session: IEveInspectionSession, agent: IEveScopedAgent, evidence: IRuntimeAdapterEvidence[], diagnostics: IAdapterDiagnostic[]) => Promise<IEveAgentDefinition | null>;
|
|
6
6
|
//# sourceMappingURL=agent-inspection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-inspection.d.ts","sourceRoot":"","sources":["../../src/inspection/agent-inspection.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"agent-inspection.d.ts","sourceRoot":"","sources":["../../src/inspection/agent-inspection.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAGlE,OAAO,KAAK,EACV,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EAChB,MAAM,uBAAuB,CAAC;AAkB/B,oFAAoF;AACpF,eAAO,MAAM,eAAe,GAC1B,SAAS,qBAAqB,EAC9B,OAAO,eAAe,EACtB,UAAU,uBAAuB,EAAE,EACnC,aAAa,kBAAkB,EAAE,KAChC,OAAO,CAAC,mBAAmB,GAAG,IAAI,CA0LpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspection.d.ts","sourceRoot":"","sources":["../../src/inspection/inspection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"inspection.d.ts","sourceRoot":"","sources":["../../src/inspection/inspection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,sBAAsB,EAEtB,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AAWjC;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,UAAU,GACrB,SAAS,sBAAsB,KAC9B,OAAO,CAAC,qBAAqB,CA+D/B,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { IAdapterDiagnostic } from '@moldea.ai/core/adapter';
|
|
1
|
+
import { type IAdapterDiagnostic, type IRuntimeAdapterEvidence } from '@moldea.ai/core/adapter';
|
|
3
2
|
import type { IEveAgentDefinition, IEveInspectionSession } from '../contracts/index.js';
|
|
4
3
|
/** Inspects the exclusive modern instruction surface for one supported Eve agent. */
|
|
5
4
|
export declare const inspectEveInstructions: (session: IEveInspectionSession, definition: IEveAgentDefinition, evidence: IRuntimeAdapterEvidence[], diagnostics: IAdapterDiagnostic[]) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instruction-inspection.d.ts","sourceRoot":"","sources":["../../src/inspection/instruction-inspection.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"instruction-inspection.d.ts","sourceRoot":"","sources":["../../src/inspection/instruction-inspection.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC7B,MAAM,yBAAyB,CAAC;AAIjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAkLxF,qFAAqF;AACrF,eAAO,MAAM,sBAAsB,GACjC,SAAS,qBAAqB,EAC9B,YAAY,mBAAmB,EAC/B,UAAU,uBAAuB,EAAE,EACnC,aAAa,kBAAkB,EAAE,KAChC,OAAO,CAAC,IAAI,CAwEd,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { IAdapterDiagnostic } from '@moldea.ai/core/adapter';
|
|
1
|
+
import type { IAdapterDiagnostic, IRuntimeAdapterEvidence } from '@moldea.ai/core/adapter';
|
|
3
2
|
import type { IRepositoryPath } from '@moldea.ai/repository';
|
|
4
|
-
import type { IEveInspectionSession, IEvePackageObservation } from '../contracts/index.js';
|
|
3
|
+
import type { IEveInspectionSession, IEvePackageObservation, IEveScopedAgent } from '../contracts/index.js';
|
|
5
4
|
/** Inspects one scoped agent's nearest Eve package declaration. */
|
|
6
|
-
export declare const inspectEvePackage: (session: IEveInspectionSession, agent:
|
|
5
|
+
export declare const inspectEvePackage: (session: IEveInspectionSession, agent: IEveScopedAgent, sourcePath: IRepositoryPath, evidence: IRuntimeAdapterEvidence[], diagnostics: IAdapterDiagnostic[]) => Promise<IEvePackageObservation | null>;
|
|
7
6
|
//# sourceMappingURL=package-inspection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-inspection.d.ts","sourceRoot":"","sources":["../../src/inspection/package-inspection.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"package-inspection.d.ts","sourceRoot":"","sources":["../../src/inspection/package-inspection.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAC3F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAG7D,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACtB,eAAe,EAChB,MAAM,uBAAuB,CAAC;AAG/B,mEAAmE;AACnE,eAAO,MAAM,iBAAiB,GAC5B,SAAS,qBAAqB,EAC9B,OAAO,eAAe,EACtB,YAAY,eAAe,EAC3B,UAAU,uBAAuB,EAAE,EACnC,aAAa,kBAAkB,EAAE,KAChC,OAAO,CAAC,sBAAsB,GAAG,IAAI,CA8CvC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type IRuntimeAdapterContext } from '@moldea.ai/core/adapter';
|
|
2
2
|
import type { IEveInspectionSession } from '../contracts/index.js';
|
|
3
3
|
/** Creates one operation-local Eve inspection session with source and listing caches. */
|
|
4
4
|
export declare const createEveInspectionSession: (context: IRuntimeAdapterContext) => IEveInspectionSession;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/inspection/session.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/inspection/session.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,sBAAsB,EAC5B,MAAM,yBAAyB,CAAC;AAGjC,OAAO,KAAK,EAAsB,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAKvF,yFAAyF;AACzF,eAAO,MAAM,0BAA0B,GACrC,SAAS,sBAAsB,KAC9B,qBA+CF,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { IRuntimeAdapterEvidence } from '@moldea.ai/core';
|
|
2
2
|
import type { IAdapterDiagnostic } from '@moldea.ai/core/adapter';
|
|
3
|
+
import type { IRepositoryPath } from '@moldea.ai/repository';
|
|
3
4
|
import type { IEveAgentDefinition } from '../contracts/index.js';
|
|
4
5
|
/** Inspects exact immediate directory-backed local-subagent registrations. */
|
|
5
|
-
export declare const inspectEveSubagents: (definitions: readonly IEveAgentDefinition[], preparedToolNames: ReadonlyMap<string, ReadonlySet<string>>, evidence: IRuntimeAdapterEvidence[], diagnostics: IAdapterDiagnostic[]) => void;
|
|
6
|
+
export declare const inspectEveSubagents: (definitions: readonly IEveAgentDefinition[], preparedToolNames: ReadonlyMap<string, ReadonlySet<string>>, ambiguousParentRoots: ReadonlyMap<IRepositoryPath, number>, evidence: IRuntimeAdapterEvidence[], diagnostics: IAdapterDiagnostic[]) => void;
|
|
6
7
|
//# sourceMappingURL=subagent-inspection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subagent-inspection.d.ts","sourceRoot":"","sources":["../../src/inspection/subagent-inspection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"subagent-inspection.d.ts","sourceRoot":"","sources":["../../src/inspection/subagent-inspection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAO7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAGjE,8EAA8E;AAC9E,eAAO,MAAM,mBAAmB,GAC9B,aAAa,SAAS,mBAAmB,EAAE,EAC3C,mBAAmB,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,EAC3D,sBAAsB,WAAW,CAAC,eAAe,EAAE,MAAM,CAAC,EAC1D,UAAU,uBAAuB,EAAE,EACnC,aAAa,kBAAkB,EAAE,KAChC,IAgJF,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type IRuntimeAdapterRepository } from '@moldea.ai/core/adapter';
|
|
2
|
+
import type { IRepositoryPath } from '@moldea.ai/repository';
|
|
2
3
|
import type { IEvePackageDiscoveryResult } from '../contracts/index.js';
|
|
3
4
|
/** Discovers the nearest owning Eve package and its safe root identity. */
|
|
4
|
-
export declare const discoverEvePackage: (reader:
|
|
5
|
+
export declare const discoverEvePackage: (reader: IRuntimeAdapterRepository, sourcePath: IRepositoryPath, signal?: AbortSignal) => Promise<IEvePackageDiscoveryResult>;
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/package-discovery/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/package-discovery/index.ts"],"names":[],"mappings":"AACA,OAAO,EAA0B,KAAK,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACjG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAG7D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAExE,2EAA2E;AAC3E,eAAO,MAAM,kBAAkB,GAC7B,QAAQ,yBAAyB,EACjC,YAAY,eAAe,EAC3B,SAAS,WAAW,KACnB,OAAO,CAAC,0BAA0B,CA+BpC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moldea.ai/adapter-eve",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
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": {
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"node": ">=22.11.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@moldea.ai/core": "
|
|
37
|
-
"@moldea.ai/repository": "
|
|
36
|
+
"@moldea.ai/core": "3.0.0",
|
|
37
|
+
"@moldea.ai/repository": "2.0.0",
|
|
38
38
|
"semver": "7.8.5",
|
|
39
39
|
"typescript": "6.0.3"
|
|
40
40
|
},
|