maiass 5.9.34 → 5.9.36
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/lib/changelog.js +2 -1
- package/lib/config-manager.js +2 -1
- package/lib/logger.js +2 -1
- package/lib/maiass-command.js +6 -3
- package/lib/token-validator.js +2 -2
- package/package.json +1 -1
package/lib/changelog.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Changelog management for MAIASS - matches bashmaiass implementation
|
|
2
2
|
import { execSync } from 'child_process';
|
|
3
3
|
import fs from 'fs/promises';
|
|
4
|
+
import { readFileSync } from 'fs';
|
|
4
5
|
import { log } from './logger.js';
|
|
5
6
|
import { SYMBOLS } from './symbols.js';
|
|
6
7
|
|
|
@@ -24,7 +25,7 @@ function executeGitCommand(command) {
|
|
|
24
25
|
*/
|
|
25
26
|
function getLastChangelogCommit(changelogPath) {
|
|
26
27
|
try {
|
|
27
|
-
const content =
|
|
28
|
+
const content = readFileSync(changelogPath, 'utf8');
|
|
28
29
|
const match = content.match(/^## (.+)$/m);
|
|
29
30
|
if (match) {
|
|
30
31
|
const lastVersion = match[1].trim();
|
package/lib/config-manager.js
CHANGED
|
@@ -131,7 +131,8 @@ export function writeConfig(configPath, config, options = {}) {
|
|
|
131
131
|
lines.push(`# ${varDef.description}`);
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
// Quote values that contain spaces or special characters
|
|
134
|
+
// Quote values that contain spaces or special characters.
|
|
135
|
+
// Written to a file only — not passed to a shell. codeql[js/incomplete-sanitization]
|
|
135
136
|
const needsQuotes = /[\s#"'\\]/.test(value);
|
|
136
137
|
const quotedValue = needsQuotes ? `"${value.replace(/"/g, '\\"')}"` : value;
|
|
137
138
|
|
package/lib/logger.js
CHANGED
|
@@ -4,6 +4,7 @@ import chalk from 'chalk';
|
|
|
4
4
|
import fs from 'fs';
|
|
5
5
|
import path from 'path';
|
|
6
6
|
import os from 'os';
|
|
7
|
+
import { randomBytes } from 'crypto';
|
|
7
8
|
|
|
8
9
|
// Store environment variables
|
|
9
10
|
let env = {};
|
|
@@ -70,7 +71,7 @@ function writeToLogFile(message) {
|
|
|
70
71
|
* Initialize debug collection session
|
|
71
72
|
*/
|
|
72
73
|
function initDebugSession() {
|
|
73
|
-
sessionId = `maiass-${Date.now()}-${
|
|
74
|
+
sessionId = `maiass-${Date.now()}-${randomBytes(5).toString('hex')}`;
|
|
74
75
|
debugBuffer = [];
|
|
75
76
|
}
|
|
76
77
|
|
package/lib/maiass-command.js
CHANGED
|
@@ -37,10 +37,13 @@ export async function handleMaiassCommand(args) {
|
|
|
37
37
|
logger.header('', 'MAIASS - Modular AI-Assisted Semantic Scribe');
|
|
38
38
|
|
|
39
39
|
try {
|
|
40
|
-
// Create anonymous subscription if needed (matches bashmaiass behavior)
|
|
41
|
-
//
|
|
40
|
+
// Create anonymous subscription if needed (matches bashmaiass behavior).
|
|
41
|
+
// Skip in CI environments (GitHub Actions / any env with CI=true) — each runner
|
|
42
|
+
// has a different virtual MAC/disk, so every run would generate a new machine
|
|
43
|
+
// fingerprint and burn an anonymous subscription slot.
|
|
42
44
|
const aiMode = process.env.MAIASS_AI_MODE || 'ask';
|
|
43
|
-
|
|
45
|
+
const isCI = process.env.CI === 'true' || process.env.CI === '1';
|
|
46
|
+
if (aiMode !== 'off' && !isCI) {
|
|
44
47
|
await createAnonymousSubscriptionIfNeeded();
|
|
45
48
|
}
|
|
46
49
|
|
package/lib/token-validator.js
CHANGED
|
@@ -149,7 +149,7 @@ export function displayTokenValidation() {
|
|
|
149
149
|
const validation = tokenValue ? validateTokenValue(tokenValue, tokenConfig) : null;
|
|
150
150
|
const display = getValidationDisplay(validation);
|
|
151
151
|
|
|
152
|
-
console.log(`[DEBUG] ${display.symbol} ${tokenConfig.description} (${tokenConfig.name}): ${display.color(display.status)}`);
|
|
152
|
+
console.log(`[DEBUG] ${display.symbol} ${tokenConfig.description} (${tokenConfig.name}): ${display.color(display.status)}`); // codeql[js/clear-text-logging]
|
|
153
153
|
|
|
154
154
|
if (validation && validation.valid) {
|
|
155
155
|
// Confirm token is present without logging any part of its value
|
|
@@ -165,7 +165,7 @@ export function displayTokenValidation() {
|
|
|
165
165
|
const validation = tokenValue ? validateTokenValue(tokenValue, tokenConfig) : null;
|
|
166
166
|
const display = getValidationDisplay(validation);
|
|
167
167
|
|
|
168
|
-
console.log(`[DEBUG] ${display.symbol} ${tokenConfig.description} (${tokenConfig.name}): ${display.color(display.status)}`);
|
|
168
|
+
console.log(`[DEBUG] ${display.symbol} ${tokenConfig.description} (${tokenConfig.name}): ${display.color(display.status)}`); // codeql[js/clear-text-logging]
|
|
169
169
|
|
|
170
170
|
if (validation && validation.valid) {
|
|
171
171
|
// Confirm token is present without logging any part of its value
|