@ty_krystal/sei-ai 0.1.5 → 0.1.6

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.
Files changed (53) hide show
  1. package/README.md +701 -175
  2. package/bin/dev.cmd +3 -0
  3. package/bin/dev.js +5 -0
  4. package/bin/run.cmd +3 -0
  5. package/bin/run.js +5 -0
  6. package/dist/commands/api-docs.d.ts +20 -0
  7. package/dist/commands/api-docs.js +4 -5
  8. package/dist/commands/call.d.ts +27 -0
  9. package/dist/commands/call.js +12 -13
  10. package/dist/commands/dict/add-category.d.ts +31 -0
  11. package/dist/commands/dict/add-category.js +9 -10
  12. package/dist/commands/dict/add-item.d.ts +32 -0
  13. package/dist/commands/dict/add-item.js +11 -12
  14. package/dist/commands/dict/list.d.ts +22 -0
  15. package/dist/commands/dict/list.js +8 -9
  16. package/dist/commands/init/base-data.d.ts +26 -0
  17. package/dist/commands/init/base-data.js +14 -15
  18. package/dist/commands/query-sql.d.ts +24 -0
  19. package/dist/commands/query-sql.js +6 -8
  20. package/dist/commands/query.d.ts +21 -0
  21. package/dist/commands/query.js +6 -7
  22. package/dist/commands/relogin.d.ts +17 -0
  23. package/dist/commands/relogin.js +2 -3
  24. package/dist/commands/save.d.ts +21 -0
  25. package/dist/commands/save.js +6 -7
  26. package/dist/index.d.ts +1 -0
  27. package/dist/index.js +1 -2
  28. package/oclif.manifest.json +1302 -0
  29. package/package.json +63 -54
  30. package/config.example.json +0 -33
  31. package/dist/README.md +0 -239
  32. package/dist/cli-actions.js +0 -157
  33. package/dist/cli-helpers.js +0 -246
  34. package/dist/command-base/context.js +0 -10
  35. package/dist/command-base/output.js +0 -6
  36. package/dist/command-base/payload.js +0 -33
  37. package/dist/command-base/sei-command.js +0 -88
  38. package/dist/commands/stdio.js +0 -16
  39. package/dist/commands/streamable-http.js +0 -29
  40. package/dist/config.example.json +0 -33
  41. package/dist/config.js +0 -82
  42. package/dist/constants.js +0 -48
  43. package/dist/env.js +0 -33
  44. package/dist/errors.js +0 -55
  45. package/dist/logger.js +0 -71
  46. package/dist/openapi.js +0 -261
  47. package/dist/permissions.js +0 -209
  48. package/dist/schema.js +0 -112
  49. package/dist/sei-client.js +0 -535
  50. package/dist/server.js +0 -237
  51. package/dist/tools.js +0 -175
  52. package/dist/types.js +0 -1
  53. package/dist/utils.js +0 -53
@@ -1,11 +1,10 @@
1
- import { SeiCommand } from '../command-base/sei-command.js';
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
+ }
@@ -1,28 +1,27 @@
1
1
  import { Flags } from '@oclif/core';
2
- import { SeiCommand } from '../command-base/sei-command.js';
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
- json: Flags.string({ description: 'JSON payload' }),
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
  }
@@ -0,0 +1 @@
1
+ export { run } from '@oclif/core';
package/dist/index.js CHANGED
@@ -1,2 +1 @@
1
- import { execute } from '@oclif/core';
2
- await execute({ dir: import.meta.url });
1
+ export { run } from '@oclif/core';