@resourcexjs/arp 1.6.0 → 1.7.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 +62 -1
- package/dist/index.js +1801 -2
- package/dist/index.js.map +6 -4
- package/package.json +4 -1
package/dist/index.d.ts
CHANGED
|
@@ -408,6 +408,67 @@ declare class HttpTransportHandler implements TransportHandler {
|
|
|
408
408
|
}
|
|
409
409
|
declare const httpsTransport: HttpTransportHandler;
|
|
410
410
|
declare const httpTransport: HttpTransportHandler;
|
|
411
|
+
/**
|
|
412
|
+
* Minimal registry interface required by RxrTransport.
|
|
413
|
+
* This allows RxrTransport to work without depending on the full Registry type.
|
|
414
|
+
*/
|
|
415
|
+
interface RxrTransportRegistry {
|
|
416
|
+
get(locator: string): Promise<{
|
|
417
|
+
content: {
|
|
418
|
+
files(): Promise<Map<string, Buffer>>
|
|
419
|
+
}
|
|
420
|
+
}>;
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* RXR Transport - Access files inside a resource.
|
|
424
|
+
*
|
|
425
|
+
* Location format: {rxl}/{internal-path}
|
|
426
|
+
* Example: deepractice.ai/nuwa.role@1.0.0/thought/first-principles.md
|
|
427
|
+
*
|
|
428
|
+
* The RXL portion ends at @version, and the internal path follows.
|
|
429
|
+
*
|
|
430
|
+
* When no registry is provided, automatically creates one based on domain:
|
|
431
|
+
* - localhost: LocalRegistry
|
|
432
|
+
* - Other domains: RemoteRegistry with well-known discovery
|
|
433
|
+
*/
|
|
434
|
+
declare class RxrTransport implements TransportHandler {
|
|
435
|
+
private registry?;
|
|
436
|
+
readonly name = "rxr";
|
|
437
|
+
constructor(registry?: RxrTransportRegistry);
|
|
438
|
+
/**
|
|
439
|
+
* Get file content from inside a resource.
|
|
440
|
+
*/
|
|
441
|
+
get(location: string, _params?: TransportParams): Promise<TransportResult>;
|
|
442
|
+
/**
|
|
443
|
+
* Set is not supported - RXR transport is read-only.
|
|
444
|
+
*/
|
|
445
|
+
set(_location: string, _content: Buffer, _params?: TransportParams): Promise<void>;
|
|
446
|
+
/**
|
|
447
|
+
* Check if a file exists inside a resource.
|
|
448
|
+
*/
|
|
449
|
+
exists(location: string): Promise<boolean>;
|
|
450
|
+
/**
|
|
451
|
+
* Delete is not supported - RXR transport is read-only.
|
|
452
|
+
*/
|
|
453
|
+
delete(_location: string): Promise<void>;
|
|
454
|
+
/**
|
|
455
|
+
* Get or create a registry for the given domain.
|
|
456
|
+
* - If a registry was provided in constructor, use it
|
|
457
|
+
* - localhost: create LocalRegistry
|
|
458
|
+
* - Other domains: discover endpoint via well-known and create RemoteRegistry
|
|
459
|
+
*/
|
|
460
|
+
private getRegistry;
|
|
461
|
+
/**
|
|
462
|
+
* Parse location into domain, RXL and internal path.
|
|
463
|
+
* Format: {domain}/{path}/{name}.{type}@{version}/{internal-path}
|
|
464
|
+
* Example: deepractice.ai/nuwa.role@1.0.0/thought/first-principles.md
|
|
465
|
+
*/
|
|
466
|
+
private parseLocation;
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* Clear the registry cache. Useful for testing.
|
|
470
|
+
*/
|
|
471
|
+
declare function clearRegistryCache(): void;
|
|
411
472
|
interface TextResource extends Resource<string> {
|
|
412
473
|
type: "text";
|
|
413
474
|
content: string;
|
|
@@ -437,4 +498,4 @@ declare class BinarySemanticHandler implements SemanticHandler<Buffer> {
|
|
|
437
498
|
}
|
|
438
499
|
declare const binarySemantic: BinarySemanticHandler;
|
|
439
500
|
declare const VERSION: string;
|
|
440
|
-
export { textSemantic, httpsTransport, httpTransport, fileTransport, createARP, binarySemantic, VERSION, TransportResult, TransportParams, TransportHandler, TransportError, TextSemanticHandler, TextResource, SemanticHandler, SemanticError, SemanticContext, ResourceMeta, Resource, ParseError, HttpTransportHandler, FileTransportHandler, BinarySemanticHandler, BinaryResource, BinaryInput, ARPError, ARPConfig, ARP, ARL, ARI };
|
|
501
|
+
export { textSemantic, httpsTransport, httpTransport, fileTransport, createARP, clearRegistryCache, binarySemantic, VERSION, TransportResult, TransportParams, TransportHandler, TransportError, TextSemanticHandler, TextResource, SemanticHandler, SemanticError, SemanticContext, RxrTransportRegistry, RxrTransport, ResourceMeta, Resource, ParseError, HttpTransportHandler, FileTransportHandler, BinarySemanticHandler, BinaryResource, BinaryInput, ARPError, ARPConfig, ARP, ARL, ARI };
|