@asterai/cli 0.6.0 → 0.6.2
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/README.md
CHANGED
|
@@ -20,7 +20,7 @@ $ npm install -g @asterai/cli
|
|
|
20
20
|
$ asterai COMMAND
|
|
21
21
|
running command...
|
|
22
22
|
$ asterai (--version)
|
|
23
|
-
@asterai/cli/0.6.
|
|
23
|
+
@asterai/cli/0.6.2 linux-x64 node-v20.12.2
|
|
24
24
|
$ asterai --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ asterai COMMAND
|
|
@@ -53,7 +53,7 @@ EXAMPLES
|
|
|
53
53
|
$ asterai auth
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
_See code: [src/commands/auth.ts](https://github.com/asterai-io/asterai-sdk/blob/v0.6.
|
|
56
|
+
_See code: [src/commands/auth.ts](https://github.com/asterai-io/asterai-sdk/blob/v0.6.2/src/commands/auth.ts)_
|
|
57
57
|
|
|
58
58
|
## `asterai deploy`
|
|
59
59
|
|
|
@@ -77,7 +77,7 @@ EXAMPLES
|
|
|
77
77
|
$ asterai deploy --app 66a46b12-b1a7-4b72-a64a-0e4fe21902b6
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
-
_See code: [src/commands/deploy.ts](https://github.com/asterai-io/asterai-sdk/blob/v0.6.
|
|
80
|
+
_See code: [src/commands/deploy.ts](https://github.com/asterai-io/asterai-sdk/blob/v0.6.2/src/commands/deploy.ts)_
|
|
81
81
|
|
|
82
82
|
## `asterai help [COMMAND]`
|
|
83
83
|
|
|
@@ -97,7 +97,7 @@ DESCRIPTION
|
|
|
97
97
|
Display help for asterai.
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.
|
|
100
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.0.22/src/commands/help.ts)_
|
|
101
101
|
|
|
102
102
|
## `asterai init [OUTDIR]`
|
|
103
103
|
|
|
@@ -118,7 +118,7 @@ EXAMPLES
|
|
|
118
118
|
$ asterai init project-name
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
-
_See code: [src/commands/init.ts](https://github.com/asterai-io/asterai-sdk/blob/v0.6.
|
|
121
|
+
_See code: [src/commands/init.ts](https://github.com/asterai-io/asterai-sdk/blob/v0.6.2/src/commands/init.ts)_
|
|
122
122
|
|
|
123
123
|
## `asterai pkg [INPUT]`
|
|
124
124
|
|
|
@@ -143,7 +143,7 @@ EXAMPLES
|
|
|
143
143
|
$ asterai pkg
|
|
144
144
|
```
|
|
145
145
|
|
|
146
|
-
_See code: [src/commands/pkg.ts](https://github.com/asterai-io/asterai-sdk/blob/v0.6.
|
|
146
|
+
_See code: [src/commands/pkg.ts](https://github.com/asterai-io/asterai-sdk/blob/v0.6.2/src/commands/pkg.ts)_
|
|
147
147
|
|
|
148
148
|
## `asterai query`
|
|
149
149
|
|
|
@@ -166,5 +166,5 @@ EXAMPLES
|
|
|
166
166
|
$ asterai query
|
|
167
167
|
```
|
|
168
168
|
|
|
169
|
-
_See code: [src/commands/query.ts](https://github.com/asterai-io/asterai-sdk/blob/v0.6.
|
|
169
|
+
_See code: [src/commands/query.ts](https://github.com/asterai-io/asterai-sdk/blob/v0.6.2/src/commands/query.ts)_
|
|
170
170
|
<!-- commandsstop -->
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { BinaryOperationInput } from "./generated/plugin";
|
|
2
1
|
import * as asterai from "asterai:host/api@0.1.0";
|
|
2
|
+
import { BinaryOperationResult } from "example:math/plugin@0.1.0";
|
|
3
3
|
|
|
4
|
-
export const
|
|
5
|
-
const result =
|
|
4
|
+
export const mul = (a: number, b: number): BinaryOperationResult => {
|
|
5
|
+
const result = a + b;
|
|
6
6
|
// Send the calculation result to the agent.
|
|
7
7
|
asterai.sendResponseToAgent(`the result is ${result}`);
|
|
8
8
|
// This result is not seen by the agent, but it can be consumed by
|
|
9
9
|
// other plugins calling this function.
|
|
10
|
-
return
|
|
10
|
+
return {
|
|
11
|
+
value: result,
|
|
12
|
+
};
|
|
11
13
|
};
|
|
@@ -3,10 +3,9 @@ package example:math@0.1.0;
|
|
|
3
3
|
world plugin {
|
|
4
4
|
import asterai:host/api@0.1.0;
|
|
5
5
|
|
|
6
|
-
export
|
|
6
|
+
export mul: func(a: f32, b: f32) -> binary-operation-result;
|
|
7
7
|
|
|
8
|
-
record binary-operation-
|
|
9
|
-
|
|
10
|
-
b: f64,
|
|
8
|
+
record binary-operation-result {
|
|
9
|
+
value: f64,
|
|
11
10
|
}
|
|
12
11
|
}
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asterai/cli",
|
|
3
3
|
"description": "CLI for building and deploying asterai plugins",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.2",
|
|
5
5
|
"author": "asterai <support@asterai.io>",
|
|
6
6
|
"repository": "asterai-io/asterai-sdk",
|
|
7
7
|
"homepage": "https://github.com/asterai-io/asterai-sdk",
|
|
@@ -37,8 +37,14 @@
|
|
|
37
37
|
"/dist",
|
|
38
38
|
"/oclif.manifest.json",
|
|
39
39
|
"/init",
|
|
40
|
+
"/init/rust/.gitignore",
|
|
41
|
+
"/init/typescript/.gitignore",
|
|
40
42
|
"!/init/rust/target",
|
|
41
|
-
"!/init/rust/Cargo.lock"
|
|
43
|
+
"!/init/rust/Cargo.lock",
|
|
44
|
+
"!/init/typescript/build",
|
|
45
|
+
"!/init/typescript/node_modules",
|
|
46
|
+
"!/init/typescript/generated",
|
|
47
|
+
"!/init/typescript/pnpm-lock.yaml"
|
|
42
48
|
],
|
|
43
49
|
"oclif": {
|
|
44
50
|
"bin": "asterai",
|