@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.
- package/README.md +200 -0
- package/bin/binaries/a6s-darwin-amd64 +0 -0
- package/bin/binaries/a6s-darwin-arm64 +0 -0
- package/bin/binaries/a6s-linux-amd64 +0 -0
- package/bin/binaries/a6s-linux-arm64 +0 -0
- package/bin/binaries/a6s-win32-x64.exe +0 -0
- package/dist/commands/ai-learning-demo.d.ts +3 -0
- package/dist/commands/ai-learning-demo.d.ts.map +1 -0
- package/dist/commands/ai-learning-demo.js +176 -0
- package/dist/commands/ai-learning-demo.js.map +1 -0
- package/dist/commands/auth.d.ts +33 -0
- package/dist/commands/auth.d.ts.map +1 -0
- package/dist/commands/auth.js +603 -0
- package/dist/commands/auth.js.map +1 -0
- package/dist/consent/consent.d.ts +74 -0
- package/dist/consent/consent.d.ts.map +1 -0
- package/dist/consent/consent.js +184 -0
- package/dist/consent/consent.js.map +1 -0
- package/dist/consent/disclosure.d.ts +26 -0
- package/dist/consent/disclosure.d.ts.map +1 -0
- package/dist/consent/disclosure.js +170 -0
- package/dist/consent/disclosure.js.map +1 -0
- package/dist/consent/ignore.d.ts +50 -0
- package/dist/consent/ignore.d.ts.map +1 -0
- package/dist/consent/ignore.js +277 -0
- package/dist/consent/ignore.js.map +1 -0
- package/dist/consent/index.d.ts +4 -0
- package/dist/consent/index.d.ts.map +1 -0
- package/dist/consent/index.js +23 -0
- package/dist/consent/index.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +390 -0
- package/dist/index.js.map +1 -0
- package/dist/interactive.d.ts +19 -0
- package/dist/interactive.d.ts.map +1 -0
- package/dist/interactive.js +367 -0
- package/dist/interactive.js.map +1 -0
- package/dist/modules/ab-testing.d.ts +16 -0
- package/dist/modules/ab-testing.d.ts.map +1 -0
- package/dist/modules/ab-testing.js +375 -0
- package/dist/modules/ab-testing.js.map +1 -0
- package/dist/modules/ai-orchestration.d.ts +70 -0
- package/dist/modules/ai-orchestration.d.ts.map +1 -0
- package/dist/modules/ai-orchestration.js +546 -0
- package/dist/modules/ai-orchestration.js.map +1 -0
- package/dist/modules/auth-access-control.d.ts +118 -0
- package/dist/modules/auth-access-control.d.ts.map +1 -0
- package/dist/modules/auth-access-control.js +832 -0
- package/dist/modules/auth-access-control.js.map +1 -0
- package/dist/modules/campaign.d.ts +20 -0
- package/dist/modules/campaign.d.ts.map +1 -0
- package/dist/modules/campaign.js +301 -0
- package/dist/modules/campaign.js.map +1 -0
- package/dist/modules/database.d.ts +14 -0
- package/dist/modules/database.d.ts.map +1 -0
- package/dist/modules/database.js +253 -0
- package/dist/modules/database.js.map +1 -0
- package/dist/modules/deployment.d.ts +17 -0
- package/dist/modules/deployment.d.ts.map +1 -0
- package/dist/modules/deployment.js +201 -0
- package/dist/modules/deployment.js.map +1 -0
- package/dist/modules/edge-computing.d.ts +130 -0
- package/dist/modules/edge-computing.d.ts.map +1 -0
- package/dist/modules/edge-computing.js +672 -0
- package/dist/modules/edge-computing.js.map +1 -0
- package/dist/modules/load-testing.d.ts +21 -0
- package/dist/modules/load-testing.d.ts.map +1 -0
- package/dist/modules/load-testing.js +372 -0
- package/dist/modules/load-testing.js.map +1 -0
- package/dist/modules/monitoring.d.ts +18 -0
- package/dist/modules/monitoring.d.ts.map +1 -0
- package/dist/modules/monitoring.js +375 -0
- package/dist/modules/monitoring.js.map +1 -0
- package/dist/modules/onboarding.d.ts +20 -0
- package/dist/modules/onboarding.d.ts.map +1 -0
- package/dist/modules/onboarding.js +455 -0
- package/dist/modules/onboarding.js.map +1 -0
- package/dist/nlp/memory.d.ts +43 -0
- package/dist/nlp/memory.d.ts.map +1 -0
- package/dist/nlp/memory.js +205 -0
- package/dist/nlp/memory.js.map +1 -0
- package/dist/nlp/processor.d.ts +29 -0
- package/dist/nlp/processor.d.ts.map +1 -0
- package/dist/nlp/processor.js +321 -0
- package/dist/nlp/processor.js.map +1 -0
- package/dist/utils/db-client.d.ts +35 -0
- package/dist/utils/db-client.d.ts.map +1 -0
- package/dist/utils/db-client.js +132 -0
- package/dist/utils/db-client.js.map +1 -0
- package/package.json +97 -0
- package/scripts/chmod-binaries.js +33 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export declare const CONSENT_DIR = ".autonoma";
|
|
2
|
+
export declare const CONSENT_FILE = "consent.json";
|
|
3
|
+
export declare const CONSENT_VERSION = "1.0";
|
|
4
|
+
export interface ConsentScope {
|
|
5
|
+
read_source: boolean;
|
|
6
|
+
read_config: boolean;
|
|
7
|
+
read_docs: boolean;
|
|
8
|
+
write_generated: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface DirectoryConsent {
|
|
11
|
+
version: string;
|
|
12
|
+
directory: string;
|
|
13
|
+
consented: boolean;
|
|
14
|
+
consent_timestamp: string | null;
|
|
15
|
+
consent_version: number;
|
|
16
|
+
scope: ConsentScope;
|
|
17
|
+
exclusions: string[];
|
|
18
|
+
revoked_at: string | null;
|
|
19
|
+
cli_version: string;
|
|
20
|
+
user_agent: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Get default exclusion patterns
|
|
24
|
+
*/
|
|
25
|
+
export declare function getDefaultExclusions(): string[];
|
|
26
|
+
/**
|
|
27
|
+
* ConsentManager handles directory consent operations
|
|
28
|
+
*/
|
|
29
|
+
export declare class ConsentManager {
|
|
30
|
+
private projectRoot;
|
|
31
|
+
private cliVersion;
|
|
32
|
+
constructor(projectRoot: string, cliVersion: string);
|
|
33
|
+
/**
|
|
34
|
+
* Get the path to the consent directory
|
|
35
|
+
*/
|
|
36
|
+
getConsentDir(): string;
|
|
37
|
+
/**
|
|
38
|
+
* Get the path to the consent file
|
|
39
|
+
*/
|
|
40
|
+
getConsentPath(): string;
|
|
41
|
+
/**
|
|
42
|
+
* Check if consent has been granted for the directory
|
|
43
|
+
*/
|
|
44
|
+
hasConsent(): Promise<boolean>;
|
|
45
|
+
/**
|
|
46
|
+
* Load the consent file
|
|
47
|
+
*/
|
|
48
|
+
loadConsent(): Promise<DirectoryConsent>;
|
|
49
|
+
/**
|
|
50
|
+
* Save consent to file
|
|
51
|
+
*/
|
|
52
|
+
saveConsent(consent: DirectoryConsent): Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* Grant consent for the directory
|
|
55
|
+
*/
|
|
56
|
+
grantConsent(): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Revoke consent for the directory
|
|
59
|
+
*/
|
|
60
|
+
revokeConsent(): Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* Update consent scope
|
|
63
|
+
*/
|
|
64
|
+
updateScope(scope: ConsentScope): Promise<void>;
|
|
65
|
+
/**
|
|
66
|
+
* Add an exclusion pattern
|
|
67
|
+
*/
|
|
68
|
+
addExclusion(pattern: string): Promise<void>;
|
|
69
|
+
/**
|
|
70
|
+
* Remove an exclusion pattern
|
|
71
|
+
*/
|
|
72
|
+
removeExclusion(pattern: string): Promise<void>;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=consent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consent.d.ts","sourceRoot":"","sources":["../../src/consent/consent.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,cAAc,CAAC;AACvC,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,eAAe,QAAQ,CAAC;AAErC,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,YAAY,CAAC;IACpB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,EAAE,CAiB/C;AAED;;GAEG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,UAAU,CAAS;gBAEf,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAKnD;;OAEG;IACH,aAAa,IAAI,MAAM;IAIvB;;OAEG;IACH,cAAc,IAAI,MAAM;IAIxB;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC;IASpC;;OAEG;IACG,WAAW,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAK9C;;OAEG;IACG,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAc3D;;OAEG;IACG,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IA0BnC;;OAEG;IACG,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAQpC;;OAEG;IACG,WAAW,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAQrD;;OAEG;IACG,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAUlD;;OAEG;IACG,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAMtD"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.ConsentManager = exports.CONSENT_VERSION = exports.CONSENT_FILE = exports.CONSENT_DIR = void 0;
|
|
37
|
+
exports.getDefaultExclusions = getDefaultExclusions;
|
|
38
|
+
const fs = __importStar(require("fs"));
|
|
39
|
+
const path = __importStar(require("path"));
|
|
40
|
+
const os = __importStar(require("os"));
|
|
41
|
+
exports.CONSENT_DIR = '.autonoma';
|
|
42
|
+
exports.CONSENT_FILE = 'consent.json';
|
|
43
|
+
exports.CONSENT_VERSION = '1.0';
|
|
44
|
+
/**
|
|
45
|
+
* Get default exclusion patterns
|
|
46
|
+
*/
|
|
47
|
+
function getDefaultExclusions() {
|
|
48
|
+
return [
|
|
49
|
+
'.git',
|
|
50
|
+
'node_modules',
|
|
51
|
+
'vendor',
|
|
52
|
+
'.env',
|
|
53
|
+
'.env.*',
|
|
54
|
+
'*.key',
|
|
55
|
+
'*.pem',
|
|
56
|
+
'*.p12',
|
|
57
|
+
'*.pfx',
|
|
58
|
+
'__pycache__',
|
|
59
|
+
'.venv',
|
|
60
|
+
'target',
|
|
61
|
+
'dist',
|
|
62
|
+
'build',
|
|
63
|
+
];
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* ConsentManager handles directory consent operations
|
|
67
|
+
*/
|
|
68
|
+
class ConsentManager {
|
|
69
|
+
projectRoot;
|
|
70
|
+
cliVersion;
|
|
71
|
+
constructor(projectRoot, cliVersion) {
|
|
72
|
+
this.projectRoot = projectRoot;
|
|
73
|
+
this.cliVersion = cliVersion;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Get the path to the consent directory
|
|
77
|
+
*/
|
|
78
|
+
getConsentDir() {
|
|
79
|
+
return path.join(this.projectRoot, exports.CONSENT_DIR);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Get the path to the consent file
|
|
83
|
+
*/
|
|
84
|
+
getConsentPath() {
|
|
85
|
+
return path.join(this.getConsentDir(), exports.CONSENT_FILE);
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Check if consent has been granted for the directory
|
|
89
|
+
*/
|
|
90
|
+
async hasConsent() {
|
|
91
|
+
try {
|
|
92
|
+
const consent = await this.loadConsent();
|
|
93
|
+
return consent.consented && consent.revoked_at === null;
|
|
94
|
+
}
|
|
95
|
+
catch (err) {
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Load the consent file
|
|
101
|
+
*/
|
|
102
|
+
async loadConsent() {
|
|
103
|
+
const data = fs.readFileSync(this.getConsentPath(), 'utf-8');
|
|
104
|
+
return JSON.parse(data);
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Save consent to file
|
|
108
|
+
*/
|
|
109
|
+
async saveConsent(consent) {
|
|
110
|
+
const consentDir = this.getConsentDir();
|
|
111
|
+
if (!fs.existsSync(consentDir)) {
|
|
112
|
+
fs.mkdirSync(consentDir, { recursive: true });
|
|
113
|
+
}
|
|
114
|
+
fs.writeFileSync(this.getConsentPath(), JSON.stringify(consent, null, 2), 'utf-8');
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Grant consent for the directory
|
|
118
|
+
*/
|
|
119
|
+
async grantConsent() {
|
|
120
|
+
const absPath = path.resolve(this.projectRoot);
|
|
121
|
+
const platform = os.platform();
|
|
122
|
+
const arch = os.arch();
|
|
123
|
+
const consent = {
|
|
124
|
+
version: exports.CONSENT_VERSION,
|
|
125
|
+
directory: absPath,
|
|
126
|
+
consented: true,
|
|
127
|
+
consent_timestamp: new Date().toISOString(),
|
|
128
|
+
consent_version: 1,
|
|
129
|
+
scope: {
|
|
130
|
+
read_source: true,
|
|
131
|
+
read_config: true,
|
|
132
|
+
read_docs: true,
|
|
133
|
+
write_generated: true,
|
|
134
|
+
},
|
|
135
|
+
exclusions: getDefaultExclusions(),
|
|
136
|
+
revoked_at: null,
|
|
137
|
+
cli_version: this.cliVersion,
|
|
138
|
+
user_agent: `autonoma-cli/${this.cliVersion} (${platform}; ${arch})`,
|
|
139
|
+
};
|
|
140
|
+
await this.saveConsent(consent);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Revoke consent for the directory
|
|
144
|
+
*/
|
|
145
|
+
async revokeConsent() {
|
|
146
|
+
const consent = await this.loadConsent();
|
|
147
|
+
consent.consented = false;
|
|
148
|
+
consent.revoked_at = new Date().toISOString();
|
|
149
|
+
consent.consent_version++;
|
|
150
|
+
await this.saveConsent(consent);
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Update consent scope
|
|
154
|
+
*/
|
|
155
|
+
async updateScope(scope) {
|
|
156
|
+
const consent = await this.loadConsent();
|
|
157
|
+
consent.scope = scope;
|
|
158
|
+
consent.consent_version++;
|
|
159
|
+
consent.consent_timestamp = new Date().toISOString();
|
|
160
|
+
await this.saveConsent(consent);
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Add an exclusion pattern
|
|
164
|
+
*/
|
|
165
|
+
async addExclusion(pattern) {
|
|
166
|
+
const consent = await this.loadConsent();
|
|
167
|
+
if (!consent.exclusions.includes(pattern)) {
|
|
168
|
+
consent.exclusions.push(pattern);
|
|
169
|
+
consent.consent_version++;
|
|
170
|
+
await this.saveConsent(consent);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Remove an exclusion pattern
|
|
175
|
+
*/
|
|
176
|
+
async removeExclusion(pattern) {
|
|
177
|
+
const consent = await this.loadConsent();
|
|
178
|
+
consent.exclusions = consent.exclusions.filter(e => e !== pattern);
|
|
179
|
+
consent.consent_version++;
|
|
180
|
+
await this.saveConsent(consent);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
exports.ConsentManager = ConsentManager;
|
|
184
|
+
//# sourceMappingURL=consent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consent.js","sourceRoot":"","sources":["../../src/consent/consent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,oDAiBC;AAhDD,uCAAyB;AACzB,2CAA6B;AAC7B,uCAAyB;AAEZ,QAAA,WAAW,GAAG,WAAW,CAAC;AAC1B,QAAA,YAAY,GAAG,cAAc,CAAC;AAC9B,QAAA,eAAe,GAAG,KAAK,CAAC;AAsBrC;;GAEG;AACH,SAAgB,oBAAoB;IAClC,OAAO;QACL,MAAM;QACN,cAAc;QACd,QAA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disclosure to the user
|
|
4
|
+
*/
|
|
5
|
+
export declare function showDisclosure(projectPath: string): void;
|
|
6
|
+
/**
|
|
7
|
+
* Show the current consent status
|
|
8
|
+
*/
|
|
9
|
+
export declare function showConsentStatus(consent: DirectoryConsent): void;
|
|
10
|
+
/**
|
|
11
|
+
* Show confirmation that consent was granted
|
|
12
|
+
*/
|
|
13
|
+
export declare function showConsentGranted(): void;
|
|
14
|
+
/**
|
|
15
|
+
* Show confirmation that consent was revoked
|
|
16
|
+
*/
|
|
17
|
+
export declare function showConsentRevoked(): void;
|
|
18
|
+
/**
|
|
19
|
+
* Show message when consent is denied
|
|
20
|
+
*/
|
|
21
|
+
export declare function showConsentDenied(): void;
|
|
22
|
+
/**
|
|
23
|
+
* Show message when no consent record exists
|
|
24
|
+
*/
|
|
25
|
+
export declare function showNoConsent(): void;
|
|
26
|
+
//# sourceMappingURL=disclosure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disclosure.d.ts","sourceRoot":"","sources":["../../src/consent/disclosure.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C;;GAEG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAgCxD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAsCjE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAKzC;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAKzC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAIxC;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAKpC"}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.showDisclosure = showDisclosure;
|
|
40
|
+
exports.showConsentStatus = showConsentStatus;
|
|
41
|
+
exports.showConsentGranted = showConsentGranted;
|
|
42
|
+
exports.showConsentRevoked = showConsentRevoked;
|
|
43
|
+
exports.showConsentDenied = showConsentDenied;
|
|
44
|
+
exports.showNoConsent = showNoConsent;
|
|
45
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
46
|
+
const path = __importStar(require("path"));
|
|
47
|
+
/**
|
|
48
|
+
* Show the file access disclosure to the user
|
|
49
|
+
*/
|
|
50
|
+
function showDisclosure(projectPath) {
|
|
51
|
+
const absPath = path.resolve(projectPath);
|
|
52
|
+
const border = '─'.repeat(65);
|
|
53
|
+
console.log();
|
|
54
|
+
console.log(chalk_1.default.yellow('WARNING: File Access Disclosure'));
|
|
55
|
+
console.log(chalk_1.default.dim(border));
|
|
56
|
+
console.log();
|
|
57
|
+
console.log('Autonoma Code requires access to files in this directory:');
|
|
58
|
+
console.log();
|
|
59
|
+
console.log(` ${chalk_1.default.bold(absPath)}`);
|
|
60
|
+
console.log();
|
|
61
|
+
console.log('This includes:');
|
|
62
|
+
printBullet('Reading source code files (.ts, .js, .go, .py, etc.)');
|
|
63
|
+
printBullet('Reading configuration files (.json, .yaml, .toml)');
|
|
64
|
+
printBullet('Reading documentation files (.md, .txt)');
|
|
65
|
+
printBullet('Creating/modifying files for code generation');
|
|
66
|
+
console.log();
|
|
67
|
+
console.log('Excluded by default:');
|
|
68
|
+
printBullet('.git/ directory contents');
|
|
69
|
+
printBullet('node_modules/ and vendor directories');
|
|
70
|
+
printBullet('Files matching .autonomaignore patterns');
|
|
71
|
+
printBullet('Binary files and compiled assets');
|
|
72
|
+
printBullet('Sensitive files (.env*, *.key, *.pem)');
|
|
73
|
+
console.log();
|
|
74
|
+
console.log(chalk_1.default.dim('Your code remains confidential and is processed locally.'));
|
|
75
|
+
console.log(chalk_1.default.dim('Privacy policy: https://theautonoma.io/privacy'));
|
|
76
|
+
console.log();
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Show the current consent status
|
|
80
|
+
*/
|
|
81
|
+
function showConsentStatus(consent) {
|
|
82
|
+
const border = '─'.repeat(50);
|
|
83
|
+
console.log();
|
|
84
|
+
console.log(chalk_1.default.cyan('Consent Status'));
|
|
85
|
+
console.log(chalk_1.default.dim(border));
|
|
86
|
+
console.log();
|
|
87
|
+
printKeyValue('Directory', consent.directory);
|
|
88
|
+
printKeyValue('Consented', formatBool(consent.consented));
|
|
89
|
+
printKeyValue('Version', `v${consent.consent_version}`);
|
|
90
|
+
if (consent.consent_timestamp) {
|
|
91
|
+
printKeyValue('Granted At', formatTimestamp(consent.consent_timestamp));
|
|
92
|
+
}
|
|
93
|
+
if (consent.revoked_at) {
|
|
94
|
+
printKeyValue('Revoked At', formatTimestamp(consent.revoked_at));
|
|
95
|
+
}
|
|
96
|
+
printKeyValue('CLI Version', consent.cli_version);
|
|
97
|
+
console.log();
|
|
98
|
+
console.log(chalk_1.default.bold('Scope:'));
|
|
99
|
+
printBulletStatus('Read source code', consent.scope.read_source);
|
|
100
|
+
printBulletStatus('Read configuration', consent.scope.read_config);
|
|
101
|
+
printBulletStatus('Read documentation', consent.scope.read_docs);
|
|
102
|
+
printBulletStatus('Write generated files', consent.scope.write_generated);
|
|
103
|
+
if (consent.exclusions.length > 0) {
|
|
104
|
+
console.log();
|
|
105
|
+
console.log(chalk_1.default.bold('Exclusions:'));
|
|
106
|
+
for (const exc of consent.exclusions) {
|
|
107
|
+
printBullet(exc);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
console.log();
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Show confirmation that consent was granted
|
|
114
|
+
*/
|
|
115
|
+
function showConsentGranted() {
|
|
116
|
+
console.log();
|
|
117
|
+
console.log(chalk_1.default.green('✓') + ' Consent granted. This prompt won\'t appear again for this directory.');
|
|
118
|
+
console.log(chalk_1.default.dim(' Run \'autonoma code --revoke-consent\' to revoke access.'));
|
|
119
|
+
console.log();
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Show confirmation that consent was revoked
|
|
123
|
+
*/
|
|
124
|
+
function showConsentRevoked() {
|
|
125
|
+
console.log();
|
|
126
|
+
console.log(chalk_1.default.yellow('⚠') + ' Consent revoked for this directory.');
|
|
127
|
+
console.log(chalk_1.default.dim(' Run \'autonoma code\' again to re-grant consent.'));
|
|
128
|
+
console.log();
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Show message when consent is denied
|
|
132
|
+
*/
|
|
133
|
+
function showConsentDenied() {
|
|
134
|
+
console.log();
|
|
135
|
+
console.log(chalk_1.default.blue('ℹ') + ' Consent denied. Autonoma Code will not access files in this directory.');
|
|
136
|
+
console.log();
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Show message when no consent record exists
|
|
140
|
+
*/
|
|
141
|
+
function showNoConsent() {
|
|
142
|
+
console.log();
|
|
143
|
+
console.log(chalk_1.default.dim('No consent record found for this directory.'));
|
|
144
|
+
console.log(chalk_1.default.dim('Run \'autonoma code\' to start a session and grant consent.'));
|
|
145
|
+
console.log();
|
|
146
|
+
}
|
|
147
|
+
// Helper functions
|
|
148
|
+
function printBullet(text) {
|
|
149
|
+
console.log(` ${chalk_1.default.dim('•')} ${text}`);
|
|
150
|
+
}
|
|
151
|
+
function printBulletStatus(text, enabled) {
|
|
152
|
+
const status = enabled ? chalk_1.default.green('enabled') : chalk_1.default.dim('disabled');
|
|
153
|
+
console.log(` ${chalk_1.default.dim('•')} ${text}: ${status}`);
|
|
154
|
+
}
|
|
155
|
+
function printKeyValue(key, value) {
|
|
156
|
+
console.log(` ${chalk_1.default.bold(key)}: ${value}`);
|
|
157
|
+
}
|
|
158
|
+
function formatBool(b) {
|
|
159
|
+
return b ? chalk_1.default.green('Yes') : chalk_1.default.yellow('No');
|
|
160
|
+
}
|
|
161
|
+
function formatTimestamp(ts) {
|
|
162
|
+
try {
|
|
163
|
+
const date = new Date(ts);
|
|
164
|
+
return date.toISOString().replace('T', ' ').replace('Z', ' UTC');
|
|
165
|
+
}
|
|
166
|
+
catch {
|
|
167
|
+
return ts;
|
|
168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CAAC,GAAG,CAAC,KAAK,eAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC;AAChD,CAAC;AAED,SAAS,UAAU,CAAC,CAAU;IAC5B,OAAO,CAAC,CAAC,CAAC,CAAC,eAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,eAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACrD,CAAC;AAED,SAAS,eAAe,CAAC,EAAU;IACjC,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACnE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export declare const IGNORE_FILE_NAME = ".autonomaignore";
|
|
2
|
+
/**
|
|
3
|
+
* IgnoreManager handles .autonomaignore file operations
|
|
4
|
+
*/
|
|
5
|
+
export declare class IgnoreManager {
|
|
6
|
+
private projectRoot;
|
|
7
|
+
private patterns;
|
|
8
|
+
constructor(projectRoot: string);
|
|
9
|
+
/**
|
|
10
|
+
* Get the path to the ignore file
|
|
11
|
+
*/
|
|
12
|
+
getIgnorePath(): string;
|
|
13
|
+
/**
|
|
14
|
+
* Load patterns from the ignore file
|
|
15
|
+
*/
|
|
16
|
+
private loadPatterns;
|
|
17
|
+
/**
|
|
18
|
+
* Check if a file path should be ignored
|
|
19
|
+
*/
|
|
20
|
+
shouldIgnore(filePath: string): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Get all loaded patterns
|
|
23
|
+
*/
|
|
24
|
+
getPatterns(): string[];
|
|
25
|
+
/**
|
|
26
|
+
* Check if the ignore file exists
|
|
27
|
+
*/
|
|
28
|
+
exists(): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Match a path against a pattern
|
|
31
|
+
*/
|
|
32
|
+
private matchPattern;
|
|
33
|
+
/**
|
|
34
|
+
* Handle ** glob patterns
|
|
35
|
+
*/
|
|
36
|
+
private matchDoubleGlob;
|
|
37
|
+
/**
|
|
38
|
+
* Simple glob matching (supports * and ?)
|
|
39
|
+
*/
|
|
40
|
+
private simpleMatch;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Get default .autonomaignore content
|
|
44
|
+
*/
|
|
45
|
+
export declare function getDefaultIgnoreContent(): string;
|
|
46
|
+
/**
|
|
47
|
+
* Create a default .autonomaignore file
|
|
48
|
+
*/
|
|
49
|
+
export declare function createDefaultIgnoreFile(projectRoot: string): void;
|
|
50
|
+
//# sourceMappingURL=ignore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ignore.d.ts","sourceRoot":"","sources":["../../src/consent/ignore.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,oBAAoB,CAAC;AAElD;;GAEG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,QAAQ,CAAgB;gBAEpB,WAAW,EAAE,MAAM;IAK/B;;OAEG;IACH,aAAa,IAAI,MAAM;IAIvB;;OAEG;IACH,OAAO,CAAC,YAAY;IA0BpB;;OAEG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAavC;;OAEG;IACH,WAAW,IAAI,MAAM,EAAE;IAIvB;;OAEG;IACH,MAAM,IAAI,OAAO;IAIjB;;OAEG;IACH,OAAO,CAAC,YAAY;IAuCpB;;OAEG;IACH,OAAO,CAAC,eAAe;IAoCvB;;OAEG;IACH,OAAO,CAAC,WAAW;CAcpB;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAoEhD;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CASjE"}
|