@nimble-way/nimble-js 0.10.0 → 0.12.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/CHANGELOG.md +28 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agent.d.mts +181 -3
- package/resources/agent.d.mts.map +1 -1
- package/resources/agent.d.ts +181 -3
- package/resources/agent.d.ts.map +1 -1
- package/resources/agent.js +26 -2
- package/resources/agent.js.map +1 -1
- package/resources/agent.mjs +26 -2
- package/resources/agent.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/top-level.d.mts +4 -0
- package/resources/top-level.d.mts.map +1 -1
- package/resources/top-level.d.ts +4 -0
- package/resources/top-level.d.ts.map +1 -1
- package/src/client.ts +14 -0
- package/src/resources/agent.ts +265 -2
- package/src/resources/index.ts +7 -0
- package/src/resources/top-level.ts +5 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/resources/agent.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { path } from '../internal/utils/path';
|
|
|
7
7
|
|
|
8
8
|
export class Agent extends APIResource {
|
|
9
9
|
/**
|
|
10
|
-
* List Templates
|
|
10
|
+
* List Agent Templates
|
|
11
11
|
*/
|
|
12
12
|
list(
|
|
13
13
|
query: AgentListParams | null | undefined = {},
|
|
@@ -17,12 +17,37 @@ export class Agent extends APIResource {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Create Agent Generation
|
|
21
|
+
*/
|
|
22
|
+
generate(body: AgentGenerateParams, options?: RequestOptions): APIPromise<AgentGenerateResponse> {
|
|
23
|
+
return this._client.post('/v1/agents/generations', { body, ...options });
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Get Agent Template
|
|
21
28
|
*/
|
|
22
29
|
get(templateName: string, options?: RequestOptions): APIPromise<AgentGetResponse> {
|
|
23
30
|
return this._client.get(path`/v1/agents/${templateName}`, options);
|
|
24
31
|
}
|
|
25
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Get Agent Generation
|
|
35
|
+
*/
|
|
36
|
+
getGeneration(generationID: string, options?: RequestOptions): APIPromise<AgentGetGenerationResponse> {
|
|
37
|
+
return this._client.get(path`/v1/agents/generations/${generationID}`, options);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Publish Agent Version
|
|
42
|
+
*/
|
|
43
|
+
publish(
|
|
44
|
+
agentName: string,
|
|
45
|
+
body: AgentPublishParams,
|
|
46
|
+
options?: RequestOptions,
|
|
47
|
+
): APIPromise<AgentPublishResponse> {
|
|
48
|
+
return this._client.post(path`/v1/agents/${agentName}/publish`, { body, ...options });
|
|
49
|
+
}
|
|
50
|
+
|
|
26
51
|
/**
|
|
27
52
|
* Execute WSA Realtime Endpoint
|
|
28
53
|
*/
|
|
@@ -36,6 +61,13 @@ export class Agent extends APIResource {
|
|
|
36
61
|
runAsync(body: AgentRunAsyncParams, options?: RequestOptions): APIPromise<AgentRunAsyncResponse> {
|
|
37
62
|
return this._client.post('/v1/agents/async', { body, ...options });
|
|
38
63
|
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Execute WSA Batch Endpoint
|
|
67
|
+
*/
|
|
68
|
+
runBatch(body: AgentRunBatchParams, options?: RequestOptions): APIPromise<AgentRunBatchResponse> {
|
|
69
|
+
return this._client.post('/v1/agents/batch', { body, ...options });
|
|
70
|
+
}
|
|
39
71
|
}
|
|
40
72
|
|
|
41
73
|
export type AgentListResponse = Array<AgentListResponse.AgentListResponseItem>;
|
|
@@ -60,6 +92,30 @@ export namespace AgentListResponse {
|
|
|
60
92
|
}
|
|
61
93
|
}
|
|
62
94
|
|
|
95
|
+
export interface AgentGenerateResponse {
|
|
96
|
+
id: string;
|
|
97
|
+
|
|
98
|
+
status: string;
|
|
99
|
+
|
|
100
|
+
agent_name?: string | null;
|
|
101
|
+
|
|
102
|
+
completed_at?: string | null;
|
|
103
|
+
|
|
104
|
+
created_at?: string | null;
|
|
105
|
+
|
|
106
|
+
error?: string | null;
|
|
107
|
+
|
|
108
|
+
generated_version?: unknown | null;
|
|
109
|
+
|
|
110
|
+
generated_version_id?: string | null;
|
|
111
|
+
|
|
112
|
+
source_version_id?: string | null;
|
|
113
|
+
|
|
114
|
+
started_at?: string | null;
|
|
115
|
+
|
|
116
|
+
summary?: string | null;
|
|
117
|
+
}
|
|
118
|
+
|
|
63
119
|
export interface AgentGetResponse {
|
|
64
120
|
display_name: string;
|
|
65
121
|
|
|
@@ -110,6 +166,36 @@ export namespace AgentGetResponse {
|
|
|
110
166
|
}
|
|
111
167
|
}
|
|
112
168
|
|
|
169
|
+
export interface AgentGetGenerationResponse {
|
|
170
|
+
id: string;
|
|
171
|
+
|
|
172
|
+
status: string;
|
|
173
|
+
|
|
174
|
+
agent_name?: string | null;
|
|
175
|
+
|
|
176
|
+
completed_at?: string | null;
|
|
177
|
+
|
|
178
|
+
created_at?: string | null;
|
|
179
|
+
|
|
180
|
+
error?: string | null;
|
|
181
|
+
|
|
182
|
+
generated_version?: unknown | null;
|
|
183
|
+
|
|
184
|
+
generated_version_id?: string | null;
|
|
185
|
+
|
|
186
|
+
source_version_id?: string | null;
|
|
187
|
+
|
|
188
|
+
started_at?: string | null;
|
|
189
|
+
|
|
190
|
+
summary?: string | null;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export interface AgentPublishResponse {
|
|
194
|
+
agent_name: string;
|
|
195
|
+
|
|
196
|
+
published_version_id: string;
|
|
197
|
+
}
|
|
198
|
+
|
|
113
199
|
export interface AgentRunResponse {
|
|
114
200
|
data: AgentRunResponse.Data;
|
|
115
201
|
|
|
@@ -191,6 +277,11 @@ export namespace AgentRunResponse {
|
|
|
191
277
|
*/
|
|
192
278
|
network_capture?: Array<Data.NetworkCapture>;
|
|
193
279
|
|
|
280
|
+
/**
|
|
281
|
+
* Individual HTML content of each pagination page, before merging.
|
|
282
|
+
*/
|
|
283
|
+
pages_html?: Array<string>;
|
|
284
|
+
|
|
194
285
|
/**
|
|
195
286
|
* The parsing results extracted from the HTML & network content.
|
|
196
287
|
*/
|
|
@@ -472,6 +563,99 @@ export interface AgentRunAsyncResponse {
|
|
|
472
563
|
task: { [key: string]: unknown };
|
|
473
564
|
}
|
|
474
565
|
|
|
566
|
+
/**
|
|
567
|
+
* Response when a batch of extract tasks is created successfully.
|
|
568
|
+
*/
|
|
569
|
+
export interface AgentRunBatchResponse {
|
|
570
|
+
/**
|
|
571
|
+
* Unique identifier for the batch.
|
|
572
|
+
*/
|
|
573
|
+
batch_id: string;
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* Number of tasks in the batch.
|
|
577
|
+
*/
|
|
578
|
+
batch_size: number;
|
|
579
|
+
|
|
580
|
+
/**
|
|
581
|
+
* List of created tasks.
|
|
582
|
+
*/
|
|
583
|
+
tasks: Array<AgentRunBatchResponse.Task>;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
export namespace AgentRunBatchResponse {
|
|
587
|
+
export interface Task {
|
|
588
|
+
/**
|
|
589
|
+
* Unique task identifier.
|
|
590
|
+
*/
|
|
591
|
+
id: string;
|
|
592
|
+
|
|
593
|
+
_query: unknown;
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* Timestamp when the task was created.
|
|
597
|
+
*/
|
|
598
|
+
created_at: string;
|
|
599
|
+
|
|
600
|
+
/**
|
|
601
|
+
* Original input data for the task.
|
|
602
|
+
*/
|
|
603
|
+
input: unknown;
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* Current state of the task.
|
|
607
|
+
*/
|
|
608
|
+
state: 'pending' | 'success' | 'error';
|
|
609
|
+
|
|
610
|
+
/**
|
|
611
|
+
* URL for checking the task status.
|
|
612
|
+
*/
|
|
613
|
+
status_url: string;
|
|
614
|
+
|
|
615
|
+
/**
|
|
616
|
+
* Account name that owns the task.
|
|
617
|
+
*/
|
|
618
|
+
account_name?: string;
|
|
619
|
+
|
|
620
|
+
api_type?: 'web' | 'serp' | 'ecommerce' | 'social' | 'media' | 'agent' | 'extract';
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* Batch ID if this task is part of a batch.
|
|
624
|
+
*/
|
|
625
|
+
batch_id?: string;
|
|
626
|
+
|
|
627
|
+
/**
|
|
628
|
+
* URL for downloading the task results.
|
|
629
|
+
*/
|
|
630
|
+
download_url?: string;
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
* Error message if the task failed.
|
|
634
|
+
*/
|
|
635
|
+
error?: string;
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* Classification of the error type.
|
|
639
|
+
*/
|
|
640
|
+
error_type?: string;
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
* Timestamp when the task was last modified.
|
|
644
|
+
*/
|
|
645
|
+
modified_at?: string;
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* Storage location of the output data.
|
|
649
|
+
*/
|
|
650
|
+
output_url?: string;
|
|
651
|
+
|
|
652
|
+
/**
|
|
653
|
+
* HTTP status code from the task execution.
|
|
654
|
+
*/
|
|
655
|
+
status_code?: number;
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
|
|
475
659
|
export interface AgentListParams {
|
|
476
660
|
/**
|
|
477
661
|
* Number of results per page
|
|
@@ -499,11 +683,46 @@ export interface AgentListParams {
|
|
|
499
683
|
search?: string | null;
|
|
500
684
|
}
|
|
501
685
|
|
|
686
|
+
export type AgentGenerateParams =
|
|
687
|
+
| AgentGenerateParams.CreateAgentGenerationRequest
|
|
688
|
+
| AgentGenerateParams.CreateAgentRefinementRequest;
|
|
689
|
+
|
|
690
|
+
export declare namespace AgentGenerateParams {
|
|
691
|
+
export interface CreateAgentGenerationRequest {
|
|
692
|
+
agent_name: string;
|
|
693
|
+
|
|
694
|
+
prompt: string;
|
|
695
|
+
|
|
696
|
+
url: string;
|
|
697
|
+
|
|
698
|
+
input_schema?: unknown;
|
|
699
|
+
|
|
700
|
+
metadata?: unknown | null;
|
|
701
|
+
|
|
702
|
+
output_schema?: unknown;
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
export interface CreateAgentRefinementRequest {
|
|
706
|
+
from_agent: string;
|
|
707
|
+
|
|
708
|
+
prompt: string;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
export interface AgentPublishParams {
|
|
713
|
+
version_id: string;
|
|
714
|
+
}
|
|
715
|
+
|
|
502
716
|
export interface AgentRunParams {
|
|
503
717
|
agent: string;
|
|
504
718
|
|
|
505
719
|
params: { [key: string]: unknown };
|
|
506
720
|
|
|
721
|
+
/**
|
|
722
|
+
* Response formats to include. All disabled by default.
|
|
723
|
+
*/
|
|
724
|
+
formats?: Array<'html' | 'markdown' | 'screenshot' | 'headers'>;
|
|
725
|
+
|
|
507
726
|
localization?: boolean;
|
|
508
727
|
}
|
|
509
728
|
|
|
@@ -517,6 +736,11 @@ export interface AgentRunAsyncParams {
|
|
|
517
736
|
*/
|
|
518
737
|
callback_url?: string;
|
|
519
738
|
|
|
739
|
+
/**
|
|
740
|
+
* Response formats to include. All disabled by default.
|
|
741
|
+
*/
|
|
742
|
+
formats?: Array<'html' | 'markdown' | 'screenshot' | 'headers'>;
|
|
743
|
+
|
|
520
744
|
localization?: boolean;
|
|
521
745
|
|
|
522
746
|
/**
|
|
@@ -540,14 +764,53 @@ export interface AgentRunAsyncParams {
|
|
|
540
764
|
storage_url?: string;
|
|
541
765
|
}
|
|
542
766
|
|
|
767
|
+
export interface AgentRunBatchParams {
|
|
768
|
+
inputs: Array<AgentRunBatchParams.Input>;
|
|
769
|
+
|
|
770
|
+
shared_inputs: AgentRunBatchParams.SharedInputs;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
export namespace AgentRunBatchParams {
|
|
774
|
+
export interface Input {
|
|
775
|
+
/**
|
|
776
|
+
* Response formats to include. All disabled by default.
|
|
777
|
+
*/
|
|
778
|
+
formats?: Array<'html' | 'markdown' | 'screenshot' | 'headers'>;
|
|
779
|
+
|
|
780
|
+
localization?: boolean;
|
|
781
|
+
|
|
782
|
+
params?: { [key: string]: unknown };
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
export interface SharedInputs {
|
|
786
|
+
agent: string;
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* Response formats to include. All disabled by default.
|
|
790
|
+
*/
|
|
791
|
+
formats?: Array<'html' | 'markdown' | 'screenshot' | 'headers'>;
|
|
792
|
+
|
|
793
|
+
localization?: boolean;
|
|
794
|
+
|
|
795
|
+
params?: { [key: string]: unknown };
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
|
|
543
799
|
export declare namespace Agent {
|
|
544
800
|
export {
|
|
545
801
|
type AgentListResponse as AgentListResponse,
|
|
802
|
+
type AgentGenerateResponse as AgentGenerateResponse,
|
|
546
803
|
type AgentGetResponse as AgentGetResponse,
|
|
804
|
+
type AgentGetGenerationResponse as AgentGetGenerationResponse,
|
|
805
|
+
type AgentPublishResponse as AgentPublishResponse,
|
|
547
806
|
type AgentRunResponse as AgentRunResponse,
|
|
548
807
|
type AgentRunAsyncResponse as AgentRunAsyncResponse,
|
|
808
|
+
type AgentRunBatchResponse as AgentRunBatchResponse,
|
|
549
809
|
type AgentListParams as AgentListParams,
|
|
810
|
+
type AgentGenerateParams as AgentGenerateParams,
|
|
811
|
+
type AgentPublishParams as AgentPublishParams,
|
|
550
812
|
type AgentRunParams as AgentRunParams,
|
|
551
813
|
type AgentRunAsyncParams as AgentRunAsyncParams,
|
|
814
|
+
type AgentRunBatchParams as AgentRunBatchParams,
|
|
552
815
|
};
|
|
553
816
|
}
|
package/src/resources/index.ts
CHANGED
|
@@ -4,12 +4,19 @@ export * from './shared';
|
|
|
4
4
|
export {
|
|
5
5
|
Agent,
|
|
6
6
|
type AgentListResponse,
|
|
7
|
+
type AgentGenerateResponse,
|
|
7
8
|
type AgentGetResponse,
|
|
9
|
+
type AgentGetGenerationResponse,
|
|
10
|
+
type AgentPublishResponse,
|
|
8
11
|
type AgentRunResponse,
|
|
9
12
|
type AgentRunAsyncResponse,
|
|
13
|
+
type AgentRunBatchResponse,
|
|
10
14
|
type AgentListParams,
|
|
15
|
+
type AgentGenerateParams,
|
|
16
|
+
type AgentPublishParams,
|
|
11
17
|
type AgentRunParams,
|
|
12
18
|
type AgentRunAsyncParams,
|
|
19
|
+
type AgentRunBatchParams,
|
|
13
20
|
} from './agent';
|
|
14
21
|
export { Batches, type BatchGetResponse, type BatchProgressResponse } from './batches';
|
|
15
22
|
export {
|
|
@@ -83,6 +83,11 @@ export namespace ExtractResponse {
|
|
|
83
83
|
*/
|
|
84
84
|
network_capture?: Array<Data.NetworkCapture>;
|
|
85
85
|
|
|
86
|
+
/**
|
|
87
|
+
* Individual HTML content of each pagination page, before merging.
|
|
88
|
+
*/
|
|
89
|
+
pages_html?: Array<string>;
|
|
90
|
+
|
|
86
91
|
/**
|
|
87
92
|
* The parsing results extracted from the HTML & network content.
|
|
88
93
|
*/
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.12.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.12.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.12.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.12.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|