maiass 5.8.10 → 5.9.5

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 CHANGED
@@ -48,7 +48,7 @@ maiass --dry-run
48
48
  ```bash
49
49
  # Enable AI features
50
50
  maiass config set maiass_token "your_api_key"
51
- maiass config set ai_mode "ask"
51
+ maiass config set ai_mode "ask" (or "always" or "off")
52
52
 
53
53
  # MAIASS will now suggest intelligent commit messages
54
54
  maiass
package/lib/devlog.js CHANGED
@@ -38,9 +38,13 @@ function isDevlogAvailable() {
38
38
  */
39
39
  function extractDevlogContext(gitInfo) {
40
40
  const remote = gitInfo?.remote || {};
41
- const project = remote.repo || process.env.MAIASS_DEVLOG_PROJECT || 'unknown-project';
42
- const client = remote.owner || process.env.MAIASS_DEVLOG_CLIENT || 'unknown-client';
41
+ const project = process.env.MAIASS_DEVLOG_PROJECT || remote.repo || 'unknown-project';
42
+ const client = process.env.MAIASS_DEVLOG_CLIENT || remote.owner || 'unknown-client';
43
+ const subClient = process.env.MAIASS_DEVLOG_SUBCLIENT || client;
43
44
  const jiraTicket = gitInfo?.jiraTicket || process.env.MAIASS_DEVLOG_JIRA_TICKET || 'no-ticket';
45
+
46
+
47
+
44
48
 
45
49
  return { project, client, jiraTicket };
46
50
  }
@@ -60,6 +64,7 @@ export function logThis(message, options = {}) {
60
64
  project = process.env.MAIASS_DEVLOG_PROJECT || 'unknown-project',
61
65
  client = process.env.MAIASS_DEVLOG_CLIENT || 'unknown-client',
62
66
  jiraTicket = process.env.MAIASS_DEVLOG_JIRA_TICKET || 'no-ticket',
67
+ subClient = process.env.MAIASS_DEVLOG_SUBCLIENT || client,
63
68
  type = 'c'
64
69
  } = options;
65
70
 
@@ -78,7 +83,7 @@ export function logThis(message, options = {}) {
78
83
  const escapedMessage = message.replace(/"/g, '\\"').replace(/\n/g, '; ');
79
84
 
80
85
  // Execute devlog.sh with the same parameters as the bash version (async, non-blocking)
81
- const command = `devlog.sh "${escapedMessage}" "?" "${project}" "${client}" "${jiraTicket}"`;
86
+ const command = `devlog.sh "${escapedMessage}" "?" "${project}" "${client}" "${jiraTicket}" "${subClient}"`;
82
87
 
83
88
  logger.debug(`Executing devlog.sh command: ${command}`);
84
89
 
@@ -118,7 +123,8 @@ export function logCommit(commitMessage, gitInfo) {
118
123
  type: 'c', // 'c' for commit
119
124
  project: context.project,
120
125
  client: context.client,
121
- jiraTicket: context.jiraTicket
126
+ jiraTicket: context.jiraTicket,
127
+ subClient: context.subClient
122
128
  };
123
129
 
124
130
  return logThis(cleanMessage, options);
@@ -142,7 +148,8 @@ export function logMerge(sourceBranch, targetBranch, gitInfo, operation = 'Merge
142
148
  type: 'c', // 'c' for commit/merge
143
149
  project: context.project,
144
150
  client: context.client,
145
- jiraTicket: context.jiraTicket
151
+ jiraTicket: context.jiraTicket,
152
+ subClient: context.subClient
146
153
  };
147
154
 
148
155
  return logThis(message, options);
package/maiass.mjs CHANGED
@@ -51,6 +51,7 @@ if (args.includes('--setup') || args.includes('--bootstrap')) {
51
51
 
52
52
  // Check if first argument is a version bump type
53
53
  const versionBumpTypes = ['major', 'minor', 'patch'];
54
+ const validCommands = ['hello', 'env', 'git-info', 'config', 'version', 'account-info', 'maiass', 'help'];
54
55
  let command = 'maiass'; // Default to maiass workflow
55
56
  let versionBump = null;
56
57
 
@@ -59,10 +60,22 @@ if (firstArg && versionBumpTypes.includes(firstArg)) {
59
60
  versionBump = firstArg;
60
61
  command = 'maiass';
61
62
  } else if (firstArg && !firstArg.startsWith('-')) {
62
- // First arg is a command
63
+ // First arg is a command - validate it
64
+ if (!validCommands.includes(firstArg)) {
65
+ console.error(colors.Red(`${SYMBOLS.CROSS} Error: Unknown command '${firstArg}'`));
66
+ console.log('');
67
+ console.log('Valid commands:');
68
+ console.log(' ' + validCommands.join(', '));
69
+ console.log('');
70
+ console.log('Version bump types:');
71
+ console.log(' ' + versionBumpTypes.join(', '));
72
+ console.log('');
73
+ console.log(`Run 'nma --help' for more information.`);
74
+ process.exit(1);
75
+ }
63
76
  command = firstArg;
64
- } else {
65
- // No command specified or starts with flag, default to maiass
77
+ } else if (!firstArg) {
78
+ // No command specified, default to maiass
66
79
  command = 'maiass';
67
80
  }
68
81
 
@@ -85,6 +98,54 @@ if (args.includes('--version') || args.includes('-v')) {
85
98
  process.exit(0);
86
99
  }
87
100
 
101
+ // Handle --account-info flag (before help to allow it to work)
102
+ if (args.includes('--account-info')) {
103
+ command = 'account-info';
104
+ }
105
+
106
+ // Validate flags - check for unrecognized options
107
+ const validFlags = [
108
+ '--help', '-h',
109
+ '--version', '-v',
110
+ '--account-info',
111
+ '--auto', '-a',
112
+ '--commits-only', '-c',
113
+ '--auto-stage',
114
+ '--setup', '--bootstrap',
115
+ '--dry-run', '-d',
116
+ '--force', '-f',
117
+ '--silent', '-s',
118
+ '--json',
119
+ '--tag', '-t'
120
+ ];
121
+
122
+ // Check for unrecognized flags
123
+ for (const arg of args) {
124
+ if (arg.startsWith('-')) {
125
+ // Check if it's a flag with value (e.g., --tag=value or --tag value)
126
+ const flagName = arg.split('=')[0];
127
+ if (!validFlags.includes(flagName) && !validFlags.includes(arg)) {
128
+ console.error(colors.Red(`${SYMBOLS.CROSS} Error: Unrecognized option '${arg}'`));
129
+ console.log('');
130
+ console.log('Valid flags:');
131
+ // Group flags by category for better readability
132
+ const helpFlags = validFlags.filter(f => f.includes('help') || f.includes('version'));
133
+ const commandFlags = validFlags.filter(f => f.includes('account') || f.includes('setup') || f.includes('bootstrap'));
134
+ const workflowFlags = validFlags.filter(f => !helpFlags.includes(f) && !commandFlags.includes(f));
135
+
136
+ console.log(' Help & Info:');
137
+ console.log(' ' + helpFlags.join(', '));
138
+ console.log(' Commands:');
139
+ console.log(' ' + commandFlags.join(', '));
140
+ console.log(' Workflow Options:');
141
+ console.log(' ' + workflowFlags.join(', '));
142
+ console.log('');
143
+ console.log(`Run 'nma --help' for detailed information.`);
144
+ process.exit(1);
145
+ }
146
+ }
147
+ }
148
+
88
149
  // Handle help flag
89
150
  if (args.includes('--help') || args.includes('-h') || command === 'help') {
90
151
  console.log(`\nMAIASS v${version}`);
@@ -102,6 +163,7 @@ if (args.includes('--help') || args.includes('-h') || command === 'help') {
102
163
  console.log(' version Manage version information');
103
164
  console.log(' account-info Show your account status (masked token)');
104
165
  console.log('\nOptions:');
166
+ console.log(' --account-info Show your account status (masked token)');
105
167
  console.log(' --auto Enable all auto-yes functionality (non-interactive mode)');
106
168
  console.log(' --commits-only, -c Generate AI commits without version management');
107
169
  console.log(' --auto-stage Automatically stage all changes');
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "maiass",
3
3
  "type": "module",
4
- "version": "5.8.10",
4
+ "version": "5.9.5",
5
5
  "description": "MAIASS - Modular AI-Augmented Semantic Scribe - Intelligent Git workflow automation",
6
6
  "main": "maiass.mjs",
7
7
  "bin": {