startx 0.9.4 → 0.9.9
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/apps/cli/package.json +3 -1
- package/apps/cli/src/commands/common/hashing.ts +34 -0
- package/apps/cli/src/commands/common/ping.ts +11 -0
- package/apps/cli/src/commands/common/random.ts +41 -0
- package/apps/cli/src/commands/i-command.ts +6 -0
- package/apps/cli/src/commands/index.ts +6 -0
- package/apps/cli/src/index.ts +6 -4
- package/apps/cli/tsconfig.json +4 -6
- package/apps/startx-cli/dist/index.mjs +52 -52
- package/configs/eslint-config/src/configs/base.ts +26 -11
- package/package.json +2 -2
- package/packages/@db/drizzle/tsconfig.json +2 -8
- package/packages/@db/sqlite/tsconfig.json +2 -8
- package/packages/@repo/env/package.json +2 -1
- package/packages/@repo/env/src/utils.ts +7 -6
- package/packages/@repo/lib/src/events/i-event.ts +1 -1
- package/packages/aix/eslint.config.ts +4 -0
- package/packages/aix/package.json +53 -0
- package/packages/aix/src/aix.ts +519 -0
- package/packages/aix/src/index.ts +3 -0
- package/packages/aix/src/lib/convertor/schema-convertor.ts +108 -0
- package/packages/aix/src/lib/convertor/variable-resolver.ts +161 -0
- package/packages/aix/src/lib/tokenizer/index.ts +1 -0
- package/packages/aix/src/lib/tokenizer/tokenizer.ts +42 -0
- package/packages/aix/src/providers/ai-chat.ts +25 -0
- package/packages/aix/src/providers/ai-event.ts +21 -0
- package/packages/aix/src/providers/ai-interface.ts +236 -0
- package/packages/aix/src/providers/ai-prompt.ts +14 -0
- package/packages/aix/src/providers/default-models.ts +471 -0
- package/packages/aix/src/providers/index.ts +1 -0
- package/packages/aix/src/providers/openai/openai.ts +139 -0
- package/packages/aix/src/providers/providers.ts +39 -0
- package/packages/aix/src/providers/types.ts +54 -0
- package/packages/aix/src/tools/generic/database.ts +290 -0
- package/packages/aix/src/tools/generic/forecast.ts +216 -0
- package/packages/aix/src/tools/generic/index.ts +4 -0
- package/packages/aix/src/tools/generic/planner.ts +114 -0
- package/packages/aix/src/tools/generic/summarizer.ts +101 -0
- package/packages/aix/src/tools/i-tool.ts +33 -0
- package/packages/aix/src/tools/index.ts +2 -0
- package/packages/aix/src/tools/system/index.ts +297 -0
- package/packages/aix/src/tools/tool-manager.ts +241 -0
- package/packages/aix/src/tools/types.ts +109 -0
- package/packages/aix/tsconfig.json +7 -0
- package/packages/aix/vitest.config.ts +3 -0
- package/pnpm-workspace.yaml +7 -0
- package/turbo.json +0 -1
- package/apps/cli/src/commands/ping.ts +0 -10
|
@@ -54,6 +54,16 @@ export const baseConfig = tseslint.config(
|
|
|
54
54
|
tsconfigRootDir: import.meta.dirname,
|
|
55
55
|
},
|
|
56
56
|
},
|
|
57
|
+
// ADDED: Settings block to correctly resolve TypeScript imports
|
|
58
|
+
settings: {
|
|
59
|
+
"import-x/resolver": {
|
|
60
|
+
typescript: {
|
|
61
|
+
alwaysTryTypes: true,
|
|
62
|
+
project: true,
|
|
63
|
+
},
|
|
64
|
+
node: true,
|
|
65
|
+
},
|
|
66
|
+
},
|
|
57
67
|
rules: {
|
|
58
68
|
// Core Rules
|
|
59
69
|
"no-void": ["error", { allowAsStatement: true }],
|
|
@@ -81,22 +91,27 @@ export const baseConfig = tseslint.config(
|
|
|
81
91
|
// Naming Conventions (Relaxed for APIs and strict for standard code)
|
|
82
92
|
"@typescript-eslint/naming-convention": [
|
|
83
93
|
"warn",
|
|
84
|
-
{ selector: "default", format: ["camelCase"] },
|
|
85
|
-
{ selector: "import", format: ["camelCase", "PascalCase"] },
|
|
94
|
+
{ "selector": "default", "format": ["camelCase"] },
|
|
95
|
+
{ "selector": "import", "format": ["camelCase", "PascalCase"] },
|
|
96
|
+
{
|
|
97
|
+
"selector": "variable",
|
|
98
|
+
"format": ["camelCase", "snake_case", "UPPER_CASE", "PascalCase"],
|
|
99
|
+
"leadingUnderscore": "allow",
|
|
100
|
+
},
|
|
86
101
|
{
|
|
87
|
-
selector: "
|
|
88
|
-
format: ["camelCase"
|
|
89
|
-
leadingUnderscore: "allow",
|
|
102
|
+
"selector": "parameter",
|
|
103
|
+
"format": ["camelCase"],
|
|
104
|
+
"leadingUnderscore": "allow",
|
|
90
105
|
},
|
|
91
106
|
{
|
|
92
|
-
selector: "
|
|
93
|
-
format: ["camelCase"],
|
|
94
|
-
leadingUnderscore: "allow",
|
|
107
|
+
"selector": "classProperty",
|
|
108
|
+
"format": ["camelCase"],
|
|
109
|
+
"leadingUnderscore": "allow",
|
|
95
110
|
},
|
|
96
|
-
{ selector: "typeLike", format: ["PascalCase"] },
|
|
111
|
+
{ "selector": "typeLike", "format": ["PascalCase"] },
|
|
97
112
|
{
|
|
98
|
-
selector: ["objectLiteralProperty", "typeProperty"],
|
|
99
|
-
format: null,
|
|
113
|
+
"selector": ["objectLiteralProperty", "typeProperty"],
|
|
114
|
+
"format": null,
|
|
100
115
|
},
|
|
101
116
|
],
|
|
102
117
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "startx",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.9",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/avinashid/startx.git"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"start": "turbo start",
|
|
27
27
|
"startx": "node ./apps/startx-cli/dist/index.mjs",
|
|
28
28
|
"backend": "turbo dev --filter=core-server -- ",
|
|
29
|
-
"cli": "turbo cli --filter=
|
|
29
|
+
"cli": "turbo cli --filter=cli -- ",
|
|
30
30
|
"lint": "turbo lint",
|
|
31
31
|
"typecheck": "turbo typecheck",
|
|
32
32
|
"clean": "turbo clean",
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "typescript-config/tsconfig.
|
|
2
|
+
"extends": "typescript-config/tsconfig.node.json",
|
|
3
3
|
"compilerOptions": {
|
|
4
|
-
"
|
|
5
|
-
"types": ["node"],
|
|
6
|
-
"baseUrl": "src",
|
|
7
|
-
"tsBuildInfoFile": "dist/typecheck.tsbuildinfo",
|
|
8
|
-
"experimentalDecorators": true,
|
|
9
|
-
"emitDecoratorMetadata": true,
|
|
10
|
-
"allowSyntheticDefaultImports": true
|
|
4
|
+
"baseUrl": "./src"
|
|
11
5
|
},
|
|
12
6
|
"include": ["src/**/*.ts"]
|
|
13
7
|
}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "typescript-config/tsconfig.
|
|
2
|
+
"extends": "typescript-config/tsconfig.node.json",
|
|
3
3
|
"compilerOptions": {
|
|
4
|
-
"
|
|
5
|
-
"types": ["node"],
|
|
6
|
-
"baseUrl": "src",
|
|
7
|
-
"tsBuildInfoFile": "dist/typecheck.tsbuildinfo",
|
|
8
|
-
"experimentalDecorators": true,
|
|
9
|
-
"emitDecoratorMetadata": true,
|
|
10
|
-
"allowSyntheticDefaultImports": true
|
|
4
|
+
"baseUrl": "./src"
|
|
11
5
|
},
|
|
12
6
|
"include": ["src/**/*.ts"]
|
|
13
7
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
process.env.DOTENV_CONFIG_QUIET = "true";
|
|
2
2
|
|
|
3
3
|
import { config } from "dotenv";
|
|
4
|
+
import { expand } from "dotenv-expand";
|
|
4
5
|
import path from "path";
|
|
5
6
|
import { fileURLToPath } from "url";
|
|
6
7
|
|
|
@@ -33,20 +34,20 @@ export function loadDotenv(opts?: { root?: string }) {
|
|
|
33
34
|
const root = opts?.root ?? projectRoot();
|
|
34
35
|
|
|
35
36
|
if (process.env.NODE_ENV === "test") {
|
|
36
|
-
config({ path: path.join(root, ".env.test") });
|
|
37
|
+
expand(config({ path: path.join(root, ".env.test") }));
|
|
37
38
|
// optional: if you want local test overrides
|
|
38
|
-
config({ path: path.join(root, ".env.test.local"), override: true });
|
|
39
|
+
expand(config({ path: path.join(root, ".env.test.local"), override: true }));
|
|
39
40
|
return;
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
// production/dev flow
|
|
43
|
-
config({ path: path.join(process.cwd(), ".env") }); // prod
|
|
44
|
+
expand(config({ path: path.join(process.cwd(), ".env") })); // prod
|
|
44
45
|
// dev env
|
|
45
|
-
config({ path: path.join(root, ".env") });
|
|
46
|
+
expand(config({ path: path.join(root, ".env") }));
|
|
46
47
|
// .env.local should override the base (for dev machine secrets)
|
|
47
|
-
config({ path: path.join(root, ".env.local"), override: true });
|
|
48
|
+
expand(config({ path: path.join(root, ".env.local"), override: true }));
|
|
48
49
|
// also load .env.${NODE_ENV}.local if you want per-env local overrides:
|
|
49
50
|
if (process.env.NODE_ENV) {
|
|
50
|
-
config({ path: path.join(root, `.env.${process.env.NODE_ENV}.local`), override: true });
|
|
51
|
+
expand(config({ path: path.join(root, `.env.${process.env.NODE_ENV}.local`), override: true }));
|
|
51
52
|
}
|
|
52
53
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "aix",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"clean": "rimraf dist .turbo",
|
|
8
|
+
"watch:dev": "pnpm watch",
|
|
9
|
+
"typecheck": "tsc --noEmit",
|
|
10
|
+
"format": "biome format --write .",
|
|
11
|
+
"format:check": "biome ci .",
|
|
12
|
+
"lint": "eslint .",
|
|
13
|
+
"lint:fix": "eslint . --fix",
|
|
14
|
+
"watch": "tsc -p tsconfig.build.json --watch"
|
|
15
|
+
},
|
|
16
|
+
"exports": "./src/index.ts",
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@types/pg": "catalog:",
|
|
19
|
+
"eslint-config": "workspace:*",
|
|
20
|
+
"typescript-config": "workspace:*",
|
|
21
|
+
"vitest-config": "workspace:*"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@repo/env": "workspace:*",
|
|
25
|
+
"@repo/lib": "workspace:*",
|
|
26
|
+
"@repo/logger": "workspace:*",
|
|
27
|
+
"@toon-format/toon": "^2.1.0",
|
|
28
|
+
"js-tiktoken": "catalog:",
|
|
29
|
+
"jsonrepair": "^3.14.0",
|
|
30
|
+
"openai": "catalog:",
|
|
31
|
+
"pg": "catalog:",
|
|
32
|
+
"quickjs-emscripten": "catalog:",
|
|
33
|
+
"quicktype-core": "catalog:"
|
|
34
|
+
},
|
|
35
|
+
"startx": {
|
|
36
|
+
"iTags": [
|
|
37
|
+
"node"
|
|
38
|
+
],
|
|
39
|
+
"gTags": [
|
|
40
|
+
"ai"
|
|
41
|
+
],
|
|
42
|
+
"tags": [
|
|
43
|
+
"aix"
|
|
44
|
+
],
|
|
45
|
+
"requiredDeps": [
|
|
46
|
+
"@repo/env",
|
|
47
|
+
"@repo/lib"
|
|
48
|
+
],
|
|
49
|
+
"requiredDevDeps": [
|
|
50
|
+
"typescript-config"
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
}
|