@ty_krystal/sei-ai 0.1.5 → 0.1.8
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 +701 -175
- package/bin/dev.cmd +3 -0
- package/bin/dev.js +5 -0
- package/bin/run.cmd +3 -0
- package/bin/run.js +5 -0
- package/dist/commands/api-docs.d.ts +20 -0
- package/dist/commands/api-docs.js +4 -5
- package/dist/commands/call.d.ts +27 -0
- package/dist/commands/call.js +12 -13
- package/dist/commands/dict/add-category.d.ts +31 -0
- package/dist/commands/dict/add-category.js +9 -10
- package/dist/commands/dict/add-item.d.ts +32 -0
- package/dist/commands/dict/add-item.js +11 -12
- package/dist/commands/dict/list.d.ts +22 -0
- package/dist/commands/dict/list.js +8 -9
- package/dist/commands/init/base-data.d.ts +26 -0
- package/dist/commands/init/base-data.js +14 -15
- package/dist/commands/query-sql.d.ts +24 -0
- package/dist/commands/query-sql.js +6 -8
- package/dist/commands/query.d.ts +21 -0
- package/dist/commands/query.js +6 -7
- package/dist/commands/relogin.d.ts +17 -0
- package/dist/commands/relogin.js +2 -3
- package/dist/commands/save.d.ts +21 -0
- package/dist/commands/save.js +6 -7
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -2
- package/oclif.manifest.json +1302 -0
- package/package.json +63 -54
- package/config.example.json +0 -33
- package/dist/README.md +0 -239
- package/dist/cli-actions.js +0 -157
- package/dist/cli-helpers.js +0 -246
- package/dist/command-base/context.js +0 -10
- package/dist/command-base/output.js +0 -6
- package/dist/command-base/payload.js +0 -33
- package/dist/command-base/sei-command.js +0 -88
- package/dist/commands/stdio.js +0 -16
- package/dist/commands/streamable-http.js +0 -29
- package/dist/config.example.json +0 -33
- package/dist/config.js +0 -82
- package/dist/constants.js +0 -48
- package/dist/env.js +0 -33
- package/dist/errors.js +0 -55
- package/dist/logger.js +0 -71
- package/dist/openapi.js +0 -261
- package/dist/permissions.js +0 -209
- package/dist/schema.js +0 -112
- package/dist/sei-client.js +0 -535
- package/dist/server.js +0 -237
- package/dist/tools.js +0 -175
- package/dist/types.js +0 -1
- package/dist/utils.js +0 -53
package/dist/commands/relogin.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { SeiCommand } from '
|
|
2
|
-
import { runRelogin } from '../cli-actions.js';
|
|
1
|
+
import { runRelogin, SeiCommand } from '@ty_krystal/sei-ai-core';
|
|
3
2
|
export default class ReloginCommand extends SeiCommand {
|
|
4
|
-
static summary = 'Refresh the login token';
|
|
5
3
|
static description = 'Forces a fresh ai-login and prints the new token.';
|
|
6
4
|
static flags = {
|
|
7
5
|
...SeiCommand.baseFlags,
|
|
8
6
|
};
|
|
7
|
+
static summary = 'Refresh the login token';
|
|
9
8
|
async run() {
|
|
10
9
|
const { flags } = await this.parse(ReloginCommand);
|
|
11
10
|
const client = await this.createClientFromFlags(flags);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SeiCommand } from '@ty_krystal/sei-ai-core';
|
|
2
|
+
export default class SaveCommand extends SeiCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
'allow-failure': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
6
|
+
file: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
+
json: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
stdin: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
'ai-key': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
role: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
account: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
'account-project': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
'account-checkcode': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
token: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
timeout: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
};
|
|
19
|
+
static summary: string;
|
|
20
|
+
run(): Promise<void>;
|
|
21
|
+
}
|
package/dist/commands/save.js
CHANGED
|
@@ -1,28 +1,27 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
|
-
import { SeiCommand } from '
|
|
3
|
-
import { runSave } from '../cli-actions.js';
|
|
2
|
+
import { runSave, SeiCommand } from '@ty_krystal/sei-ai-core';
|
|
4
3
|
export default class SaveCommand extends SeiCommand {
|
|
5
|
-
static summary = 'Save SEI data';
|
|
6
4
|
static description = 'Sends a SEI save payload.';
|
|
7
5
|
static flags = {
|
|
8
6
|
...SeiCommand.baseFlags,
|
|
9
|
-
|
|
7
|
+
'allow-failure': Flags.boolean({ default: false, description: '允许失败响应' }),
|
|
10
8
|
file: Flags.string({ description: 'JSON file path' }),
|
|
9
|
+
json: Flags.string({ description: 'JSON payload' }),
|
|
11
10
|
stdin: Flags.boolean({ default: false, description: 'Read JSON payload from stdin' }),
|
|
12
|
-
'allow-failure': Flags.boolean({ default: false, description: '允许失败响应' }),
|
|
13
11
|
};
|
|
12
|
+
static summary = 'Save SEI data';
|
|
14
13
|
async run() {
|
|
15
14
|
const { flags } = await this.parse(SaveCommand);
|
|
16
15
|
const client = await this.createClientFromFlags(flags);
|
|
17
16
|
const payload = await this.loadPayload({
|
|
18
|
-
jsonText: flags.json,
|
|
19
17
|
filePath: flags.file,
|
|
18
|
+
jsonText: flags.json,
|
|
20
19
|
stdin: flags.stdin,
|
|
21
20
|
});
|
|
22
21
|
await runSave({
|
|
22
|
+
allowFailure: flags['allow-failure'],
|
|
23
23
|
client: { save: (input, requestOptions) => client.save(input, requestOptions) },
|
|
24
24
|
payload,
|
|
25
|
-
allowFailure: flags['allow-failure'],
|
|
26
25
|
});
|
|
27
26
|
}
|
|
28
27
|
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { run } from '@oclif/core';
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
await execute({ dir: import.meta.url });
|
|
1
|
+
export { run } from '@oclif/core';
|