fraim-framework 2.0.97 → 2.0.98

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.
@@ -18,6 +18,22 @@ class UsageCollector {
18
18
  this.events = [];
19
19
  this.apiKeyId = null;
20
20
  }
21
+ static resolveMentoringJobName(args) {
22
+ if (!args || typeof args !== 'object') {
23
+ return 'unknown';
24
+ }
25
+ if (typeof args.jobName === 'string' && args.jobName.trim().length > 0) {
26
+ return args.jobName.trim();
27
+ }
28
+ // Backward compatibility for older callers and docs that still use workflowType.
29
+ if (typeof args.workflowType === 'string' && args.workflowType.trim().length > 0) {
30
+ return args.workflowType.trim();
31
+ }
32
+ if (typeof args.job === 'string' && args.job.trim().length > 0) {
33
+ return args.job.trim();
34
+ }
35
+ return 'unknown';
36
+ }
21
37
  /**
22
38
  * Set the API key ID for this session
23
39
  */
@@ -81,8 +97,9 @@ class UsageCollector {
81
97
  analyticsArgs.currentPhase = args.currentPhase;
82
98
  if (args.status)
83
99
  analyticsArgs.status = args.status;
84
- if (args.jobName)
85
- analyticsArgs.jobName = args.jobName;
100
+ const mentoringJobName = UsageCollector.resolveMentoringJobName(args);
101
+ if (mentoringJobName !== 'unknown')
102
+ analyticsArgs.jobName = mentoringJobName;
86
103
  if (args.issueNumber)
87
104
  analyticsArgs.issueNumber = args.issueNumber;
88
105
  break;
@@ -128,7 +145,7 @@ class UsageCollector {
128
145
  }
129
146
  return null;
130
147
  case 'seekMentoring':
131
- return { type: 'mentoring', name: args.jobName || 'unknown' };
148
+ return { type: 'mentoring', name: UsageCollector.resolveMentoringJobName(args) };
132
149
  case 'list_fraim_jobs':
133
150
  return { type: 'job', name: 'list' };
134
151
  case 'fraim_connect':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fraim-framework",
3
- "version": "2.0.97",
3
+ "version": "2.0.98",
4
4
  "description": "FRAIM v2: Framework for Rigor-based AI Management - Transform from solo developer to AI manager orchestrating production-ready code with enterprise-grade discipline",
5
5
  "main": "index.js",
6
6
  "bin": {