@onkernel/sdk 0.1.0-alpha.1 → 0.1.0-alpha.10
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 +76 -0
- package/README.md +17 -29
- package/client.d.mts +25 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +25 -3
- package/client.d.ts.map +1 -1
- package/client.js +24 -4
- package/client.js.map +1 -1
- package/client.mjs +24 -4
- package/client.mjs.map +1 -1
- package/core/app-framework.d.mts +49 -0
- package/core/app-framework.d.mts.map +1 -0
- package/core/app-framework.d.ts +49 -0
- package/core/app-framework.d.ts.map +1 -0
- package/core/app-framework.js +105 -0
- package/core/app-framework.js.map +1 -0
- package/core/app-framework.mjs +101 -0
- package/core/app-framework.mjs.map +1 -0
- package/index.d.mts +1 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/internal/headers.js +1 -1
- package/internal/headers.js.map +1 -1
- package/internal/headers.mjs +1 -1
- package/internal/headers.mjs.map +1 -1
- package/package.json +1 -4
- package/resources/apps.d.mts +45 -15
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +45 -15
- package/resources/apps.d.ts.map +1 -1
- package/resources/apps.js +3 -3
- package/resources/apps.js.map +1 -1
- package/resources/apps.mjs +3 -3
- package/resources/apps.mjs.map +1 -1
- package/resources/browser.d.mts +8 -2
- package/resources/browser.d.mts.map +1 -1
- package/resources/browser.d.ts +8 -2
- package/resources/browser.d.ts.map +1 -1
- package/resources/browser.js +2 -2
- package/resources/browser.js.map +1 -1
- package/resources/browser.mjs +2 -2
- package/resources/browser.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/src/client.ts +45 -6
- package/src/core/app-framework.ts +137 -0
- package/src/index.ts +2 -0
- package/src/internal/headers.ts +1 -1
- package/src/resources/apps.ts +52 -15
- package/src/resources/browser.ts +16 -3
- package/src/resources/index.ts +1 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
package/resources/apps.d.mts
CHANGED
|
@@ -9,9 +9,8 @@ export declare class Apps extends APIResource {
|
|
|
9
9
|
* @example
|
|
10
10
|
* ```ts
|
|
11
11
|
* const response = await client.apps.deploy({
|
|
12
|
-
*
|
|
12
|
+
* entrypointRelPath: 'app.py',
|
|
13
13
|
* file: fs.createReadStream('path/to/file'),
|
|
14
|
-
* version: '1.0.0',
|
|
15
14
|
* });
|
|
16
15
|
* ```
|
|
17
16
|
*/
|
|
@@ -22,8 +21,9 @@ export declare class Apps extends APIResource {
|
|
|
22
21
|
* @example
|
|
23
22
|
* ```ts
|
|
24
23
|
* const response = await client.apps.invoke({
|
|
24
|
+
* actionName: 'analyze',
|
|
25
25
|
* appName: 'my-awesome-app',
|
|
26
|
-
* payload:
|
|
26
|
+
* payload: { data: 'example input' },
|
|
27
27
|
* version: '1.0.0',
|
|
28
28
|
* });
|
|
29
29
|
* ```
|
|
@@ -42,10 +42,7 @@ export declare class Apps extends APIResource {
|
|
|
42
42
|
retrieveInvocation(id: string, options?: RequestOptions): APIPromise<AppRetrieveInvocationResponse>;
|
|
43
43
|
}
|
|
44
44
|
export interface AppDeployResponse {
|
|
45
|
-
|
|
46
|
-
* ID of the deployed app version
|
|
47
|
-
*/
|
|
48
|
-
id: string;
|
|
45
|
+
apps: Array<AppDeployResponse.App>;
|
|
49
46
|
/**
|
|
50
47
|
* Success message
|
|
51
48
|
*/
|
|
@@ -55,6 +52,27 @@ export interface AppDeployResponse {
|
|
|
55
52
|
*/
|
|
56
53
|
success: boolean;
|
|
57
54
|
}
|
|
55
|
+
export declare namespace AppDeployResponse {
|
|
56
|
+
interface App {
|
|
57
|
+
/**
|
|
58
|
+
* ID for the app version deployed
|
|
59
|
+
*/
|
|
60
|
+
id: string;
|
|
61
|
+
actions: Array<App.Action>;
|
|
62
|
+
/**
|
|
63
|
+
* Name of the app
|
|
64
|
+
*/
|
|
65
|
+
name: string;
|
|
66
|
+
}
|
|
67
|
+
namespace App {
|
|
68
|
+
interface Action {
|
|
69
|
+
/**
|
|
70
|
+
* Name of the action
|
|
71
|
+
*/
|
|
72
|
+
name: string;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
58
76
|
export interface AppInvokeResponse {
|
|
59
77
|
/**
|
|
60
78
|
* ID of the invocation
|
|
@@ -63,7 +81,11 @@ export interface AppInvokeResponse {
|
|
|
63
81
|
/**
|
|
64
82
|
* Status of the invocation
|
|
65
83
|
*/
|
|
66
|
-
status:
|
|
84
|
+
status: 'QUEUED' | 'RUNNING' | 'SUCCEEDED' | 'FAILED';
|
|
85
|
+
/**
|
|
86
|
+
* Output from the invocation (if available)
|
|
87
|
+
*/
|
|
88
|
+
output?: string;
|
|
67
89
|
}
|
|
68
90
|
export interface AppRetrieveInvocationResponse {
|
|
69
91
|
id: string;
|
|
@@ -76,23 +98,31 @@ export interface AppRetrieveInvocationResponse {
|
|
|
76
98
|
}
|
|
77
99
|
export interface AppDeployParams {
|
|
78
100
|
/**
|
|
79
|
-
*
|
|
101
|
+
* Relative path to the entrypoint of the application
|
|
80
102
|
*/
|
|
81
|
-
|
|
103
|
+
entrypointRelPath: string;
|
|
82
104
|
/**
|
|
83
|
-
* ZIP file containing the application
|
|
105
|
+
* ZIP file containing the application source directory
|
|
84
106
|
*/
|
|
85
107
|
file: Uploadable;
|
|
86
108
|
/**
|
|
87
|
-
*
|
|
109
|
+
* Allow overwriting an existing app version
|
|
88
110
|
*/
|
|
89
|
-
|
|
111
|
+
force?: 'true' | 'false';
|
|
90
112
|
/**
|
|
91
|
-
*
|
|
113
|
+
* Region for deployment. Currently we only support "aws.us-east-1a"
|
|
92
114
|
*/
|
|
93
|
-
region?:
|
|
115
|
+
region?: 'aws.us-east-1a';
|
|
116
|
+
/**
|
|
117
|
+
* Version of the application. Can be any string.
|
|
118
|
+
*/
|
|
119
|
+
version?: string;
|
|
94
120
|
}
|
|
95
121
|
export interface AppInvokeParams {
|
|
122
|
+
/**
|
|
123
|
+
* Name of the action to invoke
|
|
124
|
+
*/
|
|
125
|
+
actionName: string;
|
|
96
126
|
/**
|
|
97
127
|
* Name of the application
|
|
98
128
|
*/
|
package/resources/apps.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apps.d.mts","sourceRoot":"","sources":["../src/resources/apps.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,UAAU,EAAE;OACnB,EAAE,cAAc,EAAE;AAIzB,qBAAa,IAAK,SAAQ,WAAW;IACnC
|
|
1
|
+
{"version":3,"file":"apps.d.mts","sourceRoot":"","sources":["../src/resources/apps.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,UAAU,EAAE;OACnB,EAAE,cAAc,EAAE;AAIzB,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAI,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC;IAItF;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAI,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC;IAItF;;;;;;;;;OASG;IACH,kBAAkB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,6BAA6B,CAAC;CAGpG;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,KAAK,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC;IAEnC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,GAAG;QAClB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAE3B;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;KACd;IAED,UAAiB,GAAG,CAAC;QACnB,UAAiB,MAAM;YACrB;;eAEG;YACH,IAAI,EAAE,MAAM,CAAC;SACd;KACF;CACF;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;IAEtD;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,6BAA6B;IAC5C,EAAE,EAAE,MAAM,CAAC;IAEX,OAAO,EAAE,MAAM,CAAC;IAEhB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B,KAAK,EAAE,MAAM,CAAC;IAEd,MAAM,EAAE,MAAM,CAAC;IAEf,SAAS,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAEzB;;OAEG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAE1B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
|
package/resources/apps.d.ts
CHANGED
|
@@ -9,9 +9,8 @@ export declare class Apps extends APIResource {
|
|
|
9
9
|
* @example
|
|
10
10
|
* ```ts
|
|
11
11
|
* const response = await client.apps.deploy({
|
|
12
|
-
*
|
|
12
|
+
* entrypointRelPath: 'app.py',
|
|
13
13
|
* file: fs.createReadStream('path/to/file'),
|
|
14
|
-
* version: '1.0.0',
|
|
15
14
|
* });
|
|
16
15
|
* ```
|
|
17
16
|
*/
|
|
@@ -22,8 +21,9 @@ export declare class Apps extends APIResource {
|
|
|
22
21
|
* @example
|
|
23
22
|
* ```ts
|
|
24
23
|
* const response = await client.apps.invoke({
|
|
24
|
+
* actionName: 'analyze',
|
|
25
25
|
* appName: 'my-awesome-app',
|
|
26
|
-
* payload:
|
|
26
|
+
* payload: { data: 'example input' },
|
|
27
27
|
* version: '1.0.0',
|
|
28
28
|
* });
|
|
29
29
|
* ```
|
|
@@ -42,10 +42,7 @@ export declare class Apps extends APIResource {
|
|
|
42
42
|
retrieveInvocation(id: string, options?: RequestOptions): APIPromise<AppRetrieveInvocationResponse>;
|
|
43
43
|
}
|
|
44
44
|
export interface AppDeployResponse {
|
|
45
|
-
|
|
46
|
-
* ID of the deployed app version
|
|
47
|
-
*/
|
|
48
|
-
id: string;
|
|
45
|
+
apps: Array<AppDeployResponse.App>;
|
|
49
46
|
/**
|
|
50
47
|
* Success message
|
|
51
48
|
*/
|
|
@@ -55,6 +52,27 @@ export interface AppDeployResponse {
|
|
|
55
52
|
*/
|
|
56
53
|
success: boolean;
|
|
57
54
|
}
|
|
55
|
+
export declare namespace AppDeployResponse {
|
|
56
|
+
interface App {
|
|
57
|
+
/**
|
|
58
|
+
* ID for the app version deployed
|
|
59
|
+
*/
|
|
60
|
+
id: string;
|
|
61
|
+
actions: Array<App.Action>;
|
|
62
|
+
/**
|
|
63
|
+
* Name of the app
|
|
64
|
+
*/
|
|
65
|
+
name: string;
|
|
66
|
+
}
|
|
67
|
+
namespace App {
|
|
68
|
+
interface Action {
|
|
69
|
+
/**
|
|
70
|
+
* Name of the action
|
|
71
|
+
*/
|
|
72
|
+
name: string;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
58
76
|
export interface AppInvokeResponse {
|
|
59
77
|
/**
|
|
60
78
|
* ID of the invocation
|
|
@@ -63,7 +81,11 @@ export interface AppInvokeResponse {
|
|
|
63
81
|
/**
|
|
64
82
|
* Status of the invocation
|
|
65
83
|
*/
|
|
66
|
-
status:
|
|
84
|
+
status: 'QUEUED' | 'RUNNING' | 'SUCCEEDED' | 'FAILED';
|
|
85
|
+
/**
|
|
86
|
+
* Output from the invocation (if available)
|
|
87
|
+
*/
|
|
88
|
+
output?: string;
|
|
67
89
|
}
|
|
68
90
|
export interface AppRetrieveInvocationResponse {
|
|
69
91
|
id: string;
|
|
@@ -76,23 +98,31 @@ export interface AppRetrieveInvocationResponse {
|
|
|
76
98
|
}
|
|
77
99
|
export interface AppDeployParams {
|
|
78
100
|
/**
|
|
79
|
-
*
|
|
101
|
+
* Relative path to the entrypoint of the application
|
|
80
102
|
*/
|
|
81
|
-
|
|
103
|
+
entrypointRelPath: string;
|
|
82
104
|
/**
|
|
83
|
-
* ZIP file containing the application
|
|
105
|
+
* ZIP file containing the application source directory
|
|
84
106
|
*/
|
|
85
107
|
file: Uploadable;
|
|
86
108
|
/**
|
|
87
|
-
*
|
|
109
|
+
* Allow overwriting an existing app version
|
|
88
110
|
*/
|
|
89
|
-
|
|
111
|
+
force?: 'true' | 'false';
|
|
90
112
|
/**
|
|
91
|
-
*
|
|
113
|
+
* Region for deployment. Currently we only support "aws.us-east-1a"
|
|
92
114
|
*/
|
|
93
|
-
region?:
|
|
115
|
+
region?: 'aws.us-east-1a';
|
|
116
|
+
/**
|
|
117
|
+
* Version of the application. Can be any string.
|
|
118
|
+
*/
|
|
119
|
+
version?: string;
|
|
94
120
|
}
|
|
95
121
|
export interface AppInvokeParams {
|
|
122
|
+
/**
|
|
123
|
+
* Name of the action to invoke
|
|
124
|
+
*/
|
|
125
|
+
actionName: string;
|
|
96
126
|
/**
|
|
97
127
|
* Name of the application
|
|
98
128
|
*/
|
package/resources/apps.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../src/resources/apps.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,UAAU,EAAE;OACnB,EAAE,cAAc,EAAE;AAIzB,qBAAa,IAAK,SAAQ,WAAW;IACnC
|
|
1
|
+
{"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../src/resources/apps.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,UAAU,EAAE;OACnB,EAAE,cAAc,EAAE;AAIzB,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAI,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC;IAItF;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAI,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC;IAItF;;;;;;;;;OASG;IACH,kBAAkB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,6BAA6B,CAAC;CAGpG;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,KAAK,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC;IAEnC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,GAAG;QAClB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAE3B;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;KACd;IAED,UAAiB,GAAG,CAAC;QACnB,UAAiB,MAAM;YACrB;;eAEG;YACH,IAAI,EAAE,MAAM,CAAC;SACd;KACF;CACF;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;IAEtD;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,6BAA6B;IAC5C,EAAE,EAAE,MAAM,CAAC;IAEX,OAAO,EAAE,MAAM,CAAC;IAEhB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B,KAAK,EAAE,MAAM,CAAC;IAEd,MAAM,EAAE,MAAM,CAAC;IAEf,SAAS,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAEzB;;OAEG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAE1B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
|
package/resources/apps.js
CHANGED
|
@@ -12,9 +12,8 @@ class Apps extends resource_1.APIResource {
|
|
|
12
12
|
* @example
|
|
13
13
|
* ```ts
|
|
14
14
|
* const response = await client.apps.deploy({
|
|
15
|
-
*
|
|
15
|
+
* entrypointRelPath: 'app.py',
|
|
16
16
|
* file: fs.createReadStream('path/to/file'),
|
|
17
|
-
* version: '1.0.0',
|
|
18
17
|
* });
|
|
19
18
|
* ```
|
|
20
19
|
*/
|
|
@@ -27,8 +26,9 @@ class Apps extends resource_1.APIResource {
|
|
|
27
26
|
* @example
|
|
28
27
|
* ```ts
|
|
29
28
|
* const response = await client.apps.invoke({
|
|
29
|
+
* actionName: 'analyze',
|
|
30
30
|
* appName: 'my-awesome-app',
|
|
31
|
-
* payload:
|
|
31
|
+
* payload: { data: 'example input' },
|
|
32
32
|
* version: '1.0.0',
|
|
33
33
|
* });
|
|
34
34
|
* ```
|
package/resources/apps.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apps.js","sourceRoot":"","sources":["../src/resources/apps.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,oDAAkE;AAClE,oDAA8C;AAE9C,MAAa,IAAK,SAAQ,sBAAW;IACnC
|
|
1
|
+
{"version":3,"file":"apps.js","sourceRoot":"","sources":["../src/resources/apps.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,oDAAkE;AAClE,oDAA8C;AAE9C,MAAa,IAAK,SAAQ,sBAAW;IACnC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAqB,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,IAAA,qCAA2B,EAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5G,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAqB,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;OASG;IACH,kBAAkB,CAAC,EAAU,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,qBAAqB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;CACF;AA9CD,oBA8CC"}
|
package/resources/apps.mjs
CHANGED
|
@@ -9,9 +9,8 @@ export class Apps extends APIResource {
|
|
|
9
9
|
* @example
|
|
10
10
|
* ```ts
|
|
11
11
|
* const response = await client.apps.deploy({
|
|
12
|
-
*
|
|
12
|
+
* entrypointRelPath: 'app.py',
|
|
13
13
|
* file: fs.createReadStream('path/to/file'),
|
|
14
|
-
* version: '1.0.0',
|
|
15
14
|
* });
|
|
16
15
|
* ```
|
|
17
16
|
*/
|
|
@@ -24,8 +23,9 @@ export class Apps extends APIResource {
|
|
|
24
23
|
* @example
|
|
25
24
|
* ```ts
|
|
26
25
|
* const response = await client.apps.invoke({
|
|
26
|
+
* actionName: 'analyze',
|
|
27
27
|
* appName: 'my-awesome-app',
|
|
28
|
-
* payload:
|
|
28
|
+
* payload: { data: 'example input' },
|
|
29
29
|
* version: '1.0.0',
|
|
30
30
|
* });
|
|
31
31
|
* ```
|
package/resources/apps.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apps.mjs","sourceRoot":"","sources":["../src/resources/apps.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,2BAA2B,EAAE;OAC/B,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC
|
|
1
|
+
{"version":3,"file":"apps.mjs","sourceRoot":"","sources":["../src/resources/apps.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,2BAA2B,EAAE;OAC/B,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAqB,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,2BAA2B,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5G,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAqB,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;OASG;IACH,kBAAkB,CAAC,EAAU,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,qBAAqB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;CACF"}
|
package/resources/browser.d.mts
CHANGED
|
@@ -5,7 +5,7 @@ export declare class Browser extends APIResource {
|
|
|
5
5
|
/**
|
|
6
6
|
* Create Browser Session
|
|
7
7
|
*/
|
|
8
|
-
createSession(options?: RequestOptions): APIPromise<BrowserCreateSessionResponse>;
|
|
8
|
+
createSession(body: BrowserCreateSessionParams, options?: RequestOptions): APIPromise<BrowserCreateSessionResponse>;
|
|
9
9
|
}
|
|
10
10
|
export interface BrowserCreateSessionResponse {
|
|
11
11
|
/**
|
|
@@ -21,7 +21,13 @@ export interface BrowserCreateSessionResponse {
|
|
|
21
21
|
*/
|
|
22
22
|
sessionId: string;
|
|
23
23
|
}
|
|
24
|
+
export interface BrowserCreateSessionParams {
|
|
25
|
+
/**
|
|
26
|
+
* Kernel App invocation ID
|
|
27
|
+
*/
|
|
28
|
+
invocationId: string;
|
|
29
|
+
}
|
|
24
30
|
export declare namespace Browser {
|
|
25
|
-
export { type BrowserCreateSessionResponse as BrowserCreateSessionResponse };
|
|
31
|
+
export { type BrowserCreateSessionResponse as BrowserCreateSessionResponse, type BrowserCreateSessionParams as BrowserCreateSessionParams, };
|
|
26
32
|
}
|
|
27
33
|
//# sourceMappingURL=browser.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.mts","sourceRoot":"","sources":["../src/resources/browser.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,aAAa,
|
|
1
|
+
{"version":3,"file":"browser.d.mts","sourceRoot":"","sources":["../src/resources/browser.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,aAAa,CACX,IAAI,EAAE,0BAA0B,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;CAG5C;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
|
package/resources/browser.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare class Browser extends APIResource {
|
|
|
5
5
|
/**
|
|
6
6
|
* Create Browser Session
|
|
7
7
|
*/
|
|
8
|
-
createSession(options?: RequestOptions): APIPromise<BrowserCreateSessionResponse>;
|
|
8
|
+
createSession(body: BrowserCreateSessionParams, options?: RequestOptions): APIPromise<BrowserCreateSessionResponse>;
|
|
9
9
|
}
|
|
10
10
|
export interface BrowserCreateSessionResponse {
|
|
11
11
|
/**
|
|
@@ -21,7 +21,13 @@ export interface BrowserCreateSessionResponse {
|
|
|
21
21
|
*/
|
|
22
22
|
sessionId: string;
|
|
23
23
|
}
|
|
24
|
+
export interface BrowserCreateSessionParams {
|
|
25
|
+
/**
|
|
26
|
+
* Kernel App invocation ID
|
|
27
|
+
*/
|
|
28
|
+
invocationId: string;
|
|
29
|
+
}
|
|
24
30
|
export declare namespace Browser {
|
|
25
|
-
export { type BrowserCreateSessionResponse as BrowserCreateSessionResponse };
|
|
31
|
+
export { type BrowserCreateSessionResponse as BrowserCreateSessionResponse, type BrowserCreateSessionParams as BrowserCreateSessionParams, };
|
|
26
32
|
}
|
|
27
33
|
//# sourceMappingURL=browser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/resources/browser.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,aAAa,
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/resources/browser.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,aAAa,CACX,IAAI,EAAE,0BAA0B,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;CAG5C;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
|
package/resources/browser.js
CHANGED
|
@@ -7,8 +7,8 @@ class Browser extends resource_1.APIResource {
|
|
|
7
7
|
/**
|
|
8
8
|
* Create Browser Session
|
|
9
9
|
*/
|
|
10
|
-
createSession(options) {
|
|
11
|
-
return this._client.post('/browser', options);
|
|
10
|
+
createSession(body, options) {
|
|
11
|
+
return this._client.post('/browser', { body, ...options });
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
exports.Browser = Browser;
|
package/resources/browser.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../src/resources/browser.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;OAEG;IACH,aAAa,
|
|
1
|
+
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../src/resources/browser.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;OAEG;IACH,aAAa,CACX,IAAgC,EAChC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7D,CAAC;CACF;AAVD,0BAUC"}
|
package/resources/browser.mjs
CHANGED
|
@@ -4,8 +4,8 @@ export class Browser extends APIResource {
|
|
|
4
4
|
/**
|
|
5
5
|
* Create Browser Session
|
|
6
6
|
*/
|
|
7
|
-
createSession(options) {
|
|
8
|
-
return this._client.post('/browser', options);
|
|
7
|
+
createSession(body, options) {
|
|
8
|
+
return this._client.post('/browser', { body, ...options });
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
//# sourceMappingURL=browser.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.mjs","sourceRoot":"","sources":["../src/resources/browser.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,aAAa,
|
|
1
|
+
{"version":3,"file":"browser.mjs","sourceRoot":"","sources":["../src/resources/browser.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,aAAa,CACX,IAAgC,EAChC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7D,CAAC;CACF"}
|
package/resources/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { Apps, type AppDeployResponse, type AppInvokeResponse, type AppRetrieveInvocationResponse, type AppDeployParams, type AppInvokeParams, } from "./apps.mjs";
|
|
2
|
-
export { Browser, type BrowserCreateSessionResponse } from "./browser.mjs";
|
|
2
|
+
export { Browser, type BrowserCreateSessionResponse, type BrowserCreateSessionParams } from "./browser.mjs";
|
|
3
3
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,IAAI,EACJ,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,6BAA6B,EAClC,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB;OACM,EAAE,OAAO,EAAE,KAAK,4BAA4B,EAAE"}
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,IAAI,EACJ,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,6BAA6B,EAClC,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB;OACM,EAAE,OAAO,EAAE,KAAK,4BAA4B,EAAE,KAAK,0BAA0B,EAAE"}
|
package/resources/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { Apps, type AppDeployResponse, type AppInvokeResponse, type AppRetrieveInvocationResponse, type AppDeployParams, type AppInvokeParams, } from "./apps.js";
|
|
2
|
-
export { Browser, type BrowserCreateSessionResponse } from "./browser.js";
|
|
2
|
+
export { Browser, type BrowserCreateSessionResponse, type BrowserCreateSessionParams } from "./browser.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/resources/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,IAAI,EACJ,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,6BAA6B,EAClC,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB;OACM,EAAE,OAAO,EAAE,KAAK,4BAA4B,EAAE"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,IAAI,EACJ,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,6BAA6B,EAClC,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB;OACM,EAAE,OAAO,EAAE,KAAK,4BAA4B,EAAE,KAAK,0BAA0B,EAAE"}
|
package/resources/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kCAOgB;AANd,4FAAA,IAAI,OAAA;AAON,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kCAOgB;AANd,4FAAA,IAAI,OAAA;AAON,wCAAwG;AAA/F,kGAAA,OAAO,OAAA"}
|
package/resources/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,IAAI,GAML;OACM,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,IAAI,GAML;OACM,EAAE,OAAO,EAAsE"}
|
package/src/client.ts
CHANGED
|
@@ -28,10 +28,17 @@ import {
|
|
|
28
28
|
AppRetrieveInvocationResponse,
|
|
29
29
|
Apps,
|
|
30
30
|
} from './resources/apps';
|
|
31
|
-
import { Browser, BrowserCreateSessionResponse } from './resources/browser';
|
|
31
|
+
import { Browser, BrowserCreateSessionParams, BrowserCreateSessionResponse } from './resources/browser';
|
|
32
32
|
import { readEnv } from './internal/utils/env';
|
|
33
33
|
import { formatRequestDetails, loggerFor } from './internal/utils/log';
|
|
34
34
|
import { isEmptyObj } from './internal/utils/values';
|
|
35
|
+
import { KernelApp } from './core/app-framework';
|
|
36
|
+
|
|
37
|
+
const environments = {
|
|
38
|
+
production: 'https://api.onkernel.com/',
|
|
39
|
+
development: 'https://localhost:3001/',
|
|
40
|
+
};
|
|
41
|
+
type Environment = keyof typeof environments;
|
|
35
42
|
|
|
36
43
|
export interface ClientOptions {
|
|
37
44
|
/**
|
|
@@ -39,6 +46,15 @@ export interface ClientOptions {
|
|
|
39
46
|
*/
|
|
40
47
|
apiKey?: string | undefined;
|
|
41
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Specifies the environment to use for the API.
|
|
51
|
+
*
|
|
52
|
+
* Each environment maps to a different base URL:
|
|
53
|
+
* - `production` corresponds to `https://api.onkernel.com/`
|
|
54
|
+
* - `development` corresponds to `https://localhost:3001/`
|
|
55
|
+
*/
|
|
56
|
+
environment?: Environment | undefined;
|
|
57
|
+
|
|
42
58
|
/**
|
|
43
59
|
* Override the default base URL for the API, e.g., "https://api.example.com/v2/"
|
|
44
60
|
*
|
|
@@ -128,7 +144,8 @@ export class Kernel {
|
|
|
128
144
|
* API Client for interfacing with the Kernel API.
|
|
129
145
|
*
|
|
130
146
|
* @param {string | undefined} [opts.apiKey=process.env['KERNEL_API_KEY'] ?? undefined]
|
|
131
|
-
* @param {
|
|
147
|
+
* @param {Environment} [opts.environment=production] - Specifies the environment URL to use for the API.
|
|
148
|
+
* @param {string} [opts.baseURL=process.env['KERNEL_BASE_URL'] ?? https://api.onkernel.com/] - Override the default base URL for the API.
|
|
132
149
|
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
133
150
|
* @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
|
|
134
151
|
* @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
@@ -150,10 +167,17 @@ export class Kernel {
|
|
|
150
167
|
const options: ClientOptions = {
|
|
151
168
|
apiKey,
|
|
152
169
|
...opts,
|
|
153
|
-
baseURL
|
|
170
|
+
baseURL,
|
|
171
|
+
environment: opts.environment ?? 'production',
|
|
154
172
|
};
|
|
155
173
|
|
|
156
|
-
|
|
174
|
+
if (baseURL && opts.environment) {
|
|
175
|
+
throw new Errors.KernelError(
|
|
176
|
+
'Ambiguous URL; The `baseURL` option (or KERNEL_BASE_URL env var) and the `environment` option are given. If you want to use the environment you must pass baseURL: null',
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
this.baseURL = options.baseURL || environments[options.environment || 'production'];
|
|
157
181
|
this.timeout = options.timeout ?? Kernel.DEFAULT_TIMEOUT /* 1 minute */;
|
|
158
182
|
this.logger = options.logger ?? console;
|
|
159
183
|
const defaultLogLevel = 'warn';
|
|
@@ -179,7 +203,8 @@ export class Kernel {
|
|
|
179
203
|
withOptions(options: Partial<ClientOptions>): this {
|
|
180
204
|
return new (this.constructor as any as new (props: ClientOptions) => typeof this)({
|
|
181
205
|
...this._options,
|
|
182
|
-
|
|
206
|
+
environment: options.environment ? options.environment : undefined,
|
|
207
|
+
baseURL: options.environment ? undefined : this.baseURL,
|
|
183
208
|
maxRetries: this.maxRetries,
|
|
184
209
|
timeout: this.timeout,
|
|
185
210
|
logger: this.logger,
|
|
@@ -680,6 +705,16 @@ export class Kernel {
|
|
|
680
705
|
}
|
|
681
706
|
}
|
|
682
707
|
|
|
708
|
+
/**
|
|
709
|
+
* Create a new KernelApp instance.
|
|
710
|
+
*
|
|
711
|
+
* @param name - The name of the app to create.
|
|
712
|
+
* @returns A new KernelApp instance you can attach actions to.
|
|
713
|
+
*/
|
|
714
|
+
public app(name: string): KernelApp {
|
|
715
|
+
return new KernelApp(name);
|
|
716
|
+
}
|
|
717
|
+
|
|
683
718
|
static Kernel = this;
|
|
684
719
|
static DEFAULT_TIMEOUT = 60000; // 1 minute
|
|
685
720
|
|
|
@@ -716,5 +751,9 @@ export declare namespace Kernel {
|
|
|
716
751
|
type AppInvokeParams as AppInvokeParams,
|
|
717
752
|
};
|
|
718
753
|
|
|
719
|
-
export {
|
|
754
|
+
export {
|
|
755
|
+
Browser as Browser,
|
|
756
|
+
type BrowserCreateSessionResponse as BrowserCreateSessionResponse,
|
|
757
|
+
type BrowserCreateSessionParams as BrowserCreateSessionParams,
|
|
758
|
+
};
|
|
720
759
|
}
|