@autonoma-io/a6s 5.1.2

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 (92) hide show
  1. package/README.md +200 -0
  2. package/bin/binaries/a6s-darwin-amd64 +0 -0
  3. package/bin/binaries/a6s-darwin-arm64 +0 -0
  4. package/bin/binaries/a6s-linux-amd64 +0 -0
  5. package/bin/binaries/a6s-linux-arm64 +0 -0
  6. package/bin/binaries/a6s-win32-x64.exe +0 -0
  7. package/dist/commands/ai-learning-demo.d.ts +3 -0
  8. package/dist/commands/ai-learning-demo.d.ts.map +1 -0
  9. package/dist/commands/ai-learning-demo.js +176 -0
  10. package/dist/commands/ai-learning-demo.js.map +1 -0
  11. package/dist/commands/auth.d.ts +33 -0
  12. package/dist/commands/auth.d.ts.map +1 -0
  13. package/dist/commands/auth.js +603 -0
  14. package/dist/commands/auth.js.map +1 -0
  15. package/dist/consent/consent.d.ts +74 -0
  16. package/dist/consent/consent.d.ts.map +1 -0
  17. package/dist/consent/consent.js +184 -0
  18. package/dist/consent/consent.js.map +1 -0
  19. package/dist/consent/disclosure.d.ts +26 -0
  20. package/dist/consent/disclosure.d.ts.map +1 -0
  21. package/dist/consent/disclosure.js +170 -0
  22. package/dist/consent/disclosure.js.map +1 -0
  23. package/dist/consent/ignore.d.ts +50 -0
  24. package/dist/consent/ignore.d.ts.map +1 -0
  25. package/dist/consent/ignore.js +277 -0
  26. package/dist/consent/ignore.js.map +1 -0
  27. package/dist/consent/index.d.ts +4 -0
  28. package/dist/consent/index.d.ts.map +1 -0
  29. package/dist/consent/index.js +23 -0
  30. package/dist/consent/index.js.map +1 -0
  31. package/dist/index.d.ts +3 -0
  32. package/dist/index.d.ts.map +1 -0
  33. package/dist/index.js +390 -0
  34. package/dist/index.js.map +1 -0
  35. package/dist/interactive.d.ts +19 -0
  36. package/dist/interactive.d.ts.map +1 -0
  37. package/dist/interactive.js +367 -0
  38. package/dist/interactive.js.map +1 -0
  39. package/dist/modules/ab-testing.d.ts +16 -0
  40. package/dist/modules/ab-testing.d.ts.map +1 -0
  41. package/dist/modules/ab-testing.js +375 -0
  42. package/dist/modules/ab-testing.js.map +1 -0
  43. package/dist/modules/ai-orchestration.d.ts +70 -0
  44. package/dist/modules/ai-orchestration.d.ts.map +1 -0
  45. package/dist/modules/ai-orchestration.js +546 -0
  46. package/dist/modules/ai-orchestration.js.map +1 -0
  47. package/dist/modules/auth-access-control.d.ts +118 -0
  48. package/dist/modules/auth-access-control.d.ts.map +1 -0
  49. package/dist/modules/auth-access-control.js +832 -0
  50. package/dist/modules/auth-access-control.js.map +1 -0
  51. package/dist/modules/campaign.d.ts +20 -0
  52. package/dist/modules/campaign.d.ts.map +1 -0
  53. package/dist/modules/campaign.js +301 -0
  54. package/dist/modules/campaign.js.map +1 -0
  55. package/dist/modules/database.d.ts +14 -0
  56. package/dist/modules/database.d.ts.map +1 -0
  57. package/dist/modules/database.js +253 -0
  58. package/dist/modules/database.js.map +1 -0
  59. package/dist/modules/deployment.d.ts +17 -0
  60. package/dist/modules/deployment.d.ts.map +1 -0
  61. package/dist/modules/deployment.js +201 -0
  62. package/dist/modules/deployment.js.map +1 -0
  63. package/dist/modules/edge-computing.d.ts +130 -0
  64. package/dist/modules/edge-computing.d.ts.map +1 -0
  65. package/dist/modules/edge-computing.js +672 -0
  66. package/dist/modules/edge-computing.js.map +1 -0
  67. package/dist/modules/load-testing.d.ts +21 -0
  68. package/dist/modules/load-testing.d.ts.map +1 -0
  69. package/dist/modules/load-testing.js +372 -0
  70. package/dist/modules/load-testing.js.map +1 -0
  71. package/dist/modules/monitoring.d.ts +18 -0
  72. package/dist/modules/monitoring.d.ts.map +1 -0
  73. package/dist/modules/monitoring.js +375 -0
  74. package/dist/modules/monitoring.js.map +1 -0
  75. package/dist/modules/onboarding.d.ts +20 -0
  76. package/dist/modules/onboarding.d.ts.map +1 -0
  77. package/dist/modules/onboarding.js +455 -0
  78. package/dist/modules/onboarding.js.map +1 -0
  79. package/dist/nlp/memory.d.ts +43 -0
  80. package/dist/nlp/memory.d.ts.map +1 -0
  81. package/dist/nlp/memory.js +205 -0
  82. package/dist/nlp/memory.js.map +1 -0
  83. package/dist/nlp/processor.d.ts +29 -0
  84. package/dist/nlp/processor.d.ts.map +1 -0
  85. package/dist/nlp/processor.js +321 -0
  86. package/dist/nlp/processor.js.map +1 -0
  87. package/dist/utils/db-client.d.ts +35 -0
  88. package/dist/utils/db-client.d.ts.map +1 -0
  89. package/dist/utils/db-client.js +132 -0
  90. package/dist/utils/db-client.js.map +1 -0
  91. package/package.json +97 -0
  92. package/scripts/chmod-binaries.js +33 -0
@@ -0,0 +1,132 @@
1
+ "use strict";
2
+ /**
3
+ * Database Client Utility
4
+ *
5
+ * Provides secure PostgreSQL client with proper AWS RDS certificate validation.
6
+ * Uses AWS RDS global CA bundle instead of disabling SSL verification.
7
+ *
8
+ * Security: This replaces the insecure NODE_TLS_REJECT_UNAUTHORIZED=0 approach
9
+ * Reference: AWS RDS Certificate Authority documentation
10
+ */
11
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ var desc = Object.getOwnPropertyDescriptor(m, k);
14
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
15
+ desc = { enumerable: true, get: function() { return m[k]; } };
16
+ }
17
+ Object.defineProperty(o, k2, desc);
18
+ }) : (function(o, m, k, k2) {
19
+ if (k2 === undefined) k2 = k;
20
+ o[k2] = m[k];
21
+ }));
22
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
23
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
24
+ }) : function(o, v) {
25
+ o["default"] = v;
26
+ });
27
+ var __importStar = (this && this.__importStar) || (function () {
28
+ var ownKeys = function(o) {
29
+ ownKeys = Object.getOwnPropertyNames || function (o) {
30
+ var ar = [];
31
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
32
+ return ar;
33
+ };
34
+ return ownKeys(o);
35
+ };
36
+ return function (mod) {
37
+ if (mod && mod.__esModule) return mod;
38
+ var result = {};
39
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
40
+ __setModuleDefault(result, mod);
41
+ return result;
42
+ };
43
+ })();
44
+ Object.defineProperty(exports, "__esModule", { value: true });
45
+ exports.DEFAULT_CONNECTION_STRING = void 0;
46
+ exports.getSSLConfig = getSSLConfig;
47
+ exports.createDbClient = createDbClient;
48
+ exports.createConnectedDbClient = createConnectedDbClient;
49
+ const pg_1 = require("pg");
50
+ const fs = __importStar(require("fs"));
51
+ const path = __importStar(require("path"));
52
+ // CA bundle paths to check (in order of preference)
53
+ const CA_BUNDLE_PATHS = [
54
+ path.join(__dirname, '../../certs/rds-global-bundle.pem'),
55
+ path.join(__dirname, '../../../certs/rds-global-bundle.pem'),
56
+ '/app/certs/rds-global-bundle.pem',
57
+ '/etc/ssl/certs/rds-global-bundle.pem'
58
+ ];
59
+ // Cache the certificate to avoid repeated file reads
60
+ let rdsCaCertificate = null;
61
+ let certificateLoaded = false;
62
+ /**
63
+ * Load the RDS CA certificate bundle
64
+ * Tries multiple paths and caches the result
65
+ */
66
+ function loadCaCertificate() {
67
+ if (certificateLoaded) {
68
+ return rdsCaCertificate;
69
+ }
70
+ for (const certPath of CA_BUNDLE_PATHS) {
71
+ try {
72
+ if (fs.existsSync(certPath)) {
73
+ rdsCaCertificate = fs.readFileSync(certPath, 'utf-8');
74
+ console.log(`[db-client] Loaded RDS CA bundle from: ${certPath}`);
75
+ certificateLoaded = true;
76
+ return rdsCaCertificate;
77
+ }
78
+ }
79
+ catch (error) {
80
+ // Continue to next path
81
+ }
82
+ }
83
+ console.warn('[db-client] Could not load RDS CA bundle from any path, falling back to insecure mode');
84
+ certificateLoaded = true;
85
+ return null;
86
+ }
87
+ /**
88
+ * Get SSL configuration for PostgreSQL client
89
+ * Uses CA bundle if available, falls back to insecure mode with warning
90
+ */
91
+ function getSSLConfig() {
92
+ const caCert = loadCaCertificate();
93
+ if (caCert) {
94
+ return {
95
+ rejectUnauthorized: true,
96
+ ca: caCert
97
+ };
98
+ }
99
+ // Fallback to insecure mode (only for development/testing)
100
+ return {
101
+ rejectUnauthorized: false
102
+ };
103
+ }
104
+ /**
105
+ * Default database connection string
106
+ * Uses environment variable or falls back to default
107
+ */
108
+ exports.DEFAULT_CONNECTION_STRING = process.env.DATABASE_URL || '';
109
+ /**
110
+ * Create a new PostgreSQL client with secure SSL configuration
111
+ *
112
+ * @param connectionString - Optional connection string (defaults to DATABASE_URL)
113
+ * @returns Configured pg Client instance
114
+ */
115
+ function createDbClient(connectionString) {
116
+ return new pg_1.Client({
117
+ connectionString: connectionString || exports.DEFAULT_CONNECTION_STRING,
118
+ ssl: getSSLConfig()
119
+ });
120
+ }
121
+ /**
122
+ * Create a new PostgreSQL client and connect it
123
+ *
124
+ * @param connectionString - Optional connection string (defaults to DATABASE_URL)
125
+ * @returns Promise resolving to connected pg Client instance
126
+ */
127
+ async function createConnectedDbClient(connectionString) {
128
+ const client = createDbClient(connectionString);
129
+ await client.connect();
130
+ return client;
131
+ }
132
+ //# sourceMappingURL=db-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"db-client.js","sourceRoot":"","sources":["../../src/utils/db-client.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDH,oCAcC;AAcD,wCAKC;AAQD,0DAIC;AA5FD,2BAA0C;AAC1C,uCAAyB;AACzB,2CAA6B;AAE7B,oDAAoD;AACpD,MAAM,eAAe,GAAG;IACtB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,mCAAmC,CAAC;IACzD,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,sCAAsC,CAAC;IAC5D,kCAAkC;IAClC,sCAAsC;CACvC,CAAC;AAEF,qDAAqD;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AE;KACpB,CAAC,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,uBAAuB,CAAC,gBAAyB;IACrE,MAAM,MAAM,GAAG,cAAc,CAAC,gBAAgB,CAAC,CAAC;IAChD,MAAM,MAAM,CAAC,OAAO,EAAE,CAAC;IACvB,OAAO,MAAM,CAAC;AAChB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,97 @@
1
+ {
2
+ "name": "@autonoma-io/a6s",
3
+ "version": "5.1.2",
4
+ "description": "A6s — Autonoma's AI development CLI with Natural Language Processing, 28 specialized agents, and a bundled Go daemon serving IDE extensions",
5
+ "main": "dist/index.js",
6
+ "bin": {
7
+ "a6s": "./dist/index.js"
8
+ },
9
+ "files": [
10
+ "dist/",
11
+ "bin/binaries/",
12
+ "scripts/chmod-binaries.js",
13
+ "README.md"
14
+ ],
15
+ "engines": {
16
+ "node": ">=18"
17
+ },
18
+ "os": [
19
+ "darwin",
20
+ "linux",
21
+ "win32"
22
+ ],
23
+ "cpu": [
24
+ "x64",
25
+ "arm64"
26
+ ],
27
+ "publishConfig": {
28
+ "access": "public"
29
+ },
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/The-Autonoma/a6s.git"
33
+ },
34
+ "homepage": "https://www.theautonoma.io",
35
+ "license": "UNLICENSED",
36
+ "scripts": {
37
+ "build": "tsc",
38
+ "build:go": "bash scripts/build-go-binaries.sh",
39
+ "build:all": "npm run build && npm run build:go",
40
+ "dev": "tsx src/index.ts",
41
+ "test": "jest",
42
+ "lint": "eslint src/**/*.ts",
43
+ "package": "pkg . --targets node18-macos-x64,node18-linux-x64 --output bin/a6s",
44
+ "prepublishOnly": "npm run build:all && node scripts/prepublish-secret-scan.js",
45
+ "postinstall": "node scripts/chmod-binaries.js"
46
+ },
47
+ "dependencies": {
48
+ "@aws-sdk/client-rds": "^3.600.0",
49
+ "commander": "^12.0.0",
50
+ "compromise": "^14.12.0",
51
+ "dotenv": "^16.4.5",
52
+ "natural": "^6.10.0",
53
+ "node-schedule": "^2.1.1"
54
+ },
55
+ "devDependencies": {
56
+ "@aws-sdk/client-backup": "^3.876.0",
57
+ "@aws-sdk/client-bedrock": "^3.876.0",
58
+ "@aws-sdk/client-cloudwatch": "^3.876.0",
59
+ "@aws-sdk/client-cloudwatch-logs": "^3.876.0",
60
+ "@aws-sdk/client-cognito-identity-provider": "^3.972.0",
61
+ "@aws-sdk/client-ecr": "^3.876.0",
62
+ "@aws-sdk/client-ecs": "^3.876.0",
63
+ "@aws-sdk/client-guardduty": "^3.876.0",
64
+ "@aws-sdk/client-iam": "^3.876.0",
65
+ "@aws-sdk/client-lambda": "^3.876.0",
66
+ "@aws-sdk/client-quicksight": "^3.876.0",
67
+ "@aws-sdk/client-route-53": "^3.876.0",
68
+ "@aws-sdk/client-secrets-manager": "^3.972.0",
69
+ "@aws-sdk/client-ssm": "^3.972.0",
70
+ "@jest/globals": "^30.1.1",
71
+ "@sendgrid/mail": "^8.1.5",
72
+ "@types/inquirer": "^9.0.7",
73
+ "@types/jest": "^29.5.14",
74
+ "@types/node": "^20.11.24",
75
+ "@types/node-schedule": "^2.1.6",
76
+ "@types/nodemailer": "^7.0.5",
77
+ "@types/pg": "^8.11.2",
78
+ "@types/prompts": "^2.4.9",
79
+ "@types/qrcode": "^1.5.6",
80
+ "@types/speakeasy": "^2.0.10",
81
+ "chalk": "^5.6.0",
82
+ "eslint": "^8.57.0",
83
+ "inquirer": "^12.9.4",
84
+ "jest": "^29.7.0",
85
+ "nodemailer": "^7.0.12",
86
+ "ora": "^8.2.0",
87
+ "pg": "^8.16.3",
88
+ "pkg": "^5.8.1",
89
+ "prompts": "^2.4.2",
90
+ "qrcode": "^1.5.4",
91
+ "speakeasy": "^2.0.0",
92
+ "table": "^6.9.0",
93
+ "ts-jest": "^29.4.1",
94
+ "tsx": "^4.7.1",
95
+ "typescript": "^5.3.3"
96
+ }
97
+ }
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/env node
2
+ // postinstall: ensure the platform-specific Go binary is executable.
3
+ // npm tarballs lose the +x bit on POSIX systems; this restores it on
4
+ // the user's machine. Skip on Windows -- .exe files don't need chmod.
5
+
6
+ const fs = require('fs');
7
+ const path = require('path');
8
+
9
+ if (process.platform === 'win32') {
10
+ // No-op on Windows; .exe is executable by extension.
11
+ process.exit(0);
12
+ }
13
+
14
+ const binDir = path.join(__dirname, '..', 'bin', 'binaries');
15
+ const targetName = `a6s-${process.platform}-${process.arch}`;
16
+ const targetPath = path.join(binDir, targetName);
17
+
18
+ if (!fs.existsSync(targetPath)) {
19
+ console.warn(
20
+ `[a6s] No prebuilt binary for ${process.platform}-${process.arch}. ` +
21
+ `The CLI will still work for non-daemon commands, but \`a6s code --daemon\` will not start. ` +
22
+ `Please file an issue or build from source.`,
23
+ );
24
+ process.exit(0);
25
+ }
26
+
27
+ try {
28
+ fs.chmodSync(targetPath, 0o755);
29
+ } catch (err) {
30
+ // Non-fatal: Linux without execute permissions is rare; the user will
31
+ // see a clearer error if they actually try to run the daemon.
32
+ console.warn(`[a6s] Could not chmod ${targetPath}: ${err.message}`);
33
+ }