@moldea.ai/adapter-cloudflare-agents 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 +2 -2
- package/dist/index.js +39 -22
- package/dist/inspection/handoffs.d.ts +3 -3
- package/dist/inspection/handoffs.d.ts.map +1 -1
- package/dist/inspection/inspection.d.ts.map +1 -1
- package/dist/inspection/relationships.d.ts +2 -3
- package/dist/inspection/relationships.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/types.d.ts +3 -2
- package/dist/inspection/types.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
|
@@ -8,10 +8,10 @@ The package implements the official `cloudflare-agents` runtime adapter for `@mo
|
|
|
8
8
|
|
|
9
9
|
## Supported targets
|
|
10
10
|
|
|
11
|
-
Version `
|
|
11
|
+
Version `2.0.0` supports:
|
|
12
12
|
|
|
13
13
|
- Repository Format version `1`
|
|
14
|
-
- `@moldea.ai/core
|
|
14
|
+
- `@moldea.ai/core >=3.0.0 <4.0.0`
|
|
15
15
|
- TypeScript ESM `.ts`, `.tsx`, and `.mts` source
|
|
16
16
|
- `@cloudflare/think >=0.16.0 <0.17.0`, `agents >=0.21.0 <0.22.0`, and `ai >=7.0.0 <8.0.0`
|
|
17
17
|
- `@cloudflare/ai-chat >=0.10.2 <0.11.0`, `agents >=0.21.0 <0.22.0`, and `ai >=7.0.0 <8.0.0`
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,7 @@ import { posix } from "node:path";
|
|
|
2
2
|
import { intersects, subset, validRange } from "semver";
|
|
3
3
|
import ts from "typescript";
|
|
4
4
|
import { parseRepositoryPath } from "@moldea.ai/repository";
|
|
5
|
+
import { readRuntimeAdapterFile } from "@moldea.ai/core/adapter";
|
|
5
6
|
//#region src/constants/index.ts
|
|
6
7
|
var CLOUDFLARE_AGENTS_ADAPTER_ID = "cloudflare-agents";
|
|
7
8
|
var CLOUDFLARE_AGENTS_PACKAGE_NAME = "agents";
|
|
@@ -1084,8 +1085,6 @@ var createCloudflareAgentsDiagnostic = (input) => Object.freeze({
|
|
|
1084
1085
|
});
|
|
1085
1086
|
//#endregion
|
|
1086
1087
|
//#region src/inspection/common.ts
|
|
1087
|
-
/** Compares exact strings without locale-dependent behavior. */
|
|
1088
|
-
var compareCloudflareAgentsStrings = (left, right) => left < right ? -1 : left > right ? 1 : 0;
|
|
1089
1088
|
var freezeReference = (reference) => Object.freeze({
|
|
1090
1089
|
path: reference.path,
|
|
1091
1090
|
...reference.symbol === void 0 ? {} : { symbol: reference.symbol }
|
|
@@ -1278,27 +1277,38 @@ var resolveCloudflareAgentsToolDefinition = async (session, analysis, expression
|
|
|
1278
1277
|
};
|
|
1279
1278
|
//#endregion
|
|
1280
1279
|
//#region src/inspection/handoffs.ts
|
|
1281
|
-
var
|
|
1280
|
+
var resolveTargetAgent = (target, analysis, context) => {
|
|
1282
1281
|
const candidate = unwrapExpression(target);
|
|
1283
|
-
if (!ts.isIdentifier(candidate)) return Object.freeze(
|
|
1282
|
+
if (!ts.isIdentifier(candidate)) return Object.freeze({ kind: "absent" });
|
|
1284
1283
|
const references = resolveBindingReferences(candidate, analysis);
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1284
|
+
const matchedAgents = /* @__PURE__ */ new Map();
|
|
1285
|
+
for (const reference of references) {
|
|
1286
|
+
const resolution = context.resolveAgent({
|
|
1287
|
+
path: parseRepositoryPath(reference.path),
|
|
1288
|
+
symbol: reference.symbol
|
|
1289
|
+
});
|
|
1290
|
+
if (resolution.kind === "ambiguous") return Object.freeze({ kind: "ambiguous" });
|
|
1291
|
+
if (resolution.kind === "matched") matchedAgents.set(resolution.agent.id, resolution.agent);
|
|
1292
|
+
}
|
|
1293
|
+
if (matchedAgents.size > 1) return Object.freeze({ kind: "ambiguous" });
|
|
1294
|
+
const agent = matchedAgents.values().next().value;
|
|
1295
|
+
return agent === void 0 ? Object.freeze({ kind: "absent" }) : Object.freeze({
|
|
1296
|
+
agent,
|
|
1297
|
+
kind: "matched"
|
|
1298
|
+
});
|
|
1289
1299
|
};
|
|
1290
1300
|
/** Inspects active Cloudflare `agentTool` helpers as runtime handoff registrations. */
|
|
1291
|
-
var inspectCloudflareAgentsHandoffs = async (session, sourceAgent,
|
|
1301
|
+
var inspectCloudflareAgentsHandoffs = async (session, sourceAgent, context, isResolvedAgentSupported, resolvedMaps, evidence, diagnostics) => {
|
|
1292
1302
|
for (const resolvedMap of resolvedMaps) for (const entry of resolvedMap.map.entries) {
|
|
1293
1303
|
const resolved = await resolveCloudflareAgentsToolDefinition(session, resolvedMap.analysis, entry.expression);
|
|
1294
1304
|
if (resolved?.definition.kind !== "agent-tool") continue;
|
|
1295
|
-
const
|
|
1296
|
-
if (
|
|
1305
|
+
const targetResolution = resolveTargetAgent(resolved.definition.tool.target, resolved.analysis, context);
|
|
1306
|
+
if (targetResolution.kind === "ambiguous") {
|
|
1297
1307
|
addCloudflareAgentsDiagnostic(diagnostics, "CLOUDFLARE_AGENTS_HANDOFF_TARGET_AMBIGUOUS", resolved.reference.path, sourceAgent.id, null, void 0, { toolName: entry.name });
|
|
1298
1308
|
continue;
|
|
1299
1309
|
}
|
|
1300
|
-
const target =
|
|
1301
|
-
if (target === void 0) continue;
|
|
1310
|
+
const target = targetResolution.kind === "matched" ? targetResolution.agent : void 0;
|
|
1311
|
+
if (target === void 0 || !await isResolvedAgentSupported(target)) continue;
|
|
1302
1312
|
const description = resolved.definition.tool.description;
|
|
1303
1313
|
const effectiveDescription = target.handoffDescription?.value ?? target.description.value;
|
|
1304
1314
|
if (description === null || description.length === 0) {
|
|
@@ -1360,12 +1370,12 @@ var inspectToolReference = async (session, agent, capabilityId, relationship, re
|
|
|
1360
1370
|
}
|
|
1361
1371
|
return true;
|
|
1362
1372
|
};
|
|
1363
|
-
var inspectTools = async (session, inspected,
|
|
1373
|
+
var inspectTools = async (session, inspected, context, isResolvedAgentSupported, evidence, diagnostics) => {
|
|
1364
1374
|
if (inspected.tools.some((relationship) => relationship.kind === "unresolved")) return;
|
|
1365
1375
|
const presentRelationships = inspected.tools.filter((relationship) => relationship.kind === "present");
|
|
1366
1376
|
const resolvedMaps = (await Promise.all(presentRelationships.map((relationship) => resolveCloudflareAgentsToolMap(session, inspected.analysis, relationship)))).filter((map) => map !== null && map.map.kind === "closed");
|
|
1367
1377
|
if (resolvedMaps.length !== presentRelationships.length) return;
|
|
1368
|
-
await inspectCloudflareAgentsHandoffs(session, inspected.agent,
|
|
1378
|
+
await inspectCloudflareAgentsHandoffs(session, inspected.agent, context, isResolvedAgentSupported, resolvedMaps, evidence, diagnostics);
|
|
1369
1379
|
for (const [capabilityId, tool] of Object.entries(inspected.agent.declaration.tools ?? {})) {
|
|
1370
1380
|
if (tool.registration === void 0) continue;
|
|
1371
1381
|
await hasCloudflareAgentsSymbol(session, tool.registration, diagnostics, inspected.agent.id, "CLOUDFLARE_AGENTS_TOOL_REGISTRATION_SYMBOL_NOT_FOUND", capabilityId);
|
|
@@ -1422,13 +1432,12 @@ var inspectTools = async (session, inspected, agents, evidence, diagnostics) =>
|
|
|
1422
1432
|
}
|
|
1423
1433
|
};
|
|
1424
1434
|
/** Inspects manifest relationships for every supported Cloudflare runtime agent. */
|
|
1425
|
-
var inspectCloudflareAgentsRelationships = async (session, inspectedAgents, evidence, diagnostics) => {
|
|
1426
|
-
const verifiedAgents = Object.freeze(inspectedAgents.map(({ agent }) => agent));
|
|
1435
|
+
var inspectCloudflareAgentsRelationships = async (session, inspectedAgents, context, isResolvedAgentSupported, evidence, diagnostics) => {
|
|
1427
1436
|
for (const inspected of inspectedAgents) {
|
|
1428
1437
|
const bindings = inspected.agent.declaration.bindings;
|
|
1429
1438
|
if (bindings?.instructionLoader !== void 0) await inspectBinding(session, inspected.agent, inspected.instructions, inspected.analysis, bindings.instructionLoader, "CLOUDFLARE_AGENTS_INSTRUCTION_LOADER_SYMBOL_NOT_FOUND", "CLOUDFLARE_AGENTS_INSTRUCTION_LOADER_NOT_WIRED", "instruction-loader", evidence, diagnostics);
|
|
1430
1439
|
if (bindings?.outputSchema !== void 0) await inspectBinding(session, inspected.agent, getCloudflareAgentsOutputSchema(inspected.output, inspected.analysis), inspected.analysis, bindings.outputSchema, "CLOUDFLARE_AGENTS_AGENT_OUTPUT_SCHEMA_SYMBOL_NOT_FOUND", "CLOUDFLARE_AGENTS_AGENT_OUTPUT_SCHEMA_NOT_WIRED", "schema", evidence, diagnostics, "agent-output");
|
|
1431
|
-
await inspectTools(session, inspected,
|
|
1440
|
+
await inspectTools(session, inspected, context, isResolvedAgentSupported, evidence, diagnostics);
|
|
1432
1441
|
}
|
|
1433
1442
|
};
|
|
1434
1443
|
//#endregion
|
|
@@ -1479,7 +1488,7 @@ var discoverCloudflareAgentsPackage = async (repository, sourcePath, signal) =>
|
|
|
1479
1488
|
kind: "invalid",
|
|
1480
1489
|
path: candidatePath
|
|
1481
1490
|
});
|
|
1482
|
-
const text = normalizeText(await repository
|
|
1491
|
+
const text = normalizeText(await readRuntimeAdapterFile(repository, candidatePath, options));
|
|
1483
1492
|
if (!text.valid) return Object.freeze({
|
|
1484
1493
|
kind: "invalid",
|
|
1485
1494
|
path: candidatePath
|
|
@@ -1520,7 +1529,7 @@ var createCloudflareAgentsInspectionSession = (context) => createInspectionSessi
|
|
|
1520
1529
|
analyzeSource: analyzeCloudflareAgentsSource,
|
|
1521
1530
|
discoverPackage: (path, signal) => discoverCloudflareAgentsPackage(context.repository, path, signal),
|
|
1522
1531
|
getEntry: (path, signal) => context.repository.getEntry(path, signal === void 0 ? void 0 : { signal }),
|
|
1523
|
-
readFile: (path, signal) => context.repository
|
|
1532
|
+
readFile: (path, signal) => readRuntimeAdapterFile(context.repository, path, signal === void 0 ? void 0 : { signal }),
|
|
1524
1533
|
...context.signal === void 0 ? {} : { signal: context.signal }
|
|
1525
1534
|
});
|
|
1526
1535
|
//#endregion
|
|
@@ -1628,15 +1637,23 @@ var inspectCloudflareAgents = async (context) => {
|
|
|
1628
1637
|
const session = createCloudflareAgentsInspectionSession(context);
|
|
1629
1638
|
const evidence = [];
|
|
1630
1639
|
const diagnostics = [];
|
|
1631
|
-
const agents = [
|
|
1640
|
+
const agents = [context.agent];
|
|
1632
1641
|
const inspectedAgents = [];
|
|
1642
|
+
const relatedInspectionCache = /* @__PURE__ */ new Map();
|
|
1643
|
+
const isResolvedAgentSupported = (agent) => {
|
|
1644
|
+
const cached = relatedInspectionCache.get(agent.id);
|
|
1645
|
+
if (cached !== void 0) return cached;
|
|
1646
|
+
const inspection = inspectAgent(session, agent, [], []).then((result) => result !== null);
|
|
1647
|
+
relatedInspectionCache.set(agent.id, inspection);
|
|
1648
|
+
return inspection;
|
|
1649
|
+
};
|
|
1633
1650
|
for (const agent of agents) {
|
|
1634
1651
|
context.signal?.throwIfAborted();
|
|
1635
1652
|
const inspected = await inspectAgent(session, agent, evidence, diagnostics);
|
|
1636
1653
|
if (inspected !== null) inspectedAgents.push(inspected);
|
|
1637
1654
|
}
|
|
1638
1655
|
context.signal?.throwIfAborted();
|
|
1639
|
-
await inspectCloudflareAgentsRelationships(session, inspectedAgents, evidence, diagnostics);
|
|
1656
|
+
await inspectCloudflareAgentsRelationships(session, inspectedAgents, context, isResolvedAgentSupported, evidence, diagnostics);
|
|
1640
1657
|
return Object.freeze({
|
|
1641
1658
|
diagnostics: Object.freeze(diagnostics),
|
|
1642
1659
|
evidence: Object.freeze(evidence)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { IAdapterDiagnostic } from '@moldea.ai/core/adapter';
|
|
1
|
+
import type { IAdapterDiagnostic, IRuntimeAdapterContext, IRuntimeAdapterEvidence, IRuntimeAdapterResolvedAgent } from '@moldea.ai/core/adapter';
|
|
3
2
|
import type { ICloudflareAgentsInspectionSession } from '../contracts/index.js';
|
|
4
3
|
import type { ICloudflareAgentsResolvedToolMap } from './resolution.js';
|
|
4
|
+
import type { ICloudflareAgentsScopedAgent } from './types.js';
|
|
5
5
|
/** Inspects active Cloudflare `agentTool` helpers as runtime handoff registrations. */
|
|
6
|
-
export declare const inspectCloudflareAgentsHandoffs: (session: ICloudflareAgentsInspectionSession, sourceAgent:
|
|
6
|
+
export declare const inspectCloudflareAgentsHandoffs: (session: ICloudflareAgentsInspectionSession, sourceAgent: ICloudflareAgentsScopedAgent, context: IRuntimeAdapterContext, isResolvedAgentSupported: (agent: IRuntimeAdapterResolvedAgent) => Promise<boolean>, resolvedMaps: readonly ICloudflareAgentsResolvedToolMap[], evidence: IRuntimeAdapterEvidence[], diagnostics: IAdapterDiagnostic[]) => Promise<void>;
|
|
7
7
|
//# sourceMappingURL=handoffs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handoffs.d.ts","sourceRoot":"","sources":["../../src/inspection/handoffs.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"handoffs.d.ts","sourceRoot":"","sources":["../../src/inspection/handoffs.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,EACvB,4BAA4B,EAC7B,MAAM,yBAAyB,CAAC;AAIjC,OAAO,KAAK,EACV,kCAAkC,EAEnC,MAAM,uBAAuB,CAAC;AAG/B,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AA8C/D,uFAAuF;AACvF,eAAO,MAAM,+BAA+B,GAC1C,SAAS,kCAAkC,EAC3C,aAAa,4BAA4B,EACzC,SAAS,sBAAsB,EAC/B,0BAA0B,CAAC,KAAK,EAAE,4BAA4B,KAAK,OAAO,CAAC,OAAO,CAAC,EACnF,cAAc,SAAS,gCAAgC,EAAE,EACzD,UAAU,uBAAuB,EAAE,EACnC,aAAa,kBAAkB,EAAE,KAChC,OAAO,CAAC,IAAI,CAuFd,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":"AAKA,OAAO,KAAK,EAEV,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AAiMjC;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,uBAAuB,GAClC,SAAS,sBAAsB,KAC9B,OAAO,CAAC,qBAAqB,CA2C/B,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { IRuntimeAdapterEvidence } from '@moldea.ai/core';
|
|
2
|
-
import type { IAdapterDiagnostic } from '@moldea.ai/core/adapter';
|
|
1
|
+
import type { IAdapterDiagnostic, IRuntimeAdapterContext, IRuntimeAdapterEvidence, IRuntimeAdapterResolvedAgent } from '@moldea.ai/core/adapter';
|
|
3
2
|
import type { ICloudflareAgentsInspectionSession } from '../contracts/index.js';
|
|
4
3
|
import type { ICloudflareAgentsInspectedAgent } from './types.js';
|
|
5
4
|
/** Inspects manifest relationships for every supported Cloudflare runtime agent. */
|
|
6
|
-
export declare const inspectCloudflareAgentsRelationships: (session: ICloudflareAgentsInspectionSession, inspectedAgents: readonly ICloudflareAgentsInspectedAgent[], evidence: IRuntimeAdapterEvidence[], diagnostics: IAdapterDiagnostic[]) => Promise<void>;
|
|
5
|
+
export declare const inspectCloudflareAgentsRelationships: (session: ICloudflareAgentsInspectionSession, inspectedAgents: readonly ICloudflareAgentsInspectedAgent[], context: IRuntimeAdapterContext, isResolvedAgentSupported: (agent: IRuntimeAdapterResolvedAgent) => Promise<boolean>, evidence: IRuntimeAdapterEvidence[], diagnostics: IAdapterDiagnostic[]) => Promise<void>;
|
|
7
6
|
//# sourceMappingURL=relationships.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relationships.d.ts","sourceRoot":"","sources":["../../src/inspection/relationships.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"relationships.d.ts","sourceRoot":"","sources":["../../src/inspection/relationships.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,EACvB,4BAA4B,EAC7B,MAAM,yBAAyB,CAAC;AAIjC,OAAO,KAAK,EAEV,kCAAkC,EAGnC,MAAM,uBAAuB,CAAC;AAiB/B,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,YAAY,CAAC;AAuRlE,oFAAoF;AACpF,eAAO,MAAM,oCAAoC,GAC/C,SAAS,kCAAkC,EAC3C,iBAAiB,SAAS,+BAA+B,EAAE,EAC3D,SAAS,sBAAsB,EAC/B,0BAA0B,CAAC,KAAK,EAAE,4BAA4B,KAAK,OAAO,CAAC,OAAO,CAAC,EACnF,UAAU,uBAAuB,EAAE,EACnC,aAAa,kBAAkB,EAAE,KAChC,OAAO,CAAC,IAAI,CA4Cd,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type IRuntimeAdapterContext } from '@moldea.ai/core/adapter';
|
|
2
2
|
import type { ICloudflareAgentsInspectionSession } from '../contracts/index.js';
|
|
3
3
|
/** Creates one operation-local Cloudflare Agents inspection session. */
|
|
4
4
|
export declare const createCloudflareAgentsInspectionSession: (context: IRuntimeAdapterContext) => ICloudflareAgentsInspectionSession;
|
|
@@ -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,EAA0B,KAAK,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAE9F,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,uBAAuB,CAAC;AAIhF,wEAAwE;AACxE,eAAO,MAAM,uCAAuC,GAClD,SAAS,sBAAsB,KAC9B,kCAcC,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { IIndexedAgent } from '@moldea.ai/core';
|
|
1
|
+
import type { IIndexedAgent } from '@moldea.ai/core/adapter';
|
|
2
2
|
import type { ICloudflareAgentsClassDefinition, ICloudflareAgentsGenerationRequest, ICloudflareAgentsRelationship, ICloudflareAgentsSourceAnalysis } from '../contracts/index.js';
|
|
3
|
+
export type ICloudflareAgentsScopedAgent = Pick<IIndexedAgent, 'declaration' | 'id'>;
|
|
3
4
|
export interface ICloudflareAgentsInspectedAgent {
|
|
4
|
-
readonly agent:
|
|
5
|
+
readonly agent: ICloudflareAgentsScopedAgent;
|
|
5
6
|
readonly analysis: ICloudflareAgentsSourceAnalysis;
|
|
6
7
|
readonly definition: ICloudflareAgentsClassDefinition;
|
|
7
8
|
readonly instructions: ICloudflareAgentsRelationship;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/inspection/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/inspection/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,KAAK,EACV,gCAAgC,EAChC,kCAAkC,EAClC,6BAA6B,EAC7B,+BAA+B,EAChC,MAAM,uBAAuB,CAAC;AAG/B,MAAM,MAAM,4BAA4B,GAAG,IAAI,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC,CAAC;AAErF,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,KAAK,EAAE,4BAA4B,CAAC;IAC7C,QAAQ,CAAC,QAAQ,EAAE,+BAA+B,CAAC;IACnD,QAAQ,CAAC,UAAU,EAAE,gCAAgC,CAAC;IACtD,QAAQ,CAAC,YAAY,EAAE,6BAA6B,CAAC;IACrD,QAAQ,CAAC,MAAM,EAAE,6BAA6B,CAAC;IAC/C,QAAQ,CAAC,QAAQ,EAAE,SAAS,kCAAkC,EAAE,CAAC;IACjE,QAAQ,CAAC,KAAK,EAAE,SAAS,6BAA6B,EAAE,CAAC;CAC1D"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type IRuntimeAdapterRepository } from '@moldea.ai/core/adapter';
|
|
2
|
+
import type { IRepositoryPath } from '@moldea.ai/repository';
|
|
2
3
|
import type { ICloudflareAgentsPackageDiscoveryResult } from '../contracts/index.js';
|
|
3
4
|
/** Creates nearest-to-root package-manifest candidates for one source path. */
|
|
4
5
|
export declare const createCloudflareAgentsPackageManifestCandidatePaths: (sourcePath: IRepositoryPath) => readonly IRepositoryPath[];
|
|
5
6
|
/** Discovers the nearest manifest containing a Cloudflare Agents target dependency. */
|
|
6
|
-
export declare const discoverCloudflareAgentsPackage: (repository:
|
|
7
|
+
export declare const discoverCloudflareAgentsPackage: (repository: IRuntimeAdapterRepository, sourcePath: IRepositoryPath, signal?: AbortSignal) => Promise<ICloudflareAgentsPackageDiscoveryResult>;
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/package-discovery/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/package-discovery/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAA0B,KAAK,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACjG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAS7D,OAAO,KAAK,EAGV,uCAAuC,EACxC,MAAM,uBAAuB,CAAC;AAkB/B,+EAA+E;AAC/E,eAAO,MAAM,mDAAmD,GAC9D,YAAY,eAAe,KAC1B,SAAS,eAAe,EAC+D,CAAC;AAwC3F,uFAAuF;AACvF,eAAO,MAAM,+BAA+B,GAC1C,YAAY,yBAAyB,EACrC,YAAY,eAAe,EAC3B,SAAS,WAAW,KACnB,OAAO,CAAC,uCAAuC,CAyDjD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moldea.ai/adapter-cloudflare-agents",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Deterministic runtime evidence and diagnostics for Cloudflare Agents integrations.",
|
|
5
5
|
"homepage": "https://github.com/moldea-ai/packages/tree/main/projects/adapter-cloudflare-agents#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
|
},
|