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 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 = execSync(`cat "${changelogPath}"`, { encoding: 'utf8' });
28
+ const content = readFileSync(changelogPath, 'utf8');
28
29
  const match = content.match(/^## (.+)$/m);
29
30
  if (match) {
30
31
  const lastVersion = match[1].trim();
@@ -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()}-${Math.random().toString(36).substr(2, 9)}`;
74
+ sessionId = `maiass-${Date.now()}-${randomBytes(5).toString('hex')}`;
74
75
  debugBuffer = [];
75
76
  }
76
77
 
@@ -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
- // This ensures free credits are allocated on first run
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
- if (aiMode !== 'off') {
45
+ const isCI = process.env.CI === 'true' || process.env.CI === '1';
46
+ if (aiMode !== 'off' && !isCI) {
44
47
  await createAnonymousSubscriptionIfNeeded();
45
48
  }
46
49
 
@@ -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
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "maiass",
3
3
  "type": "module",
4
- "version": "5.9.34",
4
+ "version": "5.9.36",
5
5
  "description": "MAIASS - Modular AI-Augmented Semantic Scribe - Intelligent Git workflow automation",
6
6
  "main": "maiass.mjs",
7
7
  "bin": {