@axiom-lattice/gateway 2.1.27 → 2.1.29
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/.turbo/turbo-build.log +12 -8
- package/CHANGELOG.md +17 -0
- package/dist/chunk-FSASG3SB.mjs +94 -0
- package/dist/chunk-FSASG3SB.mjs.map +1 -0
- package/dist/config-F3FCBSPH.mjs +9 -0
- package/dist/config-F3FCBSPH.mjs.map +1 -0
- package/dist/index.js +879 -131
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +738 -89
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/controllers/database-configs.ts +432 -0
- package/src/controllers/run.ts +6 -0
- package/src/controllers/workspace.ts +598 -0
- package/src/index.ts +2 -10
- package/src/routes/index.ts +6 -0
- package/src/services/agent_service.ts +71 -5
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @axiom-lattice/gateway@2.1.
|
|
2
|
+
> @axiom-lattice/gateway@2.1.29 build /home/runner/work/agentic/agentic/packages/gateway
|
|
3
3
|
> tsup src/index.ts --format cjs,esm --dts --clean --sourcemap
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -9,13 +9,17 @@
|
|
|
9
9
|
[34mCLI[39m Cleaning output folder
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
11
|
[34mESM[39m Build start
|
|
12
|
-
[32mCJS[39m [1mdist/index.js [22m[
|
|
13
|
-
[32mCJS[39m [1mdist/index.js.map [22m[
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in
|
|
15
|
-
[32mESM[39m [1mdist/index.mjs
|
|
16
|
-
[32mESM[39m [1mdist/
|
|
17
|
-
[32mESM[39m
|
|
12
|
+
[32mCJS[39m [1mdist/index.js [22m[32m113.02 KB[39m
|
|
13
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m249.46 KB[39m
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 237ms
|
|
15
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m106.98 KB[39m
|
|
16
|
+
[32mESM[39m [1mdist/config-F3FCBSPH.mjs [22m[32m148.00 B[39m
|
|
17
|
+
[32mESM[39m [1mdist/chunk-FSASG3SB.mjs [22m[32m2.46 KB[39m
|
|
18
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m244.09 KB[39m
|
|
19
|
+
[32mESM[39m [1mdist/config-F3FCBSPH.mjs.map [22m[32m71.00 B[39m
|
|
20
|
+
[32mESM[39m [1mdist/chunk-FSASG3SB.mjs.map [22m[32m5.33 KB[39m
|
|
21
|
+
[32mESM[39m ⚡️ Build success in 240ms
|
|
18
22
|
[34mDTS[39m Build start
|
|
19
|
-
[32mDTS[39m ⚡️ Build success in
|
|
23
|
+
[32mDTS[39m ⚡️ Build success in 9708ms
|
|
20
24
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m3.72 KB[39m
|
|
21
25
|
[32mDTS[39m [1mdist/index.d.mts [22m[32m3.72 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @axiom-lattice/gateway
|
|
2
2
|
|
|
3
|
+
## 2.1.29
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- faf1bad: update team and more
|
|
8
|
+
- Updated dependencies [faf1bad]
|
|
9
|
+
- @axiom-lattice/core@2.1.24
|
|
10
|
+
- @axiom-lattice/protocols@2.1.14
|
|
11
|
+
- @axiom-lattice/queue-redis@1.0.13
|
|
12
|
+
|
|
13
|
+
## 2.1.28
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [8087672]
|
|
18
|
+
- @axiom-lattice/core@2.1.23
|
|
19
|
+
|
|
3
20
|
## 2.1.27
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// src/config.ts
|
|
2
|
+
var ConfigService = class {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.config = this.loadFromEnv();
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Load configuration from environment variables
|
|
8
|
+
*/
|
|
9
|
+
loadFromEnv() {
|
|
10
|
+
return {
|
|
11
|
+
port: process.env.PORT ? Number(process.env.PORT) : void 0,
|
|
12
|
+
queueServiceType: process.env.QUEUE_SERVICE_TYPE,
|
|
13
|
+
redisUrl: process.env.REDIS_URL,
|
|
14
|
+
redisPassword: process.env.REDIS_PASSWORD,
|
|
15
|
+
queueName: process.env.QUEUE_NAME
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Update configuration from JSON object
|
|
20
|
+
* This will update both the internal config and process.env
|
|
21
|
+
*/
|
|
22
|
+
updateConfig(jsonConfig) {
|
|
23
|
+
for (const [key, value] of Object.entries(jsonConfig)) {
|
|
24
|
+
if (value !== null && value !== void 0) {
|
|
25
|
+
if (typeof value === "object" && !Array.isArray(value)) {
|
|
26
|
+
for (const [nestedKey, nestedValue] of Object.entries(value)) {
|
|
27
|
+
const envKey = `${key.toUpperCase()}_${nestedKey.toUpperCase()}`;
|
|
28
|
+
process.env[envKey] = String(nestedValue);
|
|
29
|
+
}
|
|
30
|
+
} else {
|
|
31
|
+
process.env[key.toUpperCase()] = String(value);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
this.config = this.loadFromEnv();
|
|
36
|
+
this.config = this.deepMerge(this.config, jsonConfig);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Deep merge two objects
|
|
40
|
+
*/
|
|
41
|
+
deepMerge(target, source) {
|
|
42
|
+
const output = { ...target };
|
|
43
|
+
if (this.isObject(target) && this.isObject(source)) {
|
|
44
|
+
Object.keys(source).forEach((key) => {
|
|
45
|
+
if (this.isObject(source[key])) {
|
|
46
|
+
if (!(key in target)) {
|
|
47
|
+
Object.assign(output, { [key]: source[key] });
|
|
48
|
+
} else {
|
|
49
|
+
output[key] = this.deepMerge(target[key], source[key]);
|
|
50
|
+
}
|
|
51
|
+
} else {
|
|
52
|
+
Object.assign(output, { [key]: source[key] });
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
return output;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Check if value is a plain object
|
|
60
|
+
*/
|
|
61
|
+
isObject(item) {
|
|
62
|
+
return item && typeof item === "object" && !Array.isArray(item);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Get current configuration
|
|
66
|
+
*/
|
|
67
|
+
getConfig() {
|
|
68
|
+
return { ...this.config };
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
var configService = new ConfigService();
|
|
72
|
+
var config = {
|
|
73
|
+
get port() {
|
|
74
|
+
return configService.getConfig().port;
|
|
75
|
+
},
|
|
76
|
+
get queueServiceType() {
|
|
77
|
+
return configService.getConfig().queueServiceType;
|
|
78
|
+
},
|
|
79
|
+
get redisUrl() {
|
|
80
|
+
return configService.getConfig().redisUrl;
|
|
81
|
+
},
|
|
82
|
+
get redisPassword() {
|
|
83
|
+
return configService.getConfig().redisPassword;
|
|
84
|
+
},
|
|
85
|
+
get queueName() {
|
|
86
|
+
return configService.getConfig().queueName;
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export {
|
|
91
|
+
configService,
|
|
92
|
+
config
|
|
93
|
+
};
|
|
94
|
+
//# sourceMappingURL=chunk-FSASG3SB.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/config.ts"],"sourcesContent":["/**\n * Configuration service\n * Manages environment variables and supports dynamic updates\n */\n\nexport interface GatewayConfig {\n port?: number;\n queueServiceType?: string;\n redisUrl?: string;\n redisPassword?: string;\n queueName?: string;\n [key: string]: any; // Allow additional config keys\n}\n\n/**\n * Get configuration from environment variables\n * Supports dynamic updates via updateConfig method\n */\nclass ConfigService {\n private config: GatewayConfig;\n\n constructor() {\n this.config = this.loadFromEnv();\n }\n\n /**\n * Load configuration from environment variables\n */\n private loadFromEnv(): GatewayConfig {\n return {\n port: process.env.PORT ? Number(process.env.PORT) : undefined,\n queueServiceType: process.env.QUEUE_SERVICE_TYPE,\n redisUrl: process.env.REDIS_URL,\n redisPassword: process.env.REDIS_PASSWORD,\n queueName: process.env.QUEUE_NAME,\n };\n }\n\n /**\n * Update configuration from JSON object\n * This will update both the internal config and process.env\n */\n updateConfig(jsonConfig: Record<string, any>): void {\n // Update process.env for all provided keys\n for (const [key, value] of Object.entries(jsonConfig)) {\n if (value !== null && value !== undefined) {\n // Convert nested objects to environment variable format\n if (typeof value === \"object\" && !Array.isArray(value)) {\n // Handle nested objects like supabase: { url: \"...\", key: \"...\" }\n for (const [nestedKey, nestedValue] of Object.entries(value)) {\n const envKey = `${key.toUpperCase()}_${nestedKey.toUpperCase()}`;\n process.env[envKey] = String(nestedValue);\n }\n } else {\n // Handle flat keys\n process.env[key.toUpperCase()] = String(value);\n }\n }\n }\n\n // Reload config from updated environment variables\n this.config = this.loadFromEnv();\n\n // Deep merge the JSON config into our config object\n this.config = this.deepMerge(this.config, jsonConfig);\n }\n\n /**\n * Deep merge two objects\n */\n private deepMerge(target: any, source: any): any {\n const output = { ...target };\n if (this.isObject(target) && this.isObject(source)) {\n Object.keys(source).forEach((key) => {\n if (this.isObject(source[key])) {\n if (!(key in target)) {\n Object.assign(output, { [key]: source[key] });\n } else {\n output[key] = this.deepMerge(target[key], source[key]);\n }\n } else {\n Object.assign(output, { [key]: source[key] });\n }\n });\n }\n return output;\n }\n\n /**\n * Check if value is a plain object\n */\n private isObject(item: any): boolean {\n return item && typeof item === \"object\" && !Array.isArray(item);\n }\n\n /**\n * Get current configuration\n */\n getConfig(): GatewayConfig {\n return { ...this.config };\n }\n}\n\n// Export singleton instance\nexport const configService = new ConfigService();\n\n// Export config getter for backward compatibility\nexport const config = {\n get port() {\n return configService.getConfig().port;\n },\n get queueServiceType() {\n return configService.getConfig().queueServiceType;\n },\n get redisUrl() {\n return configService.getConfig().redisUrl;\n },\n get redisPassword() {\n return configService.getConfig().redisPassword;\n },\n get queueName() {\n return configService.getConfig().queueName;\n },\n};\n"],"mappings":";AAkBA,IAAM,gBAAN,MAAoB;AAAA,EAGlB,cAAc;AACZ,SAAK,SAAS,KAAK,YAAY;AAAA,EACjC;AAAA;AAAA;AAAA;AAAA,EAKQ,cAA6B;AACnC,WAAO;AAAA,MACL,MAAM,QAAQ,IAAI,OAAO,OAAO,QAAQ,IAAI,IAAI,IAAI;AAAA,MACpD,kBAAkB,QAAQ,IAAI;AAAA,MAC9B,UAAU,QAAQ,IAAI;AAAA,MACtB,eAAe,QAAQ,IAAI;AAAA,MAC3B,WAAW,QAAQ,IAAI;AAAA,IACzB;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,aAAa,YAAuC;AAElD,eAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,UAAU,GAAG;AACrD,UAAI,UAAU,QAAQ,UAAU,QAAW;AAEzC,YAAI,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK,GAAG;AAEtD,qBAAW,CAAC,WAAW,WAAW,KAAK,OAAO,QAAQ,KAAK,GAAG;AAC5D,kBAAM,SAAS,GAAG,IAAI,YAAY,CAAC,IAAI,UAAU,YAAY,CAAC;AAC9D,oBAAQ,IAAI,MAAM,IAAI,OAAO,WAAW;AAAA,UAC1C;AAAA,QACF,OAAO;AAEL,kBAAQ,IAAI,IAAI,YAAY,CAAC,IAAI,OAAO,KAAK;AAAA,QAC/C;AAAA,MACF;AAAA,IACF;AAGA,SAAK,SAAS,KAAK,YAAY;AAG/B,SAAK,SAAS,KAAK,UAAU,KAAK,QAAQ,UAAU;AAAA,EACtD;AAAA;AAAA;AAAA;AAAA,EAKQ,UAAU,QAAa,QAAkB;AAC/C,UAAM,SAAS,EAAE,GAAG,OA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