@statezero/core 0.1.2 → 0.1.3-9.1

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/LICENSE CHANGED
@@ -51,7 +51,7 @@ _Last Updated: 2025-06-29_
51
51
 
52
52
  ## **5. LLM Training License**
53
53
 
54
- 5.1. **Separate License Required**: Use of StateZero for **Large Language Model (LLM) training purposes** requires a separate license agreement.
54
+ 5.1. **Separate License Required**: Use of StateZero codebase for **Large Language Model (LLM) training purposes** requires a separate license agreement.
55
55
 
56
56
  5.2. **LLM Training License Fee**: The annual license fee for LLM training usage is **$250,000 per year**.
57
57
 
@@ -64,6 +64,7 @@ _Last Updated: 2025-06-29_
64
64
  - You **may not** modify, reverse engineer, decompile, or disassemble StateZero
65
65
  - You **may not** remove, alter, or obscure any **proprietary notices, branding, or license enforcement mechanisms**
66
66
  - You **may not** sublicense, resell, or distribute StateZero to any third party **without explicit written permission**
67
+ - You **may not** use StateZero for any illegal, unlawful, or criminal activities under the laws of Singapore or under the laws of the jurisdiction where you are located or operating
67
68
  - You **may not** use StateZero to develop or offer **a competing product or service**
68
69
  - You **may not** use StateZero to create a cloud-hosted version of our service (similar to services like Heroku, Netlify, AWS, etc.)
69
70
  - You **may not** use StateZero for LLM training without the separate license outlined in Section 5
@@ -113,4 +114,4 @@ _Last Updated: 2025-06-29_
113
114
 
114
115
  ---
115
116
 
116
- **By downloading, installing, or using StateZero, you acknowledge that you have read, understood, and agree to be bound by the terms of this License Agreement.**
117
+ **By downloading, installing, or using StateZero, you acknowledge that you have read, understood, and agree to be bound by the terms of this License Agreement.**
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Executes a full synchronization, running sync-models first,
3
+ * followed by sync-actions.
4
+ * @param {object} args - Command-line arguments, passed from yargs.
5
+ */
6
+ export function sync(args?: object): Promise<void>;
@@ -0,0 +1,30 @@
1
+ import { generateSchema } from "./syncModels.js";
2
+ import { generateActions } from "./syncActions.js";
3
+ /**
4
+ * Executes a full synchronization, running sync-models first,
5
+ * followed by sync-actions.
6
+ * @param {object} args - Command-line arguments, passed from yargs.
7
+ */
8
+ export async function sync(args = {}) {
9
+ try {
10
+ console.log("šŸš€ Starting full synchronization...");
11
+ // --- Step 1: Synchronize Models ---
12
+ console.log("\n----- Running Model Synchronization -----");
13
+ // Pass args down, as generateSchema expects an object
14
+ await generateSchema(args);
15
+ console.log("----- Model Synchronization Complete -----\n");
16
+ // --- Step 2: Synchronize Actions ---
17
+ console.log("----- Running Action Synchronization -----");
18
+ // generateActions does not require args based on its definition
19
+ await generateActions();
20
+ console.log("----- Action Synchronization Complete -----\n");
21
+ console.log("āœ… Full synchronization finished successfully!");
22
+ }
23
+ catch (error) {
24
+ console.error("\nāŒ A critical error occurred during full synchronization:", error.message);
25
+ if (process.env.DEBUG) {
26
+ console.error("Stack trace:", error.stack);
27
+ }
28
+ process.exit(1);
29
+ }
30
+ }
@@ -0,0 +1,46 @@
1
+ /**
2
+ * CLI entry point.
3
+ */
4
+ export function generateActions(): Promise<void>;
5
+ export type ActionProperty = {
6
+ type: string;
7
+ format?: string | undefined;
8
+ required?: boolean | undefined;
9
+ nullable?: boolean | undefined;
10
+ default?: any;
11
+ choices?: string[] | undefined;
12
+ min_length?: number | undefined;
13
+ max_length?: number | undefined;
14
+ min_value?: number | undefined;
15
+ max_value?: number | undefined;
16
+ items?: ActionProperty | undefined;
17
+ properties?: {
18
+ [x: string]: ActionProperty;
19
+ } | undefined;
20
+ description?: string | undefined;
21
+ };
22
+ export type ActionDefinition = {
23
+ action_name: string;
24
+ title: string;
25
+ class_name: string;
26
+ /**
27
+ * - The application group for the action.
28
+ */
29
+ app: string | null;
30
+ /**
31
+ * - The action's documentation string.
32
+ */
33
+ docstring: string | null;
34
+ input_properties: {
35
+ [x: string]: ActionProperty;
36
+ };
37
+ response_properties: {
38
+ [x: string]: ActionProperty;
39
+ };
40
+ permissions: string[];
41
+ };
42
+ export type BackendConfig = {
43
+ NAME: string;
44
+ API_URL: string;
45
+ GENERATED_ACTIONS_DIR: string;
46
+ };