@resourcexjs/arp 2.7.0 → 2.8.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/dist/index.d.ts CHANGED
@@ -386,6 +386,34 @@ declare class SemanticError extends ARPError {
386
386
  readonly semantic?: string;
387
387
  constructor(message: string, semantic?: string, options?: ErrorOptions);
388
388
  }
389
+ interface BinaryResource extends Resource<Buffer> {
390
+ type: "binary";
391
+ content: Buffer;
392
+ }
393
+ /**
394
+ * Supported binary input types for deposit
395
+ */
396
+ type BinaryInput = Buffer | Uint8Array | ArrayBuffer | number[];
397
+ declare class BinarySemanticHandler implements SemanticHandler<Buffer> {
398
+ readonly name = "binary";
399
+ resolve(transport: TransportHandler, location: string, context: SemanticContext): Promise<BinaryResource>;
400
+ deposit(transport: TransportHandler, location: string, data: BinaryInput, context: SemanticContext): Promise<void>;
401
+ exists(transport: TransportHandler, location: string, _context: SemanticContext): Promise<boolean>;
402
+ delete(transport: TransportHandler, location: string, _context: SemanticContext): Promise<void>;
403
+ }
404
+ declare const binarySemantic: BinarySemanticHandler;
405
+ interface TextResource extends Resource<string> {
406
+ type: "text";
407
+ content: string;
408
+ }
409
+ declare class TextSemanticHandler implements SemanticHandler<string> {
410
+ readonly name = "text";
411
+ resolve(transport: TransportHandler, location: string, context: SemanticContext): Promise<TextResource>;
412
+ deposit(transport: TransportHandler, location: string, data: string, context: SemanticContext): Promise<void>;
413
+ exists(transport: TransportHandler, location: string, _context: SemanticContext): Promise<boolean>;
414
+ delete(transport: TransportHandler, location: string, _context: SemanticContext): Promise<void>;
415
+ }
416
+ declare const textSemantic: TextSemanticHandler;
389
417
  declare class FileTransportHandler implements TransportHandler {
390
418
  readonly name = "file";
391
419
  private resolvePath;
@@ -460,33 +488,5 @@ declare class HttpTransportHandler implements TransportHandler {
460
488
  }
461
489
  declare const httpsTransport: HttpTransportHandler;
462
490
  declare const httpTransport: HttpTransportHandler;
463
- interface TextResource extends Resource<string> {
464
- type: "text";
465
- content: string;
466
- }
467
- declare class TextSemanticHandler implements SemanticHandler<string> {
468
- readonly name = "text";
469
- resolve(transport: TransportHandler, location: string, context: SemanticContext): Promise<TextResource>;
470
- deposit(transport: TransportHandler, location: string, data: string, context: SemanticContext): Promise<void>;
471
- exists(transport: TransportHandler, location: string, _context: SemanticContext): Promise<boolean>;
472
- delete(transport: TransportHandler, location: string, _context: SemanticContext): Promise<void>;
473
- }
474
- declare const textSemantic: TextSemanticHandler;
475
- interface BinaryResource extends Resource<Buffer> {
476
- type: "binary";
477
- content: Buffer;
478
- }
479
- /**
480
- * Supported binary input types for deposit
481
- */
482
- type BinaryInput = Buffer | Uint8Array | ArrayBuffer | number[];
483
- declare class BinarySemanticHandler implements SemanticHandler<Buffer> {
484
- readonly name = "binary";
485
- resolve(transport: TransportHandler, location: string, context: SemanticContext): Promise<BinaryResource>;
486
- deposit(transport: TransportHandler, location: string, data: BinaryInput, context: SemanticContext): Promise<void>;
487
- exists(transport: TransportHandler, location: string, _context: SemanticContext): Promise<boolean>;
488
- delete(transport: TransportHandler, location: string, _context: SemanticContext): Promise<void>;
489
- }
490
- declare const binarySemantic: BinarySemanticHandler;
491
491
  declare const VERSION: string;
492
492
  export { textSemantic, httpsTransport, httpTransport, fileTransport, createARP, binarySemantic, VERSION, TransportResult, TransportParams, TransportHandler, TransportError, TextSemanticHandler, TextResource, SemanticHandler, SemanticError, SemanticContext, ResourceMeta, Resource, ParseError, ListOptions, HttpTransportHandler, FileTransportHandler, BinarySemanticHandler, BinaryResource, BinaryInput, ARPError, ARPConfig, ARP, ARL, ARI };
package/dist/index.js CHANGED
@@ -107,9 +107,126 @@ class ARL {
107
107
  }
108
108
  }
109
109
 
110
+ // src/semantic/binary.ts
111
+ function toBuffer(data) {
112
+ if (Buffer.isBuffer(data)) {
113
+ return data;
114
+ }
115
+ if (data instanceof Uint8Array) {
116
+ return Buffer.from(data);
117
+ }
118
+ if (data instanceof ArrayBuffer) {
119
+ return Buffer.from(data);
120
+ }
121
+ if (Array.isArray(data)) {
122
+ return Buffer.from(data);
123
+ }
124
+ throw new SemanticError(`Unsupported binary input type`, "binary");
125
+ }
126
+
127
+ class BinarySemanticHandler {
128
+ name = "binary";
129
+ async resolve(transport, location, context) {
130
+ const result = await transport.get(location, context.params);
131
+ const meta = {
132
+ url: context.url,
133
+ semantic: context.semantic,
134
+ transport: context.transport,
135
+ location: context.location,
136
+ size: result.metadata?.size ?? result.content.length,
137
+ resolvedAt: context.timestamp.toISOString(),
138
+ type: result.metadata?.type
139
+ };
140
+ return {
141
+ type: "binary",
142
+ content: result.content,
143
+ meta
144
+ };
145
+ }
146
+ async deposit(transport, location, data, context) {
147
+ const buffer = toBuffer(data);
148
+ try {
149
+ await transport.set(location, buffer, context.params);
150
+ } catch (error) {
151
+ throw new SemanticError(`Failed to deposit binary to "${location}": ${error.message}`, this.name, { cause: error });
152
+ }
153
+ }
154
+ async exists(transport, location, _context) {
155
+ return transport.exists(location);
156
+ }
157
+ async delete(transport, location, _context) {
158
+ try {
159
+ await transport.delete(location);
160
+ } catch (error) {
161
+ throw new SemanticError(`Failed to delete "${location}": ${error.message}`, this.name, { cause: error });
162
+ }
163
+ }
164
+ }
165
+ var binarySemantic = new BinarySemanticHandler;
166
+ // src/semantic/text.ts
167
+ class TextSemanticHandler {
168
+ name = "text";
169
+ async resolve(transport, location, context) {
170
+ const result = await transport.get(location, context.params);
171
+ if (result.metadata?.type === "directory") {
172
+ const meta2 = {
173
+ url: context.url,
174
+ semantic: context.semantic,
175
+ transport: context.transport,
176
+ location: context.location,
177
+ size: result.content.length,
178
+ encoding: "utf-8",
179
+ mimeType: "application/json",
180
+ resolvedAt: context.timestamp.toISOString(),
181
+ type: "directory"
182
+ };
183
+ return {
184
+ type: "text",
185
+ content: result.content.toString("utf-8"),
186
+ meta: meta2
187
+ };
188
+ }
189
+ const text = result.content.toString("utf-8");
190
+ const meta = {
191
+ url: context.url,
192
+ semantic: context.semantic,
193
+ transport: context.transport,
194
+ location: context.location,
195
+ size: result.metadata?.size ?? result.content.length,
196
+ encoding: "utf-8",
197
+ mimeType: "text/plain",
198
+ resolvedAt: context.timestamp.toISOString(),
199
+ type: "file"
200
+ };
201
+ return {
202
+ type: "text",
203
+ content: text,
204
+ meta
205
+ };
206
+ }
207
+ async deposit(transport, location, data, context) {
208
+ const buffer = Buffer.from(data, "utf-8");
209
+ try {
210
+ await transport.set(location, buffer, context.params);
211
+ } catch (error) {
212
+ throw new SemanticError(`Failed to deposit text to "${location}": ${error.message}`, this.name, { cause: error });
213
+ }
214
+ }
215
+ async exists(transport, location, _context) {
216
+ return transport.exists(location);
217
+ }
218
+ async delete(transport, location, _context) {
219
+ try {
220
+ await transport.delete(location);
221
+ } catch (error) {
222
+ throw new SemanticError(`Failed to delete "${location}": ${error.message}`, this.name, { cause: error });
223
+ }
224
+ }
225
+ }
226
+ var textSemantic = new TextSemanticHandler;
110
227
  // src/transport/file.ts
111
- import { readFile, writeFile, readdir, mkdir, rm, access, stat } from "node:fs/promises";
112
- import { resolve, dirname, join } from "node:path";
228
+ import { access, mkdir, readdir, readFile, rm, stat, writeFile } from "node:fs/promises";
229
+ import { dirname, join, resolve } from "node:path";
113
230
  class FileTransportHandler {
114
231
  name = "file";
115
232
  resolvePath(location) {
@@ -319,123 +436,6 @@ class HttpTransportHandler {
319
436
  }
320
437
  var httpsTransport = new HttpTransportHandler("https");
321
438
  var httpTransport = new HttpTransportHandler("http");
322
- // src/semantic/text.ts
323
- class TextSemanticHandler {
324
- name = "text";
325
- async resolve(transport, location, context) {
326
- const result = await transport.get(location, context.params);
327
- if (result.metadata?.type === "directory") {
328
- const meta2 = {
329
- url: context.url,
330
- semantic: context.semantic,
331
- transport: context.transport,
332
- location: context.location,
333
- size: result.content.length,
334
- encoding: "utf-8",
335
- mimeType: "application/json",
336
- resolvedAt: context.timestamp.toISOString(),
337
- type: "directory"
338
- };
339
- return {
340
- type: "text",
341
- content: result.content.toString("utf-8"),
342
- meta: meta2
343
- };
344
- }
345
- const text = result.content.toString("utf-8");
346
- const meta = {
347
- url: context.url,
348
- semantic: context.semantic,
349
- transport: context.transport,
350
- location: context.location,
351
- size: result.metadata?.size ?? result.content.length,
352
- encoding: "utf-8",
353
- mimeType: "text/plain",
354
- resolvedAt: context.timestamp.toISOString(),
355
- type: "file"
356
- };
357
- return {
358
- type: "text",
359
- content: text,
360
- meta
361
- };
362
- }
363
- async deposit(transport, location, data, context) {
364
- const buffer = Buffer.from(data, "utf-8");
365
- try {
366
- await transport.set(location, buffer, context.params);
367
- } catch (error) {
368
- throw new SemanticError(`Failed to deposit text to "${location}": ${error.message}`, this.name, { cause: error });
369
- }
370
- }
371
- async exists(transport, location, _context) {
372
- return transport.exists(location);
373
- }
374
- async delete(transport, location, _context) {
375
- try {
376
- await transport.delete(location);
377
- } catch (error) {
378
- throw new SemanticError(`Failed to delete "${location}": ${error.message}`, this.name, { cause: error });
379
- }
380
- }
381
- }
382
- var textSemantic = new TextSemanticHandler;
383
- // src/semantic/binary.ts
384
- function toBuffer(data) {
385
- if (Buffer.isBuffer(data)) {
386
- return data;
387
- }
388
- if (data instanceof Uint8Array) {
389
- return Buffer.from(data);
390
- }
391
- if (data instanceof ArrayBuffer) {
392
- return Buffer.from(data);
393
- }
394
- if (Array.isArray(data)) {
395
- return Buffer.from(data);
396
- }
397
- throw new SemanticError(`Unsupported binary input type`, "binary");
398
- }
399
-
400
- class BinarySemanticHandler {
401
- name = "binary";
402
- async resolve(transport, location, context) {
403
- const result = await transport.get(location, context.params);
404
- const meta = {
405
- url: context.url,
406
- semantic: context.semantic,
407
- transport: context.transport,
408
- location: context.location,
409
- size: result.metadata?.size ?? result.content.length,
410
- resolvedAt: context.timestamp.toISOString(),
411
- type: result.metadata?.type
412
- };
413
- return {
414
- type: "binary",
415
- content: result.content,
416
- meta
417
- };
418
- }
419
- async deposit(transport, location, data, context) {
420
- const buffer = toBuffer(data);
421
- try {
422
- await transport.set(location, buffer, context.params);
423
- } catch (error) {
424
- throw new SemanticError(`Failed to deposit binary to "${location}": ${error.message}`, this.name, { cause: error });
425
- }
426
- }
427
- async exists(transport, location, _context) {
428
- return transport.exists(location);
429
- }
430
- async delete(transport, location, _context) {
431
- try {
432
- await transport.delete(location);
433
- } catch (error) {
434
- throw new SemanticError(`Failed to delete "${location}": ${error.message}`, this.name, { cause: error });
435
- }
436
- }
437
- }
438
- var binarySemantic = new BinarySemanticHandler;
439
439
  // src/ARP.ts
440
440
  class ARP {
441
441
  transports;
@@ -518,7 +518,7 @@ function createARP(config) {
518
518
  }
519
519
 
520
520
  // src/index.ts
521
- var VERSION = "2.7.0";
521
+ var VERSION = "2.8.0";
522
522
  export {
523
523
  textSemantic,
524
524
  httpsTransport,
@@ -538,4 +538,4 @@ export {
538
538
  ARP
539
539
  };
540
540
 
541
- //# debugId=50FA1E8A61DC73B864756E2164756E21
541
+ //# debugId=A29CE647E53652E264756E2164756E21
package/dist/index.js.map CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../src/errors.ts", "../src/ARL.ts", "../src/transport/file.ts", "../src/transport/http.ts", "../src/semantic/text.ts", "../src/semantic/binary.ts", "../src/ARP.ts", "../src/index.ts"],
3
+ "sources": ["../src/errors.ts", "../src/ARL.ts", "../src/semantic/binary.ts", "../src/semantic/text.ts", "../src/transport/file.ts", "../src/transport/http.ts", "../src/ARP.ts", "../src/index.ts"],
4
4
  "sourcesContent": [
5
5
  "/**\n * ARP Error Types\n */\n\n/**\n * Base error class for all ARP errors\n */\nexport class ARPError extends Error {\n constructor(message: string, options?: ErrorOptions) {\n super(message, options);\n this.name = \"ARPError\";\n }\n}\n\n/**\n * Error thrown when ARP URL parsing fails\n */\nexport class ParseError extends ARPError {\n constructor(\n message: string,\n public readonly url?: string\n ) {\n super(message);\n this.name = \"ParseError\";\n }\n}\n\n/**\n * Error thrown when transport layer fails\n */\nexport class TransportError extends ARPError {\n constructor(\n message: string,\n public readonly transport?: string,\n options?: ErrorOptions\n ) {\n super(message, options);\n this.name = \"TransportError\";\n }\n}\n\n/**\n * Error thrown when semantic layer fails\n */\nexport class SemanticError extends ARPError {\n constructor(\n message: string,\n public readonly semantic?: string,\n options?: ErrorOptions\n ) {\n super(message, options);\n this.name = \"SemanticError\";\n }\n}\n",
6
- "/**\n * ARL - Agent Resource Locator Implementation\n */\n\nimport type { ARL as IARL } from \"./types.js\";\nimport type { Resource, SemanticContext, SemanticHandler } from \"./semantic/types.js\";\nimport type { TransportHandler, TransportParams, ListOptions } from \"./transport/types.js\";\nimport { SemanticError, TransportError } from \"./errors.js\";\n\n/**\n * Handler resolver interface (implemented by ARP instance)\n */\nexport interface HandlerResolver {\n getTransportHandler(name: string): TransportHandler;\n getSemanticHandler(name: string): SemanticHandler;\n}\n\n/**\n * ARL Implementation\n */\nexport class ARL implements IARL {\n readonly semantic: string;\n readonly transport: string;\n readonly location: string;\n\n private readonly resolver: HandlerResolver;\n\n constructor(semantic: string, transport: string, location: string, resolver: HandlerResolver) {\n this.semantic = semantic;\n this.transport = transport;\n this.location = location;\n this.resolver = resolver;\n }\n\n /**\n * Create semantic context\n */\n private createContext(params?: TransportParams): SemanticContext {\n return {\n url: this.toString(),\n semantic: this.semantic,\n transport: this.transport,\n location: this.location,\n timestamp: new Date(),\n params,\n };\n }\n\n /**\n * Resolve the resource\n */\n async resolve(params?: TransportParams): Promise<Resource> {\n const transport = this.resolver.getTransportHandler(this.transport);\n const semantic = this.resolver.getSemanticHandler(this.semantic);\n const context = this.createContext(params);\n\n return semantic.resolve(transport, this.location, context);\n }\n\n /**\n * Deposit data to the resource\n */\n async deposit(data: unknown, params?: TransportParams): Promise<void> {\n const transport = this.resolver.getTransportHandler(this.transport);\n const semantic = this.resolver.getSemanticHandler(this.semantic);\n const context = this.createContext(params);\n\n if (!semantic.deposit) {\n throw new SemanticError(\n `Semantic \"${semantic.name}\" does not support deposit operation`,\n this.semantic\n );\n }\n\n await semantic.deposit(transport, this.location, data, context);\n }\n\n /**\n * Check if resource exists\n */\n async exists(): Promise<boolean> {\n const transport = this.resolver.getTransportHandler(this.transport);\n const semantic = this.resolver.getSemanticHandler(this.semantic);\n const context = this.createContext();\n\n if (semantic.exists) {\n return semantic.exists(transport, this.location, context);\n }\n\n // Fallback to transport exists\n return transport.exists(this.location);\n }\n\n /**\n * Delete the resource\n */\n async delete(): Promise<void> {\n const transport = this.resolver.getTransportHandler(this.transport);\n const semantic = this.resolver.getSemanticHandler(this.semantic);\n const context = this.createContext();\n\n if (semantic.delete) {\n return semantic.delete(transport, this.location, context);\n }\n\n // Fallback to transport delete\n await transport.delete(this.location);\n }\n\n /**\n * List directory contents\n */\n async list(options?: ListOptions): Promise<string[]> {\n const transport = this.resolver.getTransportHandler(this.transport);\n\n if (!transport.list) {\n throw new TransportError(\n `Transport \"${transport.name}\" does not support list operation`,\n this.transport\n );\n }\n\n return transport.list(this.location, options);\n }\n\n /**\n * Create directory\n */\n async mkdir(): Promise<void> {\n const transport = this.resolver.getTransportHandler(this.transport);\n\n if (!transport.mkdir) {\n throw new TransportError(\n `Transport \"${transport.name}\" does not support mkdir operation`,\n this.transport\n );\n }\n\n await transport.mkdir(this.location);\n }\n\n /**\n * Convert to ARP URL string\n */\n toString(): string {\n return `arp:${this.semantic}:${this.transport}://${this.location}`;\n }\n}\n",
7
- "/**\n * File Transport Handler\n * Provides I/O primitives for local filesystem\n *\n * Supported params:\n * - recursive: \"true\" - list directories recursively\n * - pattern: glob pattern - filter files by pattern (e.g., \"*.json\")\n */\n\nimport { readFile, writeFile, readdir, mkdir, rm, access, stat } from \"node:fs/promises\";\nimport { resolve, dirname, join } from \"node:path\";\nimport { TransportError } from \"../errors.js\";\nimport type { TransportHandler, TransportResult, TransportParams, ListOptions } from \"./types.js\";\n\nexport class FileTransportHandler implements TransportHandler {\n readonly name = \"file\";\n\n private resolvePath(location: string): string {\n return resolve(process.cwd(), location);\n }\n\n /**\n * Get content from file or directory listing\n */\n async get(location: string, params?: TransportParams): Promise<TransportResult> {\n const filePath = this.resolvePath(location);\n\n try {\n const stats = await stat(filePath);\n\n if (stats.isDirectory()) {\n return this.getDirectory(filePath, stats, params);\n } else {\n return this.getFile(filePath, stats);\n }\n } catch (error) {\n const err = error as Error & { code?: string };\n throw new TransportError(`File get error: ${err.code} - ${filePath}`, this.name, {\n cause: err,\n });\n }\n }\n\n /**\n * Get file content\n */\n private async getFile(\n filePath: string,\n stats: Awaited<ReturnType<typeof stat>>\n ): Promise<TransportResult> {\n const content = await readFile(filePath);\n return {\n content,\n metadata: {\n type: \"file\",\n size: Number(stats.size),\n modifiedAt: stats.mtime,\n },\n };\n }\n\n /**\n * Get directory listing\n */\n private async getDirectory(\n dirPath: string,\n stats: Awaited<ReturnType<typeof stat>>,\n params?: TransportParams\n ): Promise<TransportResult> {\n const recursive = params?.recursive === \"true\";\n const pattern = params?.pattern;\n\n let entries: string[];\n\n if (recursive) {\n entries = await this.listRecursive(dirPath, dirPath);\n } else {\n entries = await readdir(dirPath);\n }\n\n // Filter by pattern if provided\n if (pattern) {\n entries = this.filterByPattern(entries, pattern);\n }\n\n // Return as JSON array\n const content = Buffer.from(JSON.stringify(entries));\n return {\n content,\n metadata: {\n type: \"directory\",\n modifiedAt: stats.mtime,\n },\n };\n }\n\n /**\n * List directory recursively\n */\n private async listRecursive(basePath: string, currentPath: string): Promise<string[]> {\n const entries = await readdir(currentPath, { withFileTypes: true });\n const results: string[] = [];\n\n for (const entry of entries) {\n const fullPath = join(currentPath, entry.name);\n const relativePath = fullPath.substring(basePath.length + 1);\n\n if (entry.isDirectory()) {\n const subEntries = await this.listRecursive(basePath, fullPath);\n results.push(...subEntries);\n } else {\n results.push(relativePath);\n }\n }\n\n return results;\n }\n\n /**\n * Filter entries by glob-like pattern\n * Supports simple patterns: *.json, *.txt, etc.\n */\n private filterByPattern(entries: string[], pattern: string): string[] {\n // Convert simple glob to regex\n const regexPattern = pattern.replace(/\\./g, \"\\\\.\").replace(/\\*/g, \".*\").replace(/\\?/g, \".\");\n const regex = new RegExp(`^${regexPattern}$`);\n\n return entries.filter((entry) => {\n // Match against filename only (last part of path)\n const filename = entry.split(\"/\").pop() || entry;\n return regex.test(filename);\n });\n }\n\n /**\n * Set content to file\n */\n async set(location: string, content: Buffer, _params?: TransportParams): Promise<void> {\n const filePath = this.resolvePath(location);\n\n try {\n // Ensure directory exists\n await mkdir(dirname(filePath), { recursive: true });\n await writeFile(filePath, content);\n } catch (error) {\n const err = error as Error & { code?: string };\n throw new TransportError(`File set error: ${err.code} - ${filePath}`, this.name, {\n cause: err,\n });\n }\n }\n\n /**\n * Check if file or directory exists\n */\n async exists(location: string): Promise<boolean> {\n const filePath = this.resolvePath(location);\n\n try {\n await access(filePath);\n return true;\n } catch {\n return false;\n }\n }\n\n /**\n * Delete file or directory\n */\n async delete(location: string): Promise<void> {\n const filePath = this.resolvePath(location);\n\n try {\n await rm(filePath, { recursive: true });\n } catch (error) {\n const err = error as Error & { code?: string };\n // Ignore if already deleted\n if (err.code === \"ENOENT\") {\n return;\n }\n throw new TransportError(`File delete error: ${err.code} - ${filePath}`, this.name, {\n cause: err,\n });\n }\n }\n\n /**\n * List directory contents\n */\n async list(location: string, options?: ListOptions): Promise<string[]> {\n const dirPath = this.resolvePath(location);\n\n try {\n let entries: string[];\n\n if (options?.recursive) {\n entries = await this.listRecursive(dirPath, dirPath);\n } else {\n entries = await readdir(dirPath);\n }\n\n // Filter by pattern if provided\n if (options?.pattern) {\n entries = this.filterByPattern(entries, options.pattern);\n }\n\n return entries;\n } catch (error) {\n const err = error as Error & { code?: string };\n throw new TransportError(`File list error: ${err.code} - ${dirPath}`, this.name, {\n cause: err,\n });\n }\n }\n\n /**\n * Create directory (recursively)\n */\n async mkdir(location: string): Promise<void> {\n const dirPath = this.resolvePath(location);\n\n try {\n await mkdir(dirPath, { recursive: true });\n } catch (error) {\n const err = error as Error & { code?: string };\n throw new TransportError(`File mkdir error: ${err.code} - ${dirPath}`, this.name, {\n cause: err,\n });\n }\n }\n}\n\nexport const fileTransport: FileTransportHandler = new FileTransportHandler();\n",
8
- "/**\n * HTTP/HTTPS Transport Handler\n * Provides read-only I/O primitives for HTTP resources\n *\n * Location format: hostname/path?query\n * Runtime params are merged with URL query params (runtime params override)\n */\n\nimport { TransportError } from \"../errors.js\";\nimport type { TransportHandler, TransportResult, TransportParams } from \"./types.js\";\n\nexport class HttpTransportHandler implements TransportHandler {\n readonly name: string;\n private readonly protocol: \"http\" | \"https\";\n\n constructor(protocol: \"http\" | \"https\" = \"https\") {\n this.protocol = protocol;\n this.name = protocol;\n }\n\n /**\n * Get content from HTTP URL\n * Merges runtime params with URL query params\n */\n async get(location: string, params?: TransportParams): Promise<TransportResult> {\n const url = this.buildUrl(location, params);\n\n try {\n const response = await fetch(url);\n\n if (!response.ok) {\n throw new TransportError(\n `HTTP ${response.status}: ${response.statusText} - ${url}`,\n this.name\n );\n }\n\n const arrayBuffer = await response.arrayBuffer();\n const content = Buffer.from(arrayBuffer);\n\n // Extract metadata from headers\n const contentType = response.headers.get(\"content-type\");\n const contentLength = response.headers.get(\"content-length\");\n const lastModified = response.headers.get(\"last-modified\");\n\n return {\n content,\n metadata: {\n type: \"file\",\n size: contentLength ? parseInt(contentLength, 10) : content.length,\n modifiedAt: lastModified ? new Date(lastModified) : undefined,\n contentType,\n },\n };\n } catch (error) {\n if (error instanceof TransportError) {\n throw error;\n }\n throw new TransportError(`Network error: ${url}`, this.name, {\n cause: error as Error,\n });\n }\n }\n\n /**\n * Build URL with merged params\n */\n private buildUrl(location: string, params?: TransportParams): string {\n const url = new URL(`${this.protocol}://${location}`);\n\n // Merge runtime params (override existing)\n if (params) {\n for (const [key, value] of Object.entries(params)) {\n url.searchParams.set(key, value);\n }\n }\n\n return url.toString();\n }\n\n /**\n * HTTP transport is read-only, set is not supported\n */\n async set(_location: string, _content: Buffer, _params?: TransportParams): Promise<void> {\n throw new TransportError(\"HTTP transport is read-only, set not supported\", this.name);\n }\n\n /**\n * Check if HTTP resource exists (HEAD request)\n */\n async exists(location: string): Promise<boolean> {\n const url = `${this.protocol}://${location}`;\n\n try {\n const response = await fetch(url, { method: \"HEAD\" });\n return response.ok;\n } catch {\n return false;\n }\n }\n\n /**\n * HTTP transport is read-only, delete is not supported\n */\n async delete(_location: string): Promise<void> {\n throw new TransportError(\"HTTP transport is read-only, delete not supported\", this.name);\n }\n}\n\nexport const httpsTransport: HttpTransportHandler = new HttpTransportHandler(\"https\");\nexport const httpTransport: HttpTransportHandler = new HttpTransportHandler(\"http\");\n",
9
- "/**\n * Text Semantic Handler\n * Handles plain text resources\n */\n\nimport { SemanticError } from \"../errors.js\";\nimport type { TransportHandler } from \"../transport/types.js\";\nimport type { Resource, SemanticHandler, SemanticContext, ResourceMeta } from \"./types.js\";\n\nexport interface TextResource extends Resource<string> {\n type: \"text\";\n content: string;\n}\n\nexport class TextSemanticHandler implements SemanticHandler<string> {\n readonly name = \"text\";\n\n async resolve(\n transport: TransportHandler,\n location: string,\n context: SemanticContext\n ): Promise<TextResource> {\n const result = await transport.get(location, context.params);\n\n // Handle directory listing\n if (result.metadata?.type === \"directory\") {\n // Return as JSON string for text semantic\n const meta: ResourceMeta = {\n url: context.url,\n semantic: context.semantic,\n transport: context.transport,\n location: context.location,\n size: result.content.length,\n encoding: \"utf-8\",\n mimeType: \"application/json\",\n resolvedAt: context.timestamp.toISOString(),\n type: \"directory\",\n };\n\n return {\n type: \"text\",\n content: result.content.toString(\"utf-8\"),\n meta,\n };\n }\n\n // Handle file content\n const text = result.content.toString(\"utf-8\");\n const meta: ResourceMeta = {\n url: context.url,\n semantic: context.semantic,\n transport: context.transport,\n location: context.location,\n size: result.metadata?.size ?? result.content.length,\n encoding: \"utf-8\",\n mimeType: \"text/plain\",\n resolvedAt: context.timestamp.toISOString(),\n type: \"file\",\n };\n\n return {\n type: \"text\",\n content: text,\n meta,\n };\n }\n\n async deposit(\n transport: TransportHandler,\n location: string,\n data: string,\n context: SemanticContext\n ): Promise<void> {\n const buffer = Buffer.from(data, \"utf-8\");\n\n try {\n await transport.set(location, buffer, context.params);\n } catch (error) {\n throw new SemanticError(\n `Failed to deposit text to \"${location}\": ${(error as Error).message}`,\n this.name,\n { cause: error as Error }\n );\n }\n }\n\n async exists(\n transport: TransportHandler,\n location: string,\n _context: SemanticContext\n ): Promise<boolean> {\n return transport.exists(location);\n }\n\n async delete(\n transport: TransportHandler,\n location: string,\n _context: SemanticContext\n ): Promise<void> {\n try {\n await transport.delete(location);\n } catch (error) {\n throw new SemanticError(\n `Failed to delete \"${location}\": ${(error as Error).message}`,\n this.name,\n { cause: error as Error }\n );\n }\n }\n}\n\nexport const textSemantic: TextSemanticHandler = new TextSemanticHandler();\n",
10
- "/**\n * Binary Semantic Handler\n * Handles raw binary resources without any transformation\n */\n\nimport { SemanticError } from \"../errors.js\";\nimport type { TransportHandler } from \"../transport/types.js\";\nimport type { Resource, SemanticHandler, SemanticContext, ResourceMeta } from \"./types.js\";\n\nexport interface BinaryResource extends Resource<Buffer> {\n type: \"binary\";\n content: Buffer;\n}\n\n/**\n * Supported binary input types for deposit\n */\nexport type BinaryInput = Buffer | Uint8Array | ArrayBuffer | number[];\n\n/**\n * Convert various binary input types to Buffer\n */\nfunction toBuffer(data: BinaryInput): Buffer {\n if (Buffer.isBuffer(data)) {\n return data;\n }\n if (data instanceof Uint8Array) {\n return Buffer.from(data);\n }\n if (data instanceof ArrayBuffer) {\n return Buffer.from(data);\n }\n if (Array.isArray(data)) {\n return Buffer.from(data);\n }\n throw new SemanticError(`Unsupported binary input type`, \"binary\");\n}\n\nexport class BinarySemanticHandler implements SemanticHandler<Buffer> {\n readonly name = \"binary\";\n\n async resolve(\n transport: TransportHandler,\n location: string,\n context: SemanticContext\n ): Promise<BinaryResource> {\n const result = await transport.get(location, context.params);\n\n const meta: ResourceMeta = {\n url: context.url,\n semantic: context.semantic,\n transport: context.transport,\n location: context.location,\n size: result.metadata?.size ?? result.content.length,\n resolvedAt: context.timestamp.toISOString(),\n type: result.metadata?.type,\n };\n\n return {\n type: \"binary\",\n content: result.content,\n meta,\n };\n }\n\n async deposit(\n transport: TransportHandler,\n location: string,\n data: BinaryInput,\n context: SemanticContext\n ): Promise<void> {\n const buffer = toBuffer(data);\n\n try {\n await transport.set(location, buffer, context.params);\n } catch (error) {\n throw new SemanticError(\n `Failed to deposit binary to \"${location}\": ${(error as Error).message}`,\n this.name,\n { cause: error as Error }\n );\n }\n }\n\n async exists(\n transport: TransportHandler,\n location: string,\n _context: SemanticContext\n ): Promise<boolean> {\n return transport.exists(location);\n }\n\n async delete(\n transport: TransportHandler,\n location: string,\n _context: SemanticContext\n ): Promise<void> {\n try {\n await transport.delete(location);\n } catch (error) {\n throw new SemanticError(\n `Failed to delete \"${location}\": ${(error as Error).message}`,\n this.name,\n { cause: error as Error }\n );\n }\n }\n}\n\nexport const binarySemantic: BinarySemanticHandler = new BinarySemanticHandler();\n",
11
- "/**\n * ARP - Agent Resource Protocol\n * Factory and instance for parsing ARP URLs\n */\n\nimport { ARL, type HandlerResolver } from \"./ARL.js\";\nimport { ParseError, TransportError, SemanticError } from \"./errors.js\";\nimport type { TransportHandler } from \"./transport/types.js\";\nimport type { SemanticHandler } from \"./semantic/types.js\";\nimport { fileTransport, httpTransport, httpsTransport } from \"./transport/index.js\";\nimport { textSemantic, binarySemantic } from \"./semantic/index.js\";\n\n/**\n * ARP Configuration\n */\nexport interface ARPConfig {\n /**\n * Custom transport handlers\n */\n transports?: TransportHandler[];\n\n /**\n * Custom semantic handlers\n */\n semantics?: SemanticHandler[];\n}\n\n/**\n * ARP Instance\n */\nexport class ARP implements HandlerResolver {\n private readonly transports: Map<string, TransportHandler>;\n private readonly semantics: Map<string, SemanticHandler>;\n\n constructor(config: ARPConfig = {}) {\n this.transports = new Map();\n this.semantics = new Map();\n\n // Register default handlers\n const defaultTransports = [fileTransport, httpTransport, httpsTransport];\n const defaultSemantics = [textSemantic, binarySemantic];\n\n for (const handler of defaultTransports) {\n this.transports.set(handler.name, handler);\n }\n for (const handler of defaultSemantics) {\n this.semantics.set(handler.name, handler);\n }\n\n // Register custom handlers (override defaults if same name)\n if (config.transports) {\n for (const handler of config.transports) {\n this.transports.set(handler.name, handler);\n }\n }\n\n if (config.semantics) {\n for (const handler of config.semantics) {\n this.semantics.set(handler.name, handler);\n }\n }\n }\n\n /**\n * Register a transport handler\n */\n registerTransport(handler: TransportHandler): void {\n this.transports.set(handler.name, handler);\n }\n\n /**\n * Register a semantic handler\n */\n registerSemantic(handler: SemanticHandler): void {\n this.semantics.set(handler.name, handler);\n }\n\n /**\n * Get transport handler by name\n */\n getTransportHandler(name: string): TransportHandler {\n const handler = this.transports.get(name);\n if (!handler) {\n throw new TransportError(`Unsupported transport type: ${name}`, name);\n }\n return handler;\n }\n\n /**\n * Get semantic handler by name\n */\n getSemanticHandler(name: string): SemanticHandler {\n const handler = this.semantics.get(name);\n if (!handler) {\n throw new SemanticError(`Unsupported semantic type: ${name}`, name);\n }\n return handler;\n }\n\n /**\n * Parse an ARP URL into an ARL object\n *\n * @example\n * const arl = arp.parse(\"arp:text:file:///path/to/file.txt\");\n * arl.semantic // \"text\"\n * arl.transport // \"file\"\n * arl.location // \"/path/to/file.txt\"\n */\n parse(url: string): ARL {\n // 1. Check protocol prefix\n if (!url.startsWith(\"arp:\")) {\n throw new ParseError(`Invalid ARP URL: must start with \"arp:\"`, url);\n }\n\n const content = url.substring(4); // Remove \"arp:\"\n\n // 2. Find :// separator\n const separatorIndex = content.indexOf(\"://\");\n if (separatorIndex === -1) {\n throw new ParseError(`Invalid ARP URL: missing \"://\"`, url);\n }\n\n const typePart = content.substring(0, separatorIndex);\n const location = content.substring(separatorIndex + 3);\n\n // 3. Split type part by :\n const colonIndex = typePart.indexOf(\":\");\n if (colonIndex === -1) {\n throw new ParseError(`Invalid ARP URL: must have exactly 2 types (semantic:transport)`, url);\n }\n\n const semantic = typePart.substring(0, colonIndex);\n const transport = typePart.substring(colonIndex + 1);\n\n // 4. Validate non-empty\n if (!semantic) {\n throw new ParseError(`Invalid ARP URL: semantic type cannot be empty`, url);\n }\n if (!transport) {\n throw new ParseError(`Invalid ARP URL: transport type cannot be empty`, url);\n }\n if (!location) {\n throw new ParseError(`Invalid ARP URL: location cannot be empty`, url);\n }\n\n // 5. Validate handlers exist\n this.getTransportHandler(transport);\n this.getSemanticHandler(semantic);\n\n return new ARL(semantic, transport, location, this);\n }\n}\n\n/**\n * Create a new ARP instance\n *\n * @example\n * import { createARP, fileTransport, textSemantic } from \"arpjs\";\n *\n * const arp = createARP({\n * transports: [fileTransport],\n * semantics: [textSemantic],\n * });\n *\n * const arl = arp.parse(\"arp:text:file:///path/to/file.txt\");\n * const resource = await arl.resolve();\n */\nexport function createARP(config?: ARPConfig): ARP {\n return new ARP(config);\n}\n",
12
- "/**\n * arpjs - Agent Resource Protocol\n *\n * A URL protocol for AI agents to access resources\n * Format: arp:{semantic}:{transport}://{location}\n */\n\ndeclare const __VERSION__: string | undefined;\nexport const VERSION: string = typeof __VERSION__ !== \"undefined\" ? __VERSION__ : \"0.0.0-dev\";\n\n// Core types\nexport type { ARI, ARL } from \"./types.js\";\n\n// ARP factory and class\nexport { ARP, createARP, type ARPConfig } from \"./ARP.js\";\n\n// Errors\nexport { ARPError, ParseError, TransportError, SemanticError } from \"./errors.js\";\n\n// Transport (standard protocols only; for RXR transport use resourcexjs)\nexport {\n type TransportHandler,\n type TransportResult,\n type TransportParams,\n type ListOptions,\n FileTransportHandler,\n fileTransport,\n HttpTransportHandler,\n httpsTransport,\n httpTransport,\n} from \"./transport/index.js\";\n\n// Semantic\nexport {\n type Resource,\n type SemanticHandler,\n type ResourceMeta,\n type SemanticContext,\n type TextResource,\n type BinaryResource,\n type BinaryInput,\n TextSemanticHandler,\n textSemantic,\n BinarySemanticHandler,\n binarySemantic,\n} from \"./semantic/index.js\";\n"
6
+ "/**\n * ARL - Agent Resource Locator Implementation\n */\n\nimport { SemanticError, TransportError } from \"./errors.js\";\nimport type { Resource, SemanticContext, SemanticHandler } from \"./semantic/types.js\";\nimport type { ListOptions, TransportHandler, TransportParams } from \"./transport/types.js\";\nimport type { ARL as IARL } from \"./types.js\";\n\n/**\n * Handler resolver interface (implemented by ARP instance)\n */\nexport interface HandlerResolver {\n getTransportHandler(name: string): TransportHandler;\n getSemanticHandler(name: string): SemanticHandler;\n}\n\n/**\n * ARL Implementation\n */\nexport class ARL implements IARL {\n readonly semantic: string;\n readonly transport: string;\n readonly location: string;\n\n private readonly resolver: HandlerResolver;\n\n constructor(semantic: string, transport: string, location: string, resolver: HandlerResolver) {\n this.semantic = semantic;\n this.transport = transport;\n this.location = location;\n this.resolver = resolver;\n }\n\n /**\n * Create semantic context\n */\n private createContext(params?: TransportParams): SemanticContext {\n return {\n url: this.toString(),\n semantic: this.semantic,\n transport: this.transport,\n location: this.location,\n timestamp: new Date(),\n params,\n };\n }\n\n /**\n * Resolve the resource\n */\n async resolve(params?: TransportParams): Promise<Resource> {\n const transport = this.resolver.getTransportHandler(this.transport);\n const semantic = this.resolver.getSemanticHandler(this.semantic);\n const context = this.createContext(params);\n\n return semantic.resolve(transport, this.location, context);\n }\n\n /**\n * Deposit data to the resource\n */\n async deposit(data: unknown, params?: TransportParams): Promise<void> {\n const transport = this.resolver.getTransportHandler(this.transport);\n const semantic = this.resolver.getSemanticHandler(this.semantic);\n const context = this.createContext(params);\n\n if (!semantic.deposit) {\n throw new SemanticError(\n `Semantic \"${semantic.name}\" does not support deposit operation`,\n this.semantic\n );\n }\n\n await semantic.deposit(transport, this.location, data, context);\n }\n\n /**\n * Check if resource exists\n */\n async exists(): Promise<boolean> {\n const transport = this.resolver.getTransportHandler(this.transport);\n const semantic = this.resolver.getSemanticHandler(this.semantic);\n const context = this.createContext();\n\n if (semantic.exists) {\n return semantic.exists(transport, this.location, context);\n }\n\n // Fallback to transport exists\n return transport.exists(this.location);\n }\n\n /**\n * Delete the resource\n */\n async delete(): Promise<void> {\n const transport = this.resolver.getTransportHandler(this.transport);\n const semantic = this.resolver.getSemanticHandler(this.semantic);\n const context = this.createContext();\n\n if (semantic.delete) {\n return semantic.delete(transport, this.location, context);\n }\n\n // Fallback to transport delete\n await transport.delete(this.location);\n }\n\n /**\n * List directory contents\n */\n async list(options?: ListOptions): Promise<string[]> {\n const transport = this.resolver.getTransportHandler(this.transport);\n\n if (!transport.list) {\n throw new TransportError(\n `Transport \"${transport.name}\" does not support list operation`,\n this.transport\n );\n }\n\n return transport.list(this.location, options);\n }\n\n /**\n * Create directory\n */\n async mkdir(): Promise<void> {\n const transport = this.resolver.getTransportHandler(this.transport);\n\n if (!transport.mkdir) {\n throw new TransportError(\n `Transport \"${transport.name}\" does not support mkdir operation`,\n this.transport\n );\n }\n\n await transport.mkdir(this.location);\n }\n\n /**\n * Convert to ARP URL string\n */\n toString(): string {\n return `arp:${this.semantic}:${this.transport}://${this.location}`;\n }\n}\n",
7
+ "/**\n * Binary Semantic Handler\n * Handles raw binary resources without any transformation\n */\n\nimport { SemanticError } from \"../errors.js\";\nimport type { TransportHandler } from \"../transport/types.js\";\nimport type { Resource, ResourceMeta, SemanticContext, SemanticHandler } from \"./types.js\";\n\nexport interface BinaryResource extends Resource<Buffer> {\n type: \"binary\";\n content: Buffer;\n}\n\n/**\n * Supported binary input types for deposit\n */\nexport type BinaryInput = Buffer | Uint8Array | ArrayBuffer | number[];\n\n/**\n * Convert various binary input types to Buffer\n */\nfunction toBuffer(data: BinaryInput): Buffer {\n if (Buffer.isBuffer(data)) {\n return data;\n }\n if (data instanceof Uint8Array) {\n return Buffer.from(data);\n }\n if (data instanceof ArrayBuffer) {\n return Buffer.from(data);\n }\n if (Array.isArray(data)) {\n return Buffer.from(data);\n }\n throw new SemanticError(`Unsupported binary input type`, \"binary\");\n}\n\nexport class BinarySemanticHandler implements SemanticHandler<Buffer> {\n readonly name = \"binary\";\n\n async resolve(\n transport: TransportHandler,\n location: string,\n context: SemanticContext\n ): Promise<BinaryResource> {\n const result = await transport.get(location, context.params);\n\n const meta: ResourceMeta = {\n url: context.url,\n semantic: context.semantic,\n transport: context.transport,\n location: context.location,\n size: result.metadata?.size ?? result.content.length,\n resolvedAt: context.timestamp.toISOString(),\n type: result.metadata?.type,\n };\n\n return {\n type: \"binary\",\n content: result.content,\n meta,\n };\n }\n\n async deposit(\n transport: TransportHandler,\n location: string,\n data: BinaryInput,\n context: SemanticContext\n ): Promise<void> {\n const buffer = toBuffer(data);\n\n try {\n await transport.set(location, buffer, context.params);\n } catch (error) {\n throw new SemanticError(\n `Failed to deposit binary to \"${location}\": ${(error as Error).message}`,\n this.name,\n { cause: error as Error }\n );\n }\n }\n\n async exists(\n transport: TransportHandler,\n location: string,\n _context: SemanticContext\n ): Promise<boolean> {\n return transport.exists(location);\n }\n\n async delete(\n transport: TransportHandler,\n location: string,\n _context: SemanticContext\n ): Promise<void> {\n try {\n await transport.delete(location);\n } catch (error) {\n throw new SemanticError(\n `Failed to delete \"${location}\": ${(error as Error).message}`,\n this.name,\n { cause: error as Error }\n );\n }\n }\n}\n\nexport const binarySemantic: BinarySemanticHandler = new BinarySemanticHandler();\n",
8
+ "/**\n * Text Semantic Handler\n * Handles plain text resources\n */\n\nimport { SemanticError } from \"../errors.js\";\nimport type { TransportHandler } from \"../transport/types.js\";\nimport type { Resource, ResourceMeta, SemanticContext, SemanticHandler } from \"./types.js\";\n\nexport interface TextResource extends Resource<string> {\n type: \"text\";\n content: string;\n}\n\nexport class TextSemanticHandler implements SemanticHandler<string> {\n readonly name = \"text\";\n\n async resolve(\n transport: TransportHandler,\n location: string,\n context: SemanticContext\n ): Promise<TextResource> {\n const result = await transport.get(location, context.params);\n\n // Handle directory listing\n if (result.metadata?.type === \"directory\") {\n // Return as JSON string for text semantic\n const meta: ResourceMeta = {\n url: context.url,\n semantic: context.semantic,\n transport: context.transport,\n location: context.location,\n size: result.content.length,\n encoding: \"utf-8\",\n mimeType: \"application/json\",\n resolvedAt: context.timestamp.toISOString(),\n type: \"directory\",\n };\n\n return {\n type: \"text\",\n content: result.content.toString(\"utf-8\"),\n meta,\n };\n }\n\n // Handle file content\n const text = result.content.toString(\"utf-8\");\n const meta: ResourceMeta = {\n url: context.url,\n semantic: context.semantic,\n transport: context.transport,\n location: context.location,\n size: result.metadata?.size ?? result.content.length,\n encoding: \"utf-8\",\n mimeType: \"text/plain\",\n resolvedAt: context.timestamp.toISOString(),\n type: \"file\",\n };\n\n return {\n type: \"text\",\n content: text,\n meta,\n };\n }\n\n async deposit(\n transport: TransportHandler,\n location: string,\n data: string,\n context: SemanticContext\n ): Promise<void> {\n const buffer = Buffer.from(data, \"utf-8\");\n\n try {\n await transport.set(location, buffer, context.params);\n } catch (error) {\n throw new SemanticError(\n `Failed to deposit text to \"${location}\": ${(error as Error).message}`,\n this.name,\n { cause: error as Error }\n );\n }\n }\n\n async exists(\n transport: TransportHandler,\n location: string,\n _context: SemanticContext\n ): Promise<boolean> {\n return transport.exists(location);\n }\n\n async delete(\n transport: TransportHandler,\n location: string,\n _context: SemanticContext\n ): Promise<void> {\n try {\n await transport.delete(location);\n } catch (error) {\n throw new SemanticError(\n `Failed to delete \"${location}\": ${(error as Error).message}`,\n this.name,\n { cause: error as Error }\n );\n }\n }\n}\n\nexport const textSemantic: TextSemanticHandler = new TextSemanticHandler();\n",
9
+ "/**\n * File Transport Handler\n * Provides I/O primitives for local filesystem\n *\n * Supported params:\n * - recursive: \"true\" - list directories recursively\n * - pattern: glob pattern - filter files by pattern (e.g., \"*.json\")\n */\n\nimport { access, mkdir, readdir, readFile, rm, stat, writeFile } from \"node:fs/promises\";\nimport { dirname, join, resolve } from \"node:path\";\nimport { TransportError } from \"../errors.js\";\nimport type { ListOptions, TransportHandler, TransportParams, TransportResult } from \"./types.js\";\n\nexport class FileTransportHandler implements TransportHandler {\n readonly name = \"file\";\n\n private resolvePath(location: string): string {\n return resolve(process.cwd(), location);\n }\n\n /**\n * Get content from file or directory listing\n */\n async get(location: string, params?: TransportParams): Promise<TransportResult> {\n const filePath = this.resolvePath(location);\n\n try {\n const stats = await stat(filePath);\n\n if (stats.isDirectory()) {\n return this.getDirectory(filePath, stats, params);\n } else {\n return this.getFile(filePath, stats);\n }\n } catch (error) {\n const err = error as Error & { code?: string };\n throw new TransportError(`File get error: ${err.code} - ${filePath}`, this.name, {\n cause: err,\n });\n }\n }\n\n /**\n * Get file content\n */\n private async getFile(\n filePath: string,\n stats: Awaited<ReturnType<typeof stat>>\n ): Promise<TransportResult> {\n const content = await readFile(filePath);\n return {\n content,\n metadata: {\n type: \"file\",\n size: Number(stats.size),\n modifiedAt: stats.mtime,\n },\n };\n }\n\n /**\n * Get directory listing\n */\n private async getDirectory(\n dirPath: string,\n stats: Awaited<ReturnType<typeof stat>>,\n params?: TransportParams\n ): Promise<TransportResult> {\n const recursive = params?.recursive === \"true\";\n const pattern = params?.pattern;\n\n let entries: string[];\n\n if (recursive) {\n entries = await this.listRecursive(dirPath, dirPath);\n } else {\n entries = await readdir(dirPath);\n }\n\n // Filter by pattern if provided\n if (pattern) {\n entries = this.filterByPattern(entries, pattern);\n }\n\n // Return as JSON array\n const content = Buffer.from(JSON.stringify(entries));\n return {\n content,\n metadata: {\n type: \"directory\",\n modifiedAt: stats.mtime,\n },\n };\n }\n\n /**\n * List directory recursively\n */\n private async listRecursive(basePath: string, currentPath: string): Promise<string[]> {\n const entries = await readdir(currentPath, { withFileTypes: true });\n const results: string[] = [];\n\n for (const entry of entries) {\n const fullPath = join(currentPath, entry.name);\n const relativePath = fullPath.substring(basePath.length + 1);\n\n if (entry.isDirectory()) {\n const subEntries = await this.listRecursive(basePath, fullPath);\n results.push(...subEntries);\n } else {\n results.push(relativePath);\n }\n }\n\n return results;\n }\n\n /**\n * Filter entries by glob-like pattern\n * Supports simple patterns: *.json, *.txt, etc.\n */\n private filterByPattern(entries: string[], pattern: string): string[] {\n // Convert simple glob to regex\n const regexPattern = pattern.replace(/\\./g, \"\\\\.\").replace(/\\*/g, \".*\").replace(/\\?/g, \".\");\n const regex = new RegExp(`^${regexPattern}$`);\n\n return entries.filter((entry) => {\n // Match against filename only (last part of path)\n const filename = entry.split(\"/\").pop() || entry;\n return regex.test(filename);\n });\n }\n\n /**\n * Set content to file\n */\n async set(location: string, content: Buffer, _params?: TransportParams): Promise<void> {\n const filePath = this.resolvePath(location);\n\n try {\n // Ensure directory exists\n await mkdir(dirname(filePath), { recursive: true });\n await writeFile(filePath, content);\n } catch (error) {\n const err = error as Error & { code?: string };\n throw new TransportError(`File set error: ${err.code} - ${filePath}`, this.name, {\n cause: err,\n });\n }\n }\n\n /**\n * Check if file or directory exists\n */\n async exists(location: string): Promise<boolean> {\n const filePath = this.resolvePath(location);\n\n try {\n await access(filePath);\n return true;\n } catch {\n return false;\n }\n }\n\n /**\n * Delete file or directory\n */\n async delete(location: string): Promise<void> {\n const filePath = this.resolvePath(location);\n\n try {\n await rm(filePath, { recursive: true });\n } catch (error) {\n const err = error as Error & { code?: string };\n // Ignore if already deleted\n if (err.code === \"ENOENT\") {\n return;\n }\n throw new TransportError(`File delete error: ${err.code} - ${filePath}`, this.name, {\n cause: err,\n });\n }\n }\n\n /**\n * List directory contents\n */\n async list(location: string, options?: ListOptions): Promise<string[]> {\n const dirPath = this.resolvePath(location);\n\n try {\n let entries: string[];\n\n if (options?.recursive) {\n entries = await this.listRecursive(dirPath, dirPath);\n } else {\n entries = await readdir(dirPath);\n }\n\n // Filter by pattern if provided\n if (options?.pattern) {\n entries = this.filterByPattern(entries, options.pattern);\n }\n\n return entries;\n } catch (error) {\n const err = error as Error & { code?: string };\n throw new TransportError(`File list error: ${err.code} - ${dirPath}`, this.name, {\n cause: err,\n });\n }\n }\n\n /**\n * Create directory (recursively)\n */\n async mkdir(location: string): Promise<void> {\n const dirPath = this.resolvePath(location);\n\n try {\n await mkdir(dirPath, { recursive: true });\n } catch (error) {\n const err = error as Error & { code?: string };\n throw new TransportError(`File mkdir error: ${err.code} - ${dirPath}`, this.name, {\n cause: err,\n });\n }\n }\n}\n\nexport const fileTransport: FileTransportHandler = new FileTransportHandler();\n",
10
+ "/**\n * HTTP/HTTPS Transport Handler\n * Provides read-only I/O primitives for HTTP resources\n *\n * Location format: hostname/path?query\n * Runtime params are merged with URL query params (runtime params override)\n */\n\nimport { TransportError } from \"../errors.js\";\nimport type { TransportHandler, TransportParams, TransportResult } from \"./types.js\";\n\nexport class HttpTransportHandler implements TransportHandler {\n readonly name: string;\n private readonly protocol: \"http\" | \"https\";\n\n constructor(protocol: \"http\" | \"https\" = \"https\") {\n this.protocol = protocol;\n this.name = protocol;\n }\n\n /**\n * Get content from HTTP URL\n * Merges runtime params with URL query params\n */\n async get(location: string, params?: TransportParams): Promise<TransportResult> {\n const url = this.buildUrl(location, params);\n\n try {\n const response = await fetch(url);\n\n if (!response.ok) {\n throw new TransportError(\n `HTTP ${response.status}: ${response.statusText} - ${url}`,\n this.name\n );\n }\n\n const arrayBuffer = await response.arrayBuffer();\n const content = Buffer.from(arrayBuffer);\n\n // Extract metadata from headers\n const contentType = response.headers.get(\"content-type\");\n const contentLength = response.headers.get(\"content-length\");\n const lastModified = response.headers.get(\"last-modified\");\n\n return {\n content,\n metadata: {\n type: \"file\",\n size: contentLength ? parseInt(contentLength, 10) : content.length,\n modifiedAt: lastModified ? new Date(lastModified) : undefined,\n contentType,\n },\n };\n } catch (error) {\n if (error instanceof TransportError) {\n throw error;\n }\n throw new TransportError(`Network error: ${url}`, this.name, {\n cause: error as Error,\n });\n }\n }\n\n /**\n * Build URL with merged params\n */\n private buildUrl(location: string, params?: TransportParams): string {\n const url = new URL(`${this.protocol}://${location}`);\n\n // Merge runtime params (override existing)\n if (params) {\n for (const [key, value] of Object.entries(params)) {\n url.searchParams.set(key, value);\n }\n }\n\n return url.toString();\n }\n\n /**\n * HTTP transport is read-only, set is not supported\n */\n async set(_location: string, _content: Buffer, _params?: TransportParams): Promise<void> {\n throw new TransportError(\"HTTP transport is read-only, set not supported\", this.name);\n }\n\n /**\n * Check if HTTP resource exists (HEAD request)\n */\n async exists(location: string): Promise<boolean> {\n const url = `${this.protocol}://${location}`;\n\n try {\n const response = await fetch(url, { method: \"HEAD\" });\n return response.ok;\n } catch {\n return false;\n }\n }\n\n /**\n * HTTP transport is read-only, delete is not supported\n */\n async delete(_location: string): Promise<void> {\n throw new TransportError(\"HTTP transport is read-only, delete not supported\", this.name);\n }\n}\n\nexport const httpsTransport: HttpTransportHandler = new HttpTransportHandler(\"https\");\nexport const httpTransport: HttpTransportHandler = new HttpTransportHandler(\"http\");\n",
11
+ "/**\n * ARP - Agent Resource Protocol\n * Factory and instance for parsing ARP URLs\n */\n\nimport { ARL, type HandlerResolver } from \"./ARL.js\";\nimport { ParseError, SemanticError, TransportError } from \"./errors.js\";\nimport { binarySemantic, textSemantic } from \"./semantic/index.js\";\nimport type { SemanticHandler } from \"./semantic/types.js\";\nimport { fileTransport, httpsTransport, httpTransport } from \"./transport/index.js\";\nimport type { TransportHandler } from \"./transport/types.js\";\n\n/**\n * ARP Configuration\n */\nexport interface ARPConfig {\n /**\n * Custom transport handlers\n */\n transports?: TransportHandler[];\n\n /**\n * Custom semantic handlers\n */\n semantics?: SemanticHandler[];\n}\n\n/**\n * ARP Instance\n */\nexport class ARP implements HandlerResolver {\n private readonly transports: Map<string, TransportHandler>;\n private readonly semantics: Map<string, SemanticHandler>;\n\n constructor(config: ARPConfig = {}) {\n this.transports = new Map();\n this.semantics = new Map();\n\n // Register default handlers\n const defaultTransports = [fileTransport, httpTransport, httpsTransport];\n const defaultSemantics = [textSemantic, binarySemantic];\n\n for (const handler of defaultTransports) {\n this.transports.set(handler.name, handler);\n }\n for (const handler of defaultSemantics) {\n this.semantics.set(handler.name, handler);\n }\n\n // Register custom handlers (override defaults if same name)\n if (config.transports) {\n for (const handler of config.transports) {\n this.transports.set(handler.name, handler);\n }\n }\n\n if (config.semantics) {\n for (const handler of config.semantics) {\n this.semantics.set(handler.name, handler);\n }\n }\n }\n\n /**\n * Register a transport handler\n */\n registerTransport(handler: TransportHandler): void {\n this.transports.set(handler.name, handler);\n }\n\n /**\n * Register a semantic handler\n */\n registerSemantic(handler: SemanticHandler): void {\n this.semantics.set(handler.name, handler);\n }\n\n /**\n * Get transport handler by name\n */\n getTransportHandler(name: string): TransportHandler {\n const handler = this.transports.get(name);\n if (!handler) {\n throw new TransportError(`Unsupported transport type: ${name}`, name);\n }\n return handler;\n }\n\n /**\n * Get semantic handler by name\n */\n getSemanticHandler(name: string): SemanticHandler {\n const handler = this.semantics.get(name);\n if (!handler) {\n throw new SemanticError(`Unsupported semantic type: ${name}`, name);\n }\n return handler;\n }\n\n /**\n * Parse an ARP URL into an ARL object\n *\n * @example\n * const arl = arp.parse(\"arp:text:file:///path/to/file.txt\");\n * arl.semantic // \"text\"\n * arl.transport // \"file\"\n * arl.location // \"/path/to/file.txt\"\n */\n parse(url: string): ARL {\n // 1. Check protocol prefix\n if (!url.startsWith(\"arp:\")) {\n throw new ParseError(`Invalid ARP URL: must start with \"arp:\"`, url);\n }\n\n const content = url.substring(4); // Remove \"arp:\"\n\n // 2. Find :// separator\n const separatorIndex = content.indexOf(\"://\");\n if (separatorIndex === -1) {\n throw new ParseError(`Invalid ARP URL: missing \"://\"`, url);\n }\n\n const typePart = content.substring(0, separatorIndex);\n const location = content.substring(separatorIndex + 3);\n\n // 3. Split type part by :\n const colonIndex = typePart.indexOf(\":\");\n if (colonIndex === -1) {\n throw new ParseError(`Invalid ARP URL: must have exactly 2 types (semantic:transport)`, url);\n }\n\n const semantic = typePart.substring(0, colonIndex);\n const transport = typePart.substring(colonIndex + 1);\n\n // 4. Validate non-empty\n if (!semantic) {\n throw new ParseError(`Invalid ARP URL: semantic type cannot be empty`, url);\n }\n if (!transport) {\n throw new ParseError(`Invalid ARP URL: transport type cannot be empty`, url);\n }\n if (!location) {\n throw new ParseError(`Invalid ARP URL: location cannot be empty`, url);\n }\n\n // 5. Validate handlers exist\n this.getTransportHandler(transport);\n this.getSemanticHandler(semantic);\n\n return new ARL(semantic, transport, location, this);\n }\n}\n\n/**\n * Create a new ARP instance\n *\n * @example\n * import { createARP, fileTransport, textSemantic } from \"arpjs\";\n *\n * const arp = createARP({\n * transports: [fileTransport],\n * semantics: [textSemantic],\n * });\n *\n * const arl = arp.parse(\"arp:text:file:///path/to/file.txt\");\n * const resource = await arl.resolve();\n */\nexport function createARP(config?: ARPConfig): ARP {\n return new ARP(config);\n}\n",
12
+ "/**\n * arpjs - Agent Resource Protocol\n *\n * A URL protocol for AI agents to access resources\n * Format: arp:{semantic}:{transport}://{location}\n */\n\ndeclare const __VERSION__: string | undefined;\nexport const VERSION: string = typeof __VERSION__ !== \"undefined\" ? __VERSION__ : \"0.0.0-dev\";\n\n// ARP factory and class\nexport { ARP, type ARPConfig, createARP } from \"./ARP.js\";\n// Errors\nexport { ARPError, ParseError, SemanticError, TransportError } from \"./errors.js\";\n// Semantic\nexport {\n type BinaryInput,\n type BinaryResource,\n BinarySemanticHandler,\n binarySemantic,\n type Resource,\n type ResourceMeta,\n type SemanticContext,\n type SemanticHandler,\n type TextResource,\n TextSemanticHandler,\n textSemantic,\n} from \"./semantic/index.js\";\n\n// Transport (standard protocols only; for RXR transport use resourcexjs)\nexport {\n FileTransportHandler,\n fileTransport,\n HttpTransportHandler,\n httpsTransport,\n httpTransport,\n type ListOptions,\n type TransportHandler,\n type TransportParams,\n type TransportResult,\n} from \"./transport/index.js\";\n// Core types\nexport type { ARI, ARL } from \"./types.js\";\n"
13
13
  ],
14
- "mappings": ";AAOO,MAAM,iBAAiB,MAAM;AAAA,EAClC,WAAW,CAAC,SAAiB,SAAwB;AAAA,IACnD,MAAM,SAAS,OAAO;AAAA,IACtB,KAAK,OAAO;AAAA;AAEhB;AAAA;AAKO,MAAM,mBAAmB,SAAS;AAAA,EAGrB;AAAA,EAFlB,WAAW,CACT,SACgB,KAChB;AAAA,IACA,MAAM,OAAO;AAAA,IAFG;AAAA,IAGhB,KAAK,OAAO;AAAA;AAEhB;AAAA;AAKO,MAAM,uBAAuB,SAAS;AAAA,EAGzB;AAAA,EAFlB,WAAW,CACT,SACgB,WAChB,SACA;AAAA,IACA,MAAM,SAAS,OAAO;AAAA,IAHN;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6 +1,6 @@
1
1
  {
2
2
  "name": "@resourcexjs/arp",
3
- "version": "2.7.0",
3
+ "version": "2.8.0",
4
4
  "description": "ARP (Agent Resource Protocol) - A URL protocol for AI agents to access resources",
5
5
  "keywords": [
6
6
  "arp",
@@ -33,7 +33,7 @@
33
33
  ],
34
34
  "scripts": {
35
35
  "build": "bun run build.ts",
36
- "lint": "eslint .",
36
+ "lint": "biome lint .",
37
37
  "typecheck": "tsc --noEmit",
38
38
  "test": "bun test",
39
39
  "clean": "rm -rf dist"