@moldea.ai/adapter-claude-agent-sdk 1.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.
Files changed (61) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +90 -0
  3. package/cover.png +0 -0
  4. package/dist/adapter/index.d.ts +3 -0
  5. package/dist/adapter/index.d.ts.map +1 -0
  6. package/dist/constants/index.d.ts +7 -0
  7. package/dist/constants/index.d.ts.map +1 -0
  8. package/dist/contracts/index.d.ts +176 -0
  9. package/dist/contracts/index.d.ts.map +1 -0
  10. package/dist/diagnostics/index.d.ts +31 -0
  11. package/dist/diagnostics/index.d.ts.map +1 -0
  12. package/dist/index.d.ts +2 -0
  13. package/dist/index.d.ts.map +1 -0
  14. package/dist/index.js +2435 -0
  15. package/dist/inspection/common.d.ts +36 -0
  16. package/dist/inspection/common.d.ts.map +1 -0
  17. package/dist/inspection/handoffs.d.ts +7 -0
  18. package/dist/inspection/handoffs.d.ts.map +1 -0
  19. package/dist/inspection/index.d.ts +2 -0
  20. package/dist/inspection/index.d.ts.map +1 -0
  21. package/dist/inspection/inspection.d.ts +18 -0
  22. package/dist/inspection/inspection.d.ts.map +1 -0
  23. package/dist/inspection/package-inspection.d.ts +7 -0
  24. package/dist/inspection/package-inspection.d.ts.map +1 -0
  25. package/dist/inspection/relationships.d.ts +7 -0
  26. package/dist/inspection/relationships.d.ts.map +1 -0
  27. package/dist/inspection/resolution.d.ts +23 -0
  28. package/dist/inspection/resolution.d.ts.map +1 -0
  29. package/dist/inspection/session.d.ts +5 -0
  30. package/dist/inspection/session.d.ts.map +1 -0
  31. package/dist/inspection/tools.d.ts +7 -0
  32. package/dist/inspection/tools.d.ts.map +1 -0
  33. package/dist/inspection/types.d.ts +16 -0
  34. package/dist/inspection/types.d.ts.map +1 -0
  35. package/dist/package-discovery/index.d.ts +27 -0
  36. package/dist/package-discovery/index.d.ts.map +1 -0
  37. package/dist/source-analysis/agent-definitions.d.ts +24 -0
  38. package/dist/source-analysis/agent-definitions.d.ts.map +1 -0
  39. package/dist/source-analysis/bindings.d.ts +11 -0
  40. package/dist/source-analysis/bindings.d.ts.map +1 -0
  41. package/dist/source-analysis/collections.d.ts +28 -0
  42. package/dist/source-analysis/collections.d.ts.map +1 -0
  43. package/dist/source-analysis/index.d.ts +14 -0
  44. package/dist/source-analysis/index.d.ts.map +1 -0
  45. package/dist/source-analysis/instruction-loaders.d.ts +12 -0
  46. package/dist/source-analysis/instruction-loaders.d.ts.map +1 -0
  47. package/dist/source-analysis/mcp-servers.d.ts +16 -0
  48. package/dist/source-analysis/mcp-servers.d.ts.map +1 -0
  49. package/dist/source-analysis/mutations.d.ts +15 -0
  50. package/dist/source-analysis/mutations.d.ts.map +1 -0
  51. package/dist/source-analysis/query-wrappers.d.ts +19 -0
  52. package/dist/source-analysis/query-wrappers.d.ts.map +1 -0
  53. package/dist/source-analysis/sdk-tools.d.ts +9 -0
  54. package/dist/source-analysis/sdk-tools.d.ts.map +1 -0
  55. package/dist/source-analysis/source-analysis.d.ts +11 -0
  56. package/dist/source-analysis/source-analysis.d.ts.map +1 -0
  57. package/dist/source-analysis/static-strings.d.ts +11 -0
  58. package/dist/source-analysis/static-strings.d.ts.map +1 -0
  59. package/dist/source-analysis/tool-availability.d.ts +41 -0
  60. package/dist/source-analysis/tool-availability.d.ts.map +1 -0
  61. package/package.json +60 -0
@@ -0,0 +1,36 @@
1
+ import type ts from 'typescript';
2
+ import type { IRuntimeAdapterEvidence, ISourceRange } from '@moldea.ai/core';
3
+ import type { IAdapterDiagnostic } from '@moldea.ai/core/adapter';
4
+ import type { IRepositoryReference } from '@moldea.ai/core/format';
5
+ import type { IRepositoryPath } from '@moldea.ai/repository';
6
+ import type { IClaudeAgentSdkAdapterDiagnosticCode, IClaudeAgentSdkInspectionSession, IClaudeAgentSdkSourceAnalysis } from '../contracts/index.js';
7
+ /** Compares exact strings without locale-dependent behavior. */
8
+ export declare const compareClaudeAgentSdkStrings: (left: string, right: string) => number;
9
+ /** Determines whether a runtime-visible value satisfies Core's machine-string contract. */
10
+ export declare const isClaudeAgentSdkMachineString: (value: string) => boolean;
11
+ /** Creates one deeply immutable Claude Agent SDK evidence record. */
12
+ export declare const createClaudeAgentSdkEvidence: (evidence: IRuntimeAdapterEvidence) => IRuntimeAdapterEvidence;
13
+ /**
14
+ * Appends one stable package-owned diagnostic.
15
+ * @param diagnostics The operation result collection.
16
+ * @param code The stable diagnostic code.
17
+ * @param path The exact affected path.
18
+ * @param agentId The owning source-agent identifier.
19
+ * @param range The optional scalar source range.
20
+ * @param capabilityId The optional owning tool capability.
21
+ * @param details Safe scalar diagnostic details.
22
+ */
23
+ export declare const addClaudeAgentSdkDiagnostic: (diagnostics: IAdapterDiagnostic[], code: IClaudeAgentSdkAdapterDiagnosticCode, path: IRepositoryPath | null, agentId: string, range?: ISourceRange | null, capabilityId?: string, details?: IAdapterDiagnostic["details"]) => void;
24
+ /** Returns the Core scalar range for one node in its analyzed source. */
25
+ export declare const locateClaudeAgentSdkNode: (analysis: IClaudeAgentSdkSourceAnalysis, node: ts.Node) => ISourceRange;
26
+ /**
27
+ * Loads and validates one supported bound TypeScript source.
28
+ * @param session The operation-local inspection session.
29
+ * @param reference The exact manifest reference.
30
+ * @param diagnostics The operation result collection.
31
+ * @param agentId The owning agent identifier.
32
+ * @param capabilityId The optional owning tool capability.
33
+ * @returns The indexed source or `null` after unsupported or invalid input.
34
+ */
35
+ export declare const analyzeClaudeAgentSdkBoundReference: (session: IClaudeAgentSdkInspectionSession, reference: IRepositoryReference, diagnostics: IAdapterDiagnostic[], agentId: string, capabilityId?: string) => Promise<IClaudeAgentSdkSourceAnalysis | null>;
36
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/inspection/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAGjC,OAAO,KAAK,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAG7D,OAAO,KAAK,EACV,oCAAoC,EACpC,gCAAgC,EAChC,6BAA6B,EAC9B,MAAM,uBAAuB,CAAC;AAiB/B,gEAAgE;AAChE,eAAO,MAAM,4BAA4B,GAAI,MAAM,MAAM,EAAE,OAAO,MAAM,KAAG,MACjC,CAAC;AAE3C,2FAA2F;AAC3F,eAAO,MAAM,6BAA6B,GAAI,OAAO,MAAM,KAAG,OAW7D,CAAC;AAQF,qEAAqE;AACrE,eAAO,MAAM,4BAA4B,GACvC,UAAU,uBAAuB,KAChC,uBAKC,CAAC;AASL;;;;;;;;;GASG;AACH,eAAO,MAAM,2BAA2B,GACtC,aAAa,kBAAkB,EAAE,EACjC,MAAM,oCAAoC,EAC1C,MAAM,eAAe,GAAG,IAAI,EAC5B,SAAS,MAAM,EACf,QAAO,YAAY,GAAG,IAAW,EACjC,eAAe,MAAM,EACrB,UAAS,kBAAkB,CAAC,SAAS,CAAM,KAC1C,IAWF,CAAC;AAEF,yEAAyE;AACzE,eAAO,MAAM,wBAAwB,GACnC,UAAU,6BAA6B,EACvC,MAAM,EAAE,CAAC,IAAI,KACZ,YACmF,CAAC;AAEvF;;;;;;;;GAQG;AACH,eAAO,MAAM,mCAAmC,GAC9C,SAAS,gCAAgC,EACzC,WAAW,oBAAoB,EAC/B,aAAa,kBAAkB,EAAE,EACjC,SAAS,MAAM,EACf,eAAe,MAAM,KACpB,OAAO,CAAC,6BAA6B,GAAG,IAAI,CAgC9C,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { IRuntimeAdapterEvidence } from '@moldea.ai/core';
2
+ import type { IAdapterDiagnostic, IRuntimeAdapterContext } from '@moldea.ai/core/adapter';
3
+ import type { IClaudeAgentSdkInspectionSession } from '../contracts/index.js';
4
+ import type { IClaudeAgentSdkInspectedQueryAgent } from './types.js';
5
+ /** Inspects active query-configured programmatic subagent registrations and routing metadata. */
6
+ export declare const inspectClaudeAgentSdkHandoffs: (context: IRuntimeAdapterContext, session: IClaudeAgentSdkInspectionSession, inspected: IClaudeAgentSdkInspectedQueryAgent, evidence: IRuntimeAdapterEvidence[], diagnostics: IAdapterDiagnostic[]) => Promise<void>;
7
+ //# sourceMappingURL=handoffs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handoffs.d.ts","sourceRoot":"","sources":["../../src/inspection/handoffs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAG1F,OAAO,KAAK,EACV,gCAAgC,EAGjC,MAAM,uBAAuB,CAAC;AAgB/B,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,YAAY,CAAC;AAiGrE,iGAAiG;AACjG,eAAO,MAAM,6BAA6B,GACxC,SAAS,sBAAsB,EAC/B,SAAS,gCAAgC,EACzC,WAAW,kCAAkC,EAC7C,UAAU,uBAAuB,EAAE,EACnC,aAAa,kBAAkB,EAAE,KAChC,OAAO,CAAC,IAAI,CA8Hd,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { inspectClaudeAgentSdk } from './inspection.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/inspection/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { IRuntimeAdapterContext, IRuntimeAdapterResult } from '@moldea.ai/core/adapter';
2
+ /**
3
+ * Inspects all scoped Claude Agent SDK agents through one deterministic session.
4
+ * @param context The Core-provided immutable adapter context.
5
+ * @returns A promise resolving to source-grounded evidence and diagnostics.
6
+ * @throws
7
+ * - INVALID_REPOSITORY_PATH: The repository path is invalid.
8
+ * - ENTRY_NOT_FOUND: The requested repository entry was not found.
9
+ * - ENTRY_NOT_FILE: The requested repository entry is not a file.
10
+ * - ACCESS_DENIED: Access to the repository source was denied.
11
+ * - SOURCE_UNAVAILABLE: The repository source is unavailable.
12
+ * - SNAPSHOT_CHANGED: The repository snapshot changed during the operation.
13
+ * - INVALID_SOURCE_DATA: The repository source returned invalid data.
14
+ * - RESOURCE_LIMIT_EXCEEDED: A repository reading resource limit was exceeded.
15
+ * - ABORTED: The repository operation or inspection signal was aborted.
16
+ */
17
+ export declare const inspectClaudeAgentSdk: (context: IRuntimeAdapterContext) => Promise<IRuntimeAdapterResult>;
18
+ //# sourceMappingURL=inspection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspection.d.ts","sourceRoot":"","sources":["../../src/inspection/inspection.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AA8IjC;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,qBAAqB,GAChC,SAAS,sBAAsB,KAC9B,OAAO,CAAC,qBAAqB,CAmC/B,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { IRuntimeAdapterEvidence } from '@moldea.ai/core';
2
+ import type { IAdapterDiagnostic } from '@moldea.ai/core/adapter';
3
+ import type { IRepositoryPath } from '@moldea.ai/repository';
4
+ import type { IClaudeAgentSdkInspectionSession } from '../contracts/index.js';
5
+ /** Inspects the nearest owning package manifest for one runtime source. */
6
+ export declare const inspectClaudeAgentSdkPackage: (session: IClaudeAgentSdkInspectionSession, sourcePath: IRepositoryPath, evidence: IRuntimeAdapterEvidence[], diagnostics: IAdapterDiagnostic[], agentId: string) => Promise<void>;
7
+ //# sourceMappingURL=package-inspection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-inspection.d.ts","sourceRoot":"","sources":["../../src/inspection/package-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;AAG7D,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,uBAAuB,CAAC;AAG9E,2EAA2E;AAC3E,eAAO,MAAM,4BAA4B,GACvC,SAAS,gCAAgC,EACzC,YAAY,eAAe,EAC3B,UAAU,uBAAuB,EAAE,EACnC,aAAa,kBAAkB,EAAE,EACjC,SAAS,MAAM,KACd,OAAO,CAAC,IAAI,CA+Cd,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { IRuntimeAdapterEvidence } from '@moldea.ai/core';
2
+ import type { IAdapterDiagnostic } from '@moldea.ai/core/adapter';
3
+ import type { IClaudeAgentSdkInspectedDefinitionAgent, IClaudeAgentSdkInspectedQueryAgent } from './types.js';
4
+ import type { IClaudeAgentSdkInspectionSession } from '../contracts/index.js';
5
+ /** Inspects canonical instruction and query-output-schema relationships. */
6
+ export declare const inspectClaudeAgentSdkRelationships: (session: IClaudeAgentSdkInspectionSession, inspected: IClaudeAgentSdkInspectedDefinitionAgent | IClaudeAgentSdkInspectedQueryAgent, evidence: IRuntimeAdapterEvidence[], diagnostics: IAdapterDiagnostic[]) => Promise<void>;
7
+ //# sourceMappingURL=relationships.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relationships.d.ts","sourceRoot":"","sources":["../../src/inspection/relationships.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAIlE,OAAO,KAAK,EACV,uCAAuC,EACvC,kCAAkC,EACnC,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EACV,gCAAgC,EAEjC,MAAM,uBAAuB,CAAC;AA+R/B,4EAA4E;AAC5E,eAAO,MAAM,kCAAkC,GAC7C,SAAS,gCAAgC,EACzC,WAAW,uCAAuC,GAAG,kCAAkC,EACvF,UAAU,uBAAuB,EAAE,EACnC,aAAa,kBAAkB,EAAE,KAChC,OAAO,CAAC,IAAI,CAOd,CAAC"}
@@ -0,0 +1,23 @@
1
+ import ts from 'typescript';
2
+ import { parseRepositoryPath } from '@moldea.ai/repository';
3
+ import type { IClaudeAgentSdkInspectionSession, IClaudeAgentSdkMcpServerDefinition, IClaudeAgentSdkResolvedAgentDefinition, IClaudeAgentSdkSourceAnalysis, IClaudeAgentSdkToolDefinition } from '../contracts/index.js';
4
+ interface IResolvedMcpServer {
5
+ readonly analysis: IClaudeAgentSdkSourceAnalysis;
6
+ readonly definition: IClaudeAgentSdkMcpServerDefinition;
7
+ readonly path: ReturnType<typeof parseRepositoryPath>;
8
+ readonly symbol: string;
9
+ }
10
+ export interface IResolvedToolDefinition {
11
+ readonly analysis: IClaudeAgentSdkSourceAnalysis;
12
+ readonly definition: IClaudeAgentSdkToolDefinition;
13
+ readonly path: ReturnType<typeof parseRepositoryPath>;
14
+ readonly symbol: string;
15
+ }
16
+ /** Resolves one exact supported programmatic definition through local or relative binding identity. */
17
+ export declare const resolveClaudeAgentSdkAgentDefinition: (session: IClaudeAgentSdkInspectionSession, analysis: IClaudeAgentSdkSourceAnalysis, expression: ts.Expression) => Promise<IClaudeAgentSdkResolvedAgentDefinition | null>;
18
+ /** Resolves one exact supported SDK MCP server through local or relative binding identity. */
19
+ export declare const resolveClaudeAgentSdkMcpServer: (session: IClaudeAgentSdkInspectionSession, analysis: IClaudeAgentSdkSourceAnalysis, expression: ts.Expression) => Promise<IResolvedMcpServer | null>;
20
+ /** Resolves one exact supported exported SDK tool through local or relative binding identity. */
21
+ export declare const resolveClaudeAgentSdkTool: (session: IClaudeAgentSdkInspectionSession, analysis: IClaudeAgentSdkSourceAnalysis, expression: ts.Expression) => Promise<IResolvedToolDefinition | null>;
22
+ export {};
23
+ //# sourceMappingURL=resolution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolution.d.ts","sourceRoot":"","sources":["../../src/inspection/resolution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAO5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,KAAK,EACV,gCAAgC,EAChC,kCAAkC,EAClC,sCAAsC,EACtC,6BAA6B,EAC7B,6BAA6B,EAC9B,MAAM,uBAAuB,CAAC;AAO/B,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,QAAQ,EAAE,6BAA6B,CAAC;IACjD,QAAQ,CAAC,UAAU,EAAE,kCAAkC,CAAC;IACxD,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;IACtD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,QAAQ,EAAE,6BAA6B,CAAC;IACjD,QAAQ,CAAC,UAAU,EAAE,6BAA6B,CAAC;IACnD,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;IACtD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAgDD,uGAAuG;AACvG,eAAO,MAAM,oCAAoC,GAC/C,SAAS,gCAAgC,EACzC,UAAU,6BAA6B,EACvC,YAAY,EAAE,CAAC,UAAU,KACxB,OAAO,CAAC,sCAAsC,GAAG,IAAI,CAyBvD,CAAC;AAEF,8FAA8F;AAC9F,eAAO,MAAM,8BAA8B,GACzC,SAAS,gCAAgC,EACzC,UAAU,6BAA6B,EACvC,YAAY,EAAE,CAAC,UAAU,KACxB,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAyBnC,CAAC;AAEF,iGAAiG;AACjG,eAAO,MAAM,yBAAyB,GACpC,SAAS,gCAAgC,EACzC,UAAU,6BAA6B,EACvC,YAAY,EAAE,CAAC,UAAU,KACxB,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAyBxC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { IRuntimeAdapterContext } from '@moldea.ai/core/adapter';
2
+ import type { IClaudeAgentSdkInspectionSession } from '../contracts/index.js';
3
+ /** Creates one operation-local Claude Agent SDK inspection session. */
4
+ export declare const createClaudeAgentSdkInspectionSession: (context: IRuntimeAdapterContext) => IClaudeAgentSdkInspectionSession;
5
+ //# sourceMappingURL=session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/inspection/session.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEtE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,uBAAuB,CAAC;AAI9E,uEAAuE;AACvE,eAAO,MAAM,qCAAqC,GAChD,SAAS,sBAAsB,KAC9B,gCAUC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { IRuntimeAdapterEvidence } from '@moldea.ai/core';
2
+ import type { IAdapterDiagnostic } from '@moldea.ai/core/adapter';
3
+ import type { IClaudeAgentSdkInspectionSession } from '../contracts/index.js';
4
+ import type { IClaudeAgentSdkInspectedAgent } from './types.js';
5
+ /** Inspects custom tool declarations, schemas, implementations, mounts, and availability. */
6
+ export declare const inspectClaudeAgentSdkTools: (session: IClaudeAgentSdkInspectionSession, inspectedAgents: readonly IClaudeAgentSdkInspectedAgent[], evidence: IRuntimeAdapterEvidence[], diagnostics: IAdapterDiagnostic[]) => Promise<void>;
7
+ //# sourceMappingURL=tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/inspection/tools.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAOlE,OAAO,KAAK,EAEV,gCAAgC,EAKjC,MAAM,uBAAuB,CAAC;AA2B/B,OAAO,KAAK,EACV,6BAA6B,EAG9B,MAAM,YAAY,CAAC;AAokBpB,6FAA6F;AAC7F,eAAO,MAAM,0BAA0B,GACrC,SAAS,gCAAgC,EACzC,iBAAiB,SAAS,6BAA6B,EAAE,EACzD,UAAU,uBAAuB,EAAE,EACnC,aAAa,kBAAkB,EAAE,KAChC,OAAO,CAAC,IAAI,CAwHd,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { IIndexedAgent } from '@moldea.ai/core';
2
+ import type { IClaudeAgentSdkAgentDefinition, IClaudeAgentSdkQueryWrapper, IClaudeAgentSdkSourceAnalysis } from '../contracts/index.js';
3
+ export interface IClaudeAgentSdkInspectedQueryAgent {
4
+ readonly agent: IIndexedAgent;
5
+ readonly analysis: IClaudeAgentSdkSourceAnalysis;
6
+ readonly kind: 'query-wrapper';
7
+ readonly wrapper: IClaudeAgentSdkQueryWrapper;
8
+ }
9
+ export interface IClaudeAgentSdkInspectedDefinitionAgent {
10
+ readonly agent: IIndexedAgent;
11
+ readonly analysis: IClaudeAgentSdkSourceAnalysis;
12
+ readonly definition: IClaudeAgentSdkAgentDefinition;
13
+ readonly kind: 'programmatic-agent-definition';
14
+ }
15
+ export type IClaudeAgentSdkInspectedAgent = IClaudeAgentSdkInspectedDefinitionAgent | IClaudeAgentSdkInspectedQueryAgent;
16
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/inspection/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,KAAK,EACV,8BAA8B,EAC9B,2BAA2B,EAC3B,6BAA6B,EAC9B,MAAM,uBAAuB,CAAC;AAG/B,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,6BAA6B,CAAC;IACjD,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,2BAA2B,CAAC;CAC/C;AAGD,MAAM,WAAW,uCAAuC;IACtD,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,6BAA6B,CAAC;IACjD,QAAQ,CAAC,UAAU,EAAE,8BAA8B,CAAC;IACpD,QAAQ,CAAC,IAAI,EAAE,+BAA+B,CAAC;CAChD;AAED,MAAM,MAAM,6BAA6B,GACvC,uCAAuC,GAAG,kCAAkC,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { IRepositoryPath, IRepositoryReader } from '@moldea.ai/repository';
2
+ import type { IClaudeAgentSdkPackageDiscoveryResult } from '../contracts/index.js';
3
+ /**
4
+ * Creates nearest-to-root package-manifest candidates for one source path.
5
+ * @param sourcePath The bound repository source path.
6
+ * @returns Deterministically ordered logical package-manifest paths.
7
+ */
8
+ export declare const createPackageManifestCandidatePaths: (sourcePath: IRepositoryPath) => readonly IRepositoryPath[];
9
+ /**
10
+ * Discovers the nearest relevant Claude Agent SDK package declaration.
11
+ * @param repository The Core-owned budget-aware repository reader.
12
+ * @param sourcePath The bound source whose package scope is inspected.
13
+ * @param signal The active inspection signal.
14
+ * @returns The first observed declaration, invalid manifest, or absence result.
15
+ * @throws
16
+ * - INVALID_REPOSITORY_PATH: The repository path is invalid.
17
+ * - ENTRY_NOT_FOUND: The requested repository entry was not found.
18
+ * - ENTRY_NOT_FILE: The requested repository entry is not a file.
19
+ * - ACCESS_DENIED: Access to the repository source was denied.
20
+ * - SOURCE_UNAVAILABLE: The repository source is unavailable.
21
+ * - SNAPSHOT_CHANGED: The repository snapshot changed during the operation.
22
+ * - INVALID_SOURCE_DATA: The repository source returned invalid data.
23
+ * - RESOURCE_LIMIT_EXCEEDED: A repository reading resource limit was exceeded.
24
+ * - ABORTED: The repository operation was aborted.
25
+ */
26
+ export declare const discoverClaudeAgentSdkPackage: (repository: IRepositoryReader, sourcePath: IRepositoryPath, signal?: AbortSignal) => Promise<IClaudeAgentSdkPackageDiscoveryResult>;
27
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/package-discovery/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAOhF,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,uBAAuB,CAAC;AAEnF;;;;GAIG;AACH,eAAO,MAAM,mCAAmC,GAC9C,YAAY,eAAe,KAC1B,SAAS,eAAe,EACgD,CAAC;AAE5E;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,6BAA6B,GACxC,YAAY,iBAAiB,EAC7B,YAAY,eAAe,EAC3B,SAAS,WAAW,KACnB,OAAO,CAAC,qCAAqC,CA4B/C,CAAC"}
@@ -0,0 +1,24 @@
1
+ import ts from 'typescript';
2
+ import type { IClaudeAgentSdkAgentDefinition, IClaudeAgentSdkAgentDefinitionResult, IClaudeAgentSdkSourceAnalysis } from '../contracts/index.js';
3
+ /**
4
+ * Collects every supported direct agents-map use of definitions in one source module.
5
+ * @param analysis The definition source analysis.
6
+ * @returns Identifier occurrences that are registrations rather than mutable escapes.
7
+ */
8
+ export declare const collectClaudeAgentSdkAgentDefinitionReferences: (analysis: IClaudeAgentSdkSourceAnalysis) => ReadonlySet<ts.Identifier>;
9
+ /**
10
+ * Classifies one directly exported immutable AgentDefinition object.
11
+ * @param analysis The indexed source module.
12
+ * @param symbol The exact exported definition symbol.
13
+ * @returns The absent, unsupported, or supported definition state.
14
+ */
15
+ export declare const getClaudeAgentSdkAgentDefinition: (analysis: IClaudeAgentSdkSourceAnalysis, symbol: string) => IClaudeAgentSdkAgentDefinitionResult;
16
+ /**
17
+ * Applies relationship-specific post-declaration mutation uncertainty.
18
+ * @param analysis The definition source analysis.
19
+ * @param definition The supported initial definition.
20
+ * @param allowedReferences Direct uses in supported agents maps.
21
+ * @returns The definition with only affected relationships unresolved.
22
+ */
23
+ export declare const applyClaudeAgentSdkAgentMutations: (analysis: IClaudeAgentSdkSourceAnalysis, definition: IClaudeAgentSdkAgentDefinition, allowedReferences: ReadonlySet<ts.Identifier>) => IClaudeAgentSdkAgentDefinition;
24
+ //# sourceMappingURL=agent-definitions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-definitions.d.ts","sourceRoot":"","sources":["../../src/source-analysis/agent-definitions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAI5B,OAAO,KAAK,EACV,8BAA8B,EAC9B,oCAAoC,EAEpC,6BAA6B,EAC9B,MAAM,uBAAuB,CAAC;AA+B/B;;;;GAIG;AACH,eAAO,MAAM,8CAA8C,GACzD,UAAU,6BAA6B,KACtC,WAAW,CAAC,EAAE,CAAC,UAAU,CAiB3B,CAAC;AAmBF;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,GAC3C,UAAU,6BAA6B,EACvC,QAAQ,MAAM,KACb,oCAmCF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iCAAiC,GAC5C,UAAU,6BAA6B,EACvC,YAAY,8BAA8B,EAC1C,mBAAmB,WAAW,CAAC,EAAE,CAAC,UAAU,CAAC,KAC5C,8BAwBF,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { IRepositoryReference } from '@moldea.ai/core/format';
2
+ import type { IClaudeAgentSdkRelationship, IClaudeAgentSdkSourceAnalysis } from '../contracts/index.js';
3
+ /**
4
+ * Classifies a direct relationship to one explicitly bound runtime symbol.
5
+ * @param relationship The supported configuration relationship.
6
+ * @param analysis The source containing the relationship.
7
+ * @param reference The exact manifest binding.
8
+ * @returns `true` for a match, `false` for proved absence, or `null` when unresolved.
9
+ */
10
+ export declare const classifyClaudeAgentSdkDirectBinding: (relationship: IClaudeAgentSdkRelationship, analysis: IClaudeAgentSdkSourceAnalysis, reference: IRepositoryReference) => boolean | null;
11
+ //# sourceMappingURL=bindings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bindings.d.ts","sourceRoot":"","sources":["../../src/source-analysis/bindings.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,OAAO,KAAK,EACV,2BAA2B,EAC3B,6BAA6B,EAC9B,MAAM,uBAAuB,CAAC;AAE/B;;;;;;GAMG;AACH,eAAO,MAAM,mCAAmC,GAC9C,cAAc,2BAA2B,EACzC,UAAU,6BAA6B,EACvC,WAAW,oBAAoB,KAC9B,OAAO,GAAG,IAgCZ,CAAC"}
@@ -0,0 +1,28 @@
1
+ import ts from 'typescript';
2
+ import type { IClaudeAgentSdkMapEntry, IClaudeAgentSdkRelationship, IClaudeAgentSdkSourceAnalysis } from '../contracts/index.js';
3
+ /**
4
+ * Resolves a closed inline or immutable module-local array relationship.
5
+ * @param relationship The relationship containing the array.
6
+ * @param analysis The source containing the relationship.
7
+ * @param allowedReferences Direct supported uses of the module array.
8
+ * @returns Exact elements, `null` when unresolved, or an empty array when absent.
9
+ */
10
+ export declare const getClaudeAgentSdkClosedArray: (relationship: IClaudeAgentSdkRelationship, analysis: IClaudeAgentSdkSourceAnalysis, allowedReferences: ReadonlySet<ts.Identifier>) => readonly ts.Expression[] | null;
11
+ /**
12
+ * Resolves a closed inline or immutable module-local object relationship.
13
+ * @param relationship The relationship containing the map.
14
+ * @param analysis The source containing the relationship.
15
+ * @param allowedReferences Direct supported uses of the module object.
16
+ * @returns Static direct entries, `null` when unresolved, or an empty array when absent.
17
+ */
18
+ export declare const getClaudeAgentSdkClosedMapEntries: (relationship: IClaudeAgentSdkRelationship, analysis: IClaudeAgentSdkSourceAnalysis, allowedReferences: ReadonlySet<ts.Identifier>) => readonly IClaudeAgentSdkMapEntry[] | null;
19
+ /**
20
+ * Determines whether an identifier resolves to one exact expected source reference.
21
+ * @param expression The map or collection element.
22
+ * @param analysis The source containing the element.
23
+ * @param path The expected source path.
24
+ * @param symbol The expected exported symbol.
25
+ * @returns Whether the exact binding is established.
26
+ */
27
+ export declare const isClaudeAgentSdkBoundReference: (expression: ts.Expression, analysis: IClaudeAgentSdkSourceAnalysis, path: string, symbol: string) => boolean;
28
+ //# sourceMappingURL=collections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../../src/source-analysis/collections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAS5B,OAAO,KAAK,EACV,uBAAuB,EACvB,2BAA2B,EAC3B,6BAA6B,EAC9B,MAAM,uBAAuB,CAAC;AAE/B;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,GACvC,cAAc,2BAA2B,EACzC,UAAU,6BAA6B,EACvC,mBAAmB,WAAW,CAAC,EAAE,CAAC,UAAU,CAAC,KAC5C,SAAS,EAAE,CAAC,UAAU,EAAE,GAAG,IAuB7B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iCAAiC,GAC5C,cAAc,2BAA2B,EACzC,UAAU,6BAA6B,EACvC,mBAAmB,WAAW,CAAC,EAAE,CAAC,UAAU,CAAC,KAC5C,SAAS,uBAAuB,EAAE,GAAG,IAqDvC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,8BAA8B,GACzC,YAAY,EAAE,CAAC,UAAU,EACzB,UAAU,6BAA6B,EACvC,MAAM,MAAM,EACZ,QAAQ,MAAM,KACb,OAUF,CAAC"}
@@ -0,0 +1,14 @@
1
+ export { applyClaudeAgentSdkAgentMutations, collectClaudeAgentSdkAgentDefinitionReferences, getClaudeAgentSdkAgentDefinition, } from './agent-definitions.js';
2
+ export { classifyClaudeAgentSdkDirectBinding } from './bindings.js';
3
+ export { getClaudeAgentSdkClosedArray, getClaudeAgentSdkClosedMapEntries, isClaudeAgentSdkBoundReference, } from './collections.js';
4
+ export { classifyClaudeAgentSdkInstructionLoader } from './instruction-loaders.js';
5
+ export { collectClaudeAgentSdkMcpToolReferences, getClaudeAgentSdkMcpServerDefinition, } from './mcp-servers.js';
6
+ export { analyzeClaudeAgentSdkMutations } from './mutations.js';
7
+ export type { IClaudeAgentSdkMutationAnalysis } from './mutations.js';
8
+ export { getClaudeAgentSdkQueryWrapper } from './query-wrappers.js';
9
+ export type { IClaudeAgentSdkQueryWrapperResult } from './query-wrappers.js';
10
+ export { getClaudeAgentSdkToolDefinition } from './sdk-tools.js';
11
+ export { analyzeClaudeAgentSdkSource } from './source-analysis.js';
12
+ export { resolveClaudeAgentSdkStaticString } from './static-strings.js';
13
+ export { classifyClaudeAgentSdkAgentAvailability, classifyClaudeAgentSdkMcpToolAvailability, collectClaudeAgentSdkRelationshipIdentifiers, matchesClaudeAgentSdkBarePattern, } from './tool-availability.js';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/source-analysis/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iCAAiC,EACjC,8CAA8C,EAC9C,gCAAgC,GACjC,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,mCAAmC,EAAE,MAAM,eAAe,CAAC;AAGpE,OAAO,EACL,4BAA4B,EAC5B,iCAAiC,EACjC,8BAA8B,GAC/B,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,uCAAuC,EAAE,MAAM,0BAA0B,CAAC;AAGnF,OAAO,EACL,sCAAsC,EACtC,oCAAoC,GACrC,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AAChE,YAAY,EAAE,+BAA+B,EAAE,MAAM,gBAAgB,CAAC;AAGtE,OAAO,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AACpE,YAAY,EAAE,iCAAiC,EAAE,MAAM,qBAAqB,CAAC;AAG7E,OAAO,EAAE,+BAA+B,EAAE,MAAM,gBAAgB,CAAC;AAGjE,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAGnE,OAAO,EAAE,iCAAiC,EAAE,MAAM,qBAAqB,CAAC;AAGxE,OAAO,EACL,uCAAuC,EACvC,yCAAyC,EACzC,4CAA4C,EAC5C,gCAAgC,GACjC,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { IRepositoryReference } from '@moldea.ai/core/format';
2
+ import type { IClaudeAgentSdkRelationship, IClaudeAgentSdkSourceAnalysis } from '../contracts/index.js';
3
+ /**
4
+ * Classifies a direct loader call used by a canonical Claude prompt relationship.
5
+ * @param relationship The systemPrompt or AgentDefinition.prompt relationship.
6
+ * @param analysis The source containing the relationship.
7
+ * @param reference The exact declared instruction-loader binding.
8
+ * @param supportsPreset Whether the query-level claude_code preset is allowed.
9
+ * @returns `true` for wired, `false` for provably unwired, or `null` when unresolved.
10
+ */
11
+ export declare const classifyClaudeAgentSdkInstructionLoader: (relationship: IClaudeAgentSdkRelationship, analysis: IClaudeAgentSdkSourceAnalysis, reference: IRepositoryReference, supportsPreset: boolean) => boolean | null;
12
+ //# sourceMappingURL=instruction-loaders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instruction-loaders.d.ts","sourceRoot":"","sources":["../../src/source-analysis/instruction-loaders.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,OAAO,KAAK,EACV,2BAA2B,EAC3B,6BAA6B,EAC9B,MAAM,uBAAuB,CAAC;AAsD/B;;;;;;;GAOG;AACH,eAAO,MAAM,uCAAuC,GAClD,cAAc,2BAA2B,EACzC,UAAU,6BAA6B,EACvC,WAAW,oBAAoB,EAC/B,gBAAgB,OAAO,KACtB,OAAO,GAAG,IAqCZ,CAAC"}
@@ -0,0 +1,16 @@
1
+ import ts from 'typescript';
2
+ import type { IClaudeAgentSdkMcpServerDefinition, IClaudeAgentSdkSourceAnalysis } from '../contracts/index.js';
3
+ /**
4
+ * Classifies one module-local createSdkMcpServer(...) declaration.
5
+ * @param analysis The indexed server source.
6
+ * @param symbol The exact module-local binding name.
7
+ * @returns The supported server definition or `null`.
8
+ */
9
+ export declare const getClaudeAgentSdkMcpServerDefinition: (analysis: IClaudeAgentSdkSourceAnalysis, symbol: string) => IClaudeAgentSdkMcpServerDefinition | null;
10
+ /**
11
+ * Collects direct tool identifiers used by supported module-local SDK MCP servers.
12
+ * @param analysis The source containing tool and server declarations.
13
+ * @returns Identifier occurrences that are registrations rather than value escapes.
14
+ */
15
+ export declare const collectClaudeAgentSdkMcpToolReferences: (analysis: IClaudeAgentSdkSourceAnalysis) => ReadonlySet<ts.Identifier>;
16
+ //# sourceMappingURL=mcp-servers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-servers.d.ts","sourceRoot":"","sources":["../../src/source-analysis/mcp-servers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAS5B,OAAO,KAAK,EACV,kCAAkC,EAClC,6BAA6B,EAC9B,MAAM,uBAAuB,CAAC;AAY/B;;;;;GAKG;AACH,eAAO,MAAM,oCAAoC,GAC/C,UAAU,6BAA6B,EACvC,QAAQ,MAAM,KACb,kCAAkC,GAAG,IA6CvC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sCAAsC,GACjD,UAAU,6BAA6B,KACtC,WAAW,CAAC,EAAE,CAAC,UAAU,CAuB3B,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type ts from 'typescript';
2
+ import type { IClaudeAgentSdkSourceAnalysis } from '../contracts/index.js';
3
+ export interface IClaudeAgentSdkMutationAnalysis {
4
+ readonly hasUnknownMutation: boolean;
5
+ readonly mutatedMembers: ReadonlySet<string>;
6
+ }
7
+ /**
8
+ * Classifies module-local mutations and escapes for one returned SDK object.
9
+ * @param analysis The indexed source containing the binding.
10
+ * @param declaration The module-local constant declaration.
11
+ * @param allowedReferences Bare identifier uses proven to be supported registrations or targets.
12
+ * @returns Member-specific mutations and whether an unknown use can affect every relationship.
13
+ */
14
+ export declare const analyzeClaudeAgentSdkMutations: (analysis: IClaudeAgentSdkSourceAnalysis, declaration: ts.VariableDeclaration, allowedReferences: ReadonlySet<ts.Identifier>) => IClaudeAgentSdkMutationAnalysis;
15
+ //# sourceMappingURL=mutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../src/source-analysis/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAIjC,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAE3E,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;IACrC,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC9C;AAED;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B,GACzC,UAAU,6BAA6B,EACvC,aAAa,EAAE,CAAC,mBAAmB,EACnC,mBAAmB,WAAW,CAAC,EAAE,CAAC,UAAU,CAAC,KAC5C,+BACoE,CAAC"}
@@ -0,0 +1,19 @@
1
+ import ts from 'typescript';
2
+ import type { IClaudeAgentSdkQueryWrapper, IClaudeAgentSdkSourceAnalysis } from '../contracts/index.js';
3
+ export type IClaudeAgentSdkQueryWrapperResult = {
4
+ readonly kind: 'absent';
5
+ } | {
6
+ readonly declaration: ts.Node;
7
+ readonly kind: 'present-unsupported';
8
+ } | {
9
+ readonly kind: 'present-supported';
10
+ readonly wrapper: IClaudeAgentSdkQueryWrapper;
11
+ };
12
+ /**
13
+ * Classifies one directly exported query wrapper and its complete direct-call set.
14
+ * @param analysis The indexed runtime source.
15
+ * @param symbol The exact bound runtime-agent symbol.
16
+ * @returns The absent, unsupported, or supported query-wrapper state.
17
+ */
18
+ export declare const getClaudeAgentSdkQueryWrapper: (analysis: IClaudeAgentSdkSourceAnalysis, symbol: string) => IClaudeAgentSdkQueryWrapperResult;
19
+ //# sourceMappingURL=query-wrappers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-wrappers.d.ts","sourceRoot":"","sources":["../../src/source-analysis/query-wrappers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAS5B,OAAO,KAAK,EAEV,2BAA2B,EAE3B,6BAA6B,EAC9B,MAAM,uBAAuB,CAAC;AAe/B,MAAM,MAAM,iCAAiC,GACzC;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,GAC3B;IAAE,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC,IAAI,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAA;CAAE,GACvE;IAAE,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,2BAA2B,CAAA;CAAE,CAAC;AAsD1F;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,GACxC,UAAU,6BAA6B,EACvC,QAAQ,MAAM,KACb,iCAwDF,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { IClaudeAgentSdkSourceAnalysis, IClaudeAgentSdkToolDefinitionResult } from '../contracts/index.js';
2
+ /**
3
+ * Classifies one directly exported root tool(...) declaration.
4
+ * @param analysis The indexed tool source.
5
+ * @param symbol The exact exported tool registration symbol.
6
+ * @returns The absent, unsupported, or structurally supported tool state.
7
+ */
8
+ export declare const getClaudeAgentSdkToolDefinition: (analysis: IClaudeAgentSdkSourceAnalysis, symbol: string) => IClaudeAgentSdkToolDefinitionResult;
9
+ //# sourceMappingURL=sdk-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sdk-tools.d.ts","sourceRoot":"","sources":["../../src/source-analysis/sdk-tools.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,6BAA6B,EAE7B,mCAAmC,EACpC,MAAM,uBAAuB,CAAC;AAE/B;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,GAC1C,UAAU,6BAA6B,EACvC,QAAQ,MAAM,KACb,mCA2CF,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { IRepositoryPath } from '@moldea.ai/repository';
2
+ import type { IClaudeAgentSdkSourceAnalysisResult } from '../contracts/index.js';
3
+ /**
4
+ * Parses and indexes one Claude Agent SDK TypeScript module without executing it.
5
+ * @param path The normalized repository source path.
6
+ * @param bytes The exact repository bytes.
7
+ * @param signal The active inspection signal.
8
+ * @returns The source analysis or a stable invalid source result.
9
+ */
10
+ export declare const analyzeClaudeAgentSdkSource: (path: IRepositoryPath, bytes: Uint8Array, signal?: AbortSignal) => IClaudeAgentSdkSourceAnalysisResult;
11
+ //# sourceMappingURL=source-analysis.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-analysis.d.ts","sourceRoot":"","sources":["../../src/source-analysis/source-analysis.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAG7D,OAAO,KAAK,EAGV,mCAAmC,EACpC,MAAM,uBAAuB,CAAC;AA6C/B;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,GACtC,MAAM,eAAe,EACrB,OAAO,UAAU,EACjB,SAAS,WAAW,KACnB,mCAcF,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type ts from 'typescript';
2
+ import type { IClaudeAgentSdkInspectionSession, IClaudeAgentSdkSourceAnalysis, IClaudeAgentSdkStaticStringResult } from '../contracts/index.js';
3
+ /**
4
+ * Resolves one exact supported static string without normalization or execution.
5
+ * @param session The operation-local source session.
6
+ * @param analysis The source containing the expression.
7
+ * @param expression The candidate static string expression.
8
+ * @returns The exact compiler-parsed string or an unsupported state.
9
+ */
10
+ export declare const resolveClaudeAgentSdkStaticString: (session: IClaudeAgentSdkInspectionSession, analysis: IClaudeAgentSdkSourceAnalysis, expression: ts.Expression) => Promise<IClaudeAgentSdkStaticStringResult>;
11
+ //# sourceMappingURL=static-strings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"static-strings.d.ts","sourceRoot":"","sources":["../../src/source-analysis/static-strings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAKjC,OAAO,KAAK,EACV,gCAAgC,EAChC,6BAA6B,EAC7B,iCAAiC,EAClC,MAAM,uBAAuB,CAAC;AAE/B;;;;;;GAMG;AACH,eAAO,MAAM,iCAAiC,GAC5C,SAAS,gCAAgC,EACzC,UAAU,6BAA6B,EACvC,YAAY,EAAE,CAAC,UAAU,KACxB,OAAO,CAAC,iCAAiC,CAQxC,CAAC"}
@@ -0,0 +1,41 @@
1
+ import ts from 'typescript';
2
+ import type { IClaudeAgentSdkAvailability, IClaudeAgentSdkRelationship, IClaudeAgentSdkSourceAnalysis, IClaudeAgentSdkStaticStringResult } from '../contracts/index.js';
3
+ type IStaticStringResolver = (analysis: IClaudeAgentSdkSourceAnalysis, expression: ts.Expression) => Promise<IClaudeAgentSdkStaticStringResult>;
4
+ /**
5
+ * Matches a complete runtime tool name against the supported bare `*` glob model.
6
+ * @param pattern The exact compiler-parsed deny pattern.
7
+ * @param runtimeName The complete runtime-visible tool name.
8
+ * @returns Whether the complete name matches.
9
+ */
10
+ export declare const matchesClaudeAgentSdkBarePattern: (pattern: string, runtimeName: string) => boolean;
11
+ /**
12
+ * Derives query-configured availability of the built-in Agent delegation tool.
13
+ * @param analysis The query source analysis.
14
+ * @param tools The query-level tools relationship.
15
+ * @param disallowedTools The query-level deny relationship.
16
+ * @param agentSelection The unsupported main-thread selection relationship.
17
+ * @param toolAliases The unsupported tool-alias relationship.
18
+ * @param allowedReferences Supported references to shared list constants.
19
+ * @param resolveStaticString The operation-local exact string resolver.
20
+ * @returns The relationship-local availability state.
21
+ */
22
+ export declare const classifyClaudeAgentSdkAgentAvailability: (analysis: IClaudeAgentSdkSourceAnalysis, tools: IClaudeAgentSdkRelationship, disallowedTools: IClaudeAgentSdkRelationship, agentSelection: IClaudeAgentSdkRelationship, toolAliases: IClaudeAgentSdkRelationship, allowedReferences: ReadonlySet<ts.Identifier>, resolveStaticString: IStaticStringResolver) => Promise<IClaudeAgentSdkAvailability>;
23
+ /**
24
+ * Derives query- or subagent-level availability of one exact SDK MCP tool.
25
+ * @param analysis The source containing the availability relationships.
26
+ * @param current The inherited availability state.
27
+ * @param tools The optional explicit allow-list relationship.
28
+ * @param disallowedTools The deny relationship.
29
+ * @param agentSelection The unsupported main-thread selection relationship when query-level.
30
+ * @param toolAliases The unsupported alias relationship when query-level.
31
+ * @param allowedReferences Supported references to shared list constants.
32
+ * @param runtimeName The exact fully qualified runtime tool name.
33
+ * @param serverKey The canonical query-level server key.
34
+ * @param resolveStaticString The operation-local exact string resolver.
35
+ * @returns The refined availability state.
36
+ */
37
+ export declare const classifyClaudeAgentSdkMcpToolAvailability: (analysis: IClaudeAgentSdkSourceAnalysis, current: IClaudeAgentSdkAvailability, tools: IClaudeAgentSdkRelationship | null, disallowedTools: IClaudeAgentSdkRelationship, agentSelection: IClaudeAgentSdkRelationship | null, toolAliases: IClaudeAgentSdkRelationship | null, allowedReferences: ReadonlySet<ts.Identifier>, runtimeName: string, serverKey: string, resolveStaticString: IStaticStringResolver) => Promise<IClaudeAgentSdkAvailability>;
38
+ /** Collects direct identifier relationships allowed to share immutable module collections. */
39
+ export declare const collectClaudeAgentSdkRelationshipIdentifiers: (relationships: readonly IClaudeAgentSdkRelationship[]) => ReadonlySet<ts.Identifier>;
40
+ export {};
41
+ //# sourceMappingURL=tool-availability.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-availability.d.ts","sourceRoot":"","sources":["../../src/source-analysis/tool-availability.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAI5B,OAAO,KAAK,EACV,2BAA2B,EAC3B,2BAA2B,EAC3B,6BAA6B,EAC7B,iCAAiC,EAClC,MAAM,uBAAuB,CAAC;AAG/B,KAAK,qBAAqB,GAAG,CAC3B,QAAQ,EAAE,6BAA6B,EACvC,UAAU,EAAE,EAAE,CAAC,UAAU,KACtB,OAAO,CAAC,iCAAiC,CAAC,CAAC;AAMhD;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,GAAI,SAAS,MAAM,EAAE,aAAa,MAAM,KAAG,OAkCvF,CAAC;AAmFF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uCAAuC,GAClD,UAAU,6BAA6B,EACvC,OAAO,2BAA2B,EAClC,iBAAiB,2BAA2B,EAC5C,gBAAgB,2BAA2B,EAC3C,aAAa,2BAA2B,EACxC,mBAAmB,WAAW,CAAC,EAAE,CAAC,UAAU,CAAC,EAC7C,qBAAqB,qBAAqB,KACzC,OAAO,CAAC,2BAA2B,CAyCrC,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,yCAAyC,GACpD,UAAU,6BAA6B,EACvC,SAAS,2BAA2B,EACpC,OAAO,2BAA2B,GAAG,IAAI,EACzC,iBAAiB,2BAA2B,EAC5C,gBAAgB,2BAA2B,GAAG,IAAI,EAClD,aAAa,2BAA2B,GAAG,IAAI,EAC/C,mBAAmB,WAAW,CAAC,EAAE,CAAC,UAAU,CAAC,EAC7C,aAAa,MAAM,EACnB,WAAW,MAAM,EACjB,qBAAqB,qBAAqB,KACzC,OAAO,CAAC,2BAA2B,CAgCrC,CAAC;AAEF,8FAA8F;AAC9F,eAAO,MAAM,4CAA4C,GACvD,eAAe,SAAS,2BAA2B,EAAE,KACpD,WAAW,CAAC,EAAE,CAAC,UAAU,CAUzB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "@moldea.ai/adapter-claude-agent-sdk",
3
+ "version": "1.0.0",
4
+ "description": "Deterministic runtime evidence and diagnostics for Claude Agent SDK query and subagent integrations.",
5
+ "homepage": "https://github.com/moldea-ai/packages/tree/main/projects/adapter-claude-agent-sdk#readme",
6
+ "bugs": {
7
+ "url": "https://github.com/moldea-ai/packages/issues"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/moldea-ai/packages.git",
12
+ "directory": "projects/adapter-claude-agent-sdk"
13
+ },
14
+ "license": "MIT",
15
+ "author": "Jesus Graterol",
16
+ "type": "module",
17
+ "sideEffects": false,
18
+ "files": [
19
+ "cover.png",
20
+ "dist",
21
+ "LICENSE",
22
+ "README.md"
23
+ ],
24
+ "exports": {
25
+ ".": {
26
+ "types": "./dist/index.d.ts",
27
+ "import": "./dist/index.js"
28
+ }
29
+ },
30
+ "main": "./dist/index.js",
31
+ "types": "./dist/index.d.ts",
32
+ "engines": {
33
+ "node": "^22.11.0 || ^24.11.0"
34
+ },
35
+ "dependencies": {
36
+ "@moldea.ai/core": "^2.0.0",
37
+ "@moldea.ai/repository": "^1.0.0",
38
+ "semver": "7.8.5",
39
+ "typescript": "6.0.3"
40
+ },
41
+ "devDependencies": {
42
+ "@types/node": "22.20.1",
43
+ "@types/semver": "7.8.0",
44
+ "vite": "8.2.1",
45
+ "vitest": "4.1.10",
46
+ "@moldea.ai/adapter-static-analysis": "0.0.0"
47
+ },
48
+ "publishConfig": {
49
+ "access": "public"
50
+ },
51
+ "scripts": {
52
+ "build": "vite build --emptyOutDir && tsc -p tsconfig.build.json",
53
+ "dev": "vite build --watch",
54
+ "lint": "eslint .",
55
+ "test": "pnpm run test:unit && pnpm run test:integration",
56
+ "test:integration": "pnpm run build && vitest run --config vitest/test-integration.config.ts",
57
+ "test:unit": "vitest run --config vitest/test-unit.config.ts",
58
+ "typecheck": "tsc -p tsconfig.src.json --noEmit && tsc -p tsconfig.json --noEmit"
59
+ }
60
+ }