@nexum-hub/sdk 1.0.2-next.35 → 1.0.2-next.36
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 +16 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -384,6 +384,12 @@ export interface ResourceQuery {
|
|
|
384
384
|
readonly limit?: number;
|
|
385
385
|
readonly cursor?: string;
|
|
386
386
|
}
|
|
387
|
+
export interface ResourceReadOptions {
|
|
388
|
+
uri: string;
|
|
389
|
+
mode?: "auto" | "content";
|
|
390
|
+
startLine?: number;
|
|
391
|
+
endLine?: number;
|
|
392
|
+
}
|
|
387
393
|
export interface ResourceRef<T extends ManagedResource = ManagedResource> {
|
|
388
394
|
readonly id: string;
|
|
389
395
|
readonly kind: string;
|
|
@@ -423,6 +429,7 @@ export interface RestartReceipt {
|
|
|
423
429
|
afterRun: string;
|
|
424
430
|
}
|
|
425
431
|
export interface RuntimeSDK {
|
|
432
|
+
readResource(options: ResourceReadOptions): Promise<ResourceReadResult>;
|
|
426
433
|
sleep(milliseconds: number): Promise<null>;
|
|
427
434
|
requestInput(request: InputRequest): Promise<InputReply>;
|
|
428
435
|
restart(request: {
|
|
@@ -640,6 +647,15 @@ export type ProcessStop = {
|
|
|
640
647
|
confirmed: boolean;
|
|
641
648
|
facts: ProcessFacts;
|
|
642
649
|
} & Partial<ProcessSnapshot>;
|
|
650
|
+
export type ResourceReadResult = {
|
|
651
|
+
readonly kind: "text";
|
|
652
|
+
readonly value: string;
|
|
653
|
+
} | {
|
|
654
|
+
readonly kind: "image" | "audio";
|
|
655
|
+
readonly value: OutputIntent;
|
|
656
|
+
} | {
|
|
657
|
+
readonly kind: "file";
|
|
658
|
+
};
|
|
643
659
|
export type SchemaDialect = "draft7" | "2020-12";
|
|
644
660
|
export type StartOptions = LaunchOptions & {
|
|
645
661
|
background?: boolean;
|