@bike4mind/cli 0.2.8-fix-cli-type-error.17148 → 0.2.10-cj-jira-bulk-transition-edit-issue.17245

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
@@ -10,6 +10,7 @@ Interactive command-line interface for Bike4Mind with ReAct agents.
10
10
  - 🛠️ B4M tools + MCP integration
11
11
  - 🎨 Rich terminal UI with Ink
12
12
  - 🐛 Debug logging with `--verbose` flag
13
+ - 📄 Context file loading (CLAUDE.md, AGENTS.md, AI.md)
13
14
 
14
15
  ## Installation
15
16
 
@@ -160,6 +161,7 @@ export SERPER_API_KEY="your-key-here"
160
161
  - ✅ `math_evaluate` - No API key needed
161
162
  - ✅ `current_datetime` - No API key needed
162
163
  - ✅ `prompt_enhancement` - No API key needed
164
+ - ✅ `bash_execute` - No API key needed
163
165
  - 🔑 `weather_info` - Requires `toolApiKeys.openweather`
164
166
  - 🔑 `web_search` - Requires `toolApiKeys.serper`
165
167
  - 🔑 `deep_research` - Requires `toolApiKeys.serper`
@@ -241,6 +243,51 @@ You can also run any MCP server via npx or custom executables:
241
243
 
242
244
  **Note:** Internal MCP servers must be built and available in the `b4m-core/packages/mcp/dist/src/` directory. The CLI will automatically find them if you're running from the monorepo. For Docker-based servers, ensure Docker is installed and the image is accessible.
243
245
 
246
+ ## Context Files
247
+
248
+ The CLI supports loading project-specific instructions from context files, similar to CLAUDE.md in Claude Code. These files provide persistent instructions that are automatically included in the agent's system prompt.
249
+
250
+ ### Supported Files
251
+
252
+ **Project-level** (in your project directory, checked in priority order):
253
+ 1. `CLAUDE.local.md` - Personal/gitignored instructions (highest priority)
254
+ 2. `CLAUDE.md` - Project instructions
255
+ 3. `AGENTS.md` - Cross-tool standard
256
+ 4. `AI.local.md` - Personal/gitignored instructions
257
+ 5. `AI.md` - Project instructions
258
+ 6. `INSTRUCTIONS.md` - Project instructions (lowest priority)
259
+
260
+ **Global** (in `~/.bike4mind/`):
261
+ 1. `AI.local.md` - Personal global instructions
262
+ 2. `AI.md` - Global instructions
263
+
264
+ ### How It Works
265
+
266
+ - The CLI loads the **first matching file** from each layer (global and project)
267
+ - Project files take precedence over global files
268
+ - `.local.md` variants are intended to be gitignored for personal preferences
269
+ - Files must be under 100KB
270
+ - Symlinks are rejected for security
271
+
272
+ ### Example
273
+
274
+ Create a `CLAUDE.md` in your project:
275
+
276
+ ```markdown
277
+ # Project Instructions
278
+
279
+ - Always use TypeScript strict mode
280
+ - Prefer functional components with hooks
281
+ - Run tests before committing
282
+ ```
283
+
284
+ On startup, you'll see:
285
+ ```
286
+ 📄 Project context: CLAUDE.md
287
+ ```
288
+
289
+ The agent will follow these instructions for all interactions in that project.
290
+
244
291
  ## Session Storage
245
292
 
246
293
  Sessions are saved to `~/.bike4mind/sessions/`
@@ -338,6 +385,7 @@ Current implementation includes:
338
385
  ✅ B4M tools integration
339
386
  ✅ MCP tools support
340
387
  ✅ Debug logging with --verbose flag
388
+ ✅ Context file loading (CLAUDE.md, AGENTS.md, AI.md)
341
389
 
342
390
  Coming soon:
343
391
 
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CurationArtifactType
4
- } from "./chunk-H6SHASMZ.js";
4
+ } from "./chunk-YQZPXUYU.js";
5
5
  import "./chunk-PDX44BCA.js";
6
6
 
7
7
  // ../../b4m-core/packages/services/dist/src/notebookCurationService/artifactExtractor.js
@@ -6,12 +6,12 @@ import {
6
6
  getSettingsByNames,
7
7
  obfuscateApiKey,
8
8
  secureParameters
9
- } from "./chunk-DNSBC3LO.js";
9
+ } from "./chunk-ZDI5PEG4.js";
10
10
  import {
11
11
  ApiKeyType,
12
12
  MementoTier,
13
13
  isSupportedEmbeddingModel
14
- } from "./chunk-H6SHASMZ.js";
14
+ } from "./chunk-YQZPXUYU.js";
15
15
 
16
16
  // ../../b4m-core/packages/services/dist/src/apiKeyService/get.js
17
17
  import { z } from "zod";
@@ -7,11 +7,11 @@ import {
7
7
  getSettingsMap,
8
8
  getSettingsValue,
9
9
  secureParameters
10
- } from "./chunk-DNSBC3LO.js";
10
+ } from "./chunk-ZDI5PEG4.js";
11
11
  import {
12
12
  KnowledgeType,
13
13
  SupportedFabFileMimeTypes
14
- } from "./chunk-H6SHASMZ.js";
14
+ } from "./chunk-YQZPXUYU.js";
15
15
 
16
16
  // ../../b4m-core/packages/services/dist/src/fabFileService/create.js
17
17
  import { z } from "zod";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  BadRequestError,
4
4
  secureParameters
5
- } from "./chunk-DNSBC3LO.js";
5
+ } from "./chunk-ZDI5PEG4.js";
6
6
  import {
7
7
  GenericCreditDeductTransaction,
8
8
  ImageEditUsageTransaction,
@@ -10,7 +10,7 @@ import {
10
10
  RealtimeVoiceUsageTransaction,
11
11
  TextGenerationUsageTransaction,
12
12
  TransferCreditTransaction
13
- } from "./chunk-H6SHASMZ.js";
13
+ } from "./chunk-YQZPXUYU.js";
14
14
 
15
15
  // ../../b4m-core/packages/services/dist/src/creditService/subtractCredits.js
16
16
  import { z } from "zod";
@@ -230,7 +230,9 @@ var b4mLLMTools = z3.enum([
230
230
  "create_file",
231
231
  "glob_files",
232
232
  "grep_search",
233
- "delete_file"
233
+ "delete_file",
234
+ // Shell execution
235
+ "bash_execute"
234
236
  ]);
235
237
  var B4MLLMToolsList = b4mLLMTools.options.map((tool) => tool);
236
238
  var RechartsChartTypeSchema = z3.enum([
@@ -4038,6 +4040,15 @@ var UserApiKeyEvents;
4038
4040
  UserApiKeyEvents2["DELETED"] = "User API Key Deleted";
4039
4041
  })(UserApiKeyEvents || (UserApiKeyEvents = {}));
4040
4042
 
4043
+ // ../../b4m-core/packages/common/dist/src/schemas/analytics/events/slack.js
4044
+ var SlackEvents;
4045
+ (function(SlackEvents2) {
4046
+ SlackEvents2["SLACK_COMMAND_RECEIVED"] = "Slack Command Received";
4047
+ SlackEvents2["SLACK_COMMAND_COMPLETED"] = "Slack Command Completed";
4048
+ SlackEvents2["SLACK_MCP_TOOL_INVOKED"] = "Slack MCP Tool Invoked";
4049
+ SlackEvents2["SLACK_BULK_OPERATION"] = "Slack Bulk Operation Executed";
4050
+ })(SlackEvents || (SlackEvents = {}));
4051
+
4041
4052
  // ../../b4m-core/packages/common/dist/src/schemas/team.js
4042
4053
  import { z as z22 } from "zod";
4043
4054
  var InternalTeamMemberSchema = z22.object({
@@ -5039,6 +5050,22 @@ function formatUserList(users) {
5039
5050
  }
5040
5051
  return users.map((user) => formatUser(user));
5041
5052
  }
5053
+ function formatBulkTransitionResult(result) {
5054
+ return {
5055
+ taskId: result.taskId,
5056
+ message: result.message,
5057
+ issueCount: result.issueCount,
5058
+ note: "This is an async operation. The transitions will be processed in the background."
5059
+ };
5060
+ }
5061
+ function formatBulkUpdateResult(result) {
5062
+ return {
5063
+ taskId: result.taskId,
5064
+ message: result.message,
5065
+ issueCount: result.issueCount,
5066
+ note: "This is an async operation. The updates will be processed in the background."
5067
+ };
5068
+ }
5042
5069
 
5043
5070
  // ../../b4m-core/packages/common/dist/src/jira/api.js
5044
5071
  var JiraApi = class {
@@ -5360,6 +5387,117 @@ var JiraApi = class {
5360
5387
  errors: formattedErrors
5361
5388
  };
5362
5389
  }
5390
+ /**
5391
+ * Bulk transition multiple issues to new statuses in a single API call.
5392
+ * Uses the Jira Cloud Bulk Transition API.
5393
+ * Supports up to 1000 issues per request.
5394
+ *
5395
+ * Note: This is an async operation - returns a task ID for tracking progress.
5396
+ */
5397
+ async bulkTransitionIssues(params) {
5398
+ const { issues } = params;
5399
+ if (issues.length === 0) {
5400
+ return { taskId: "", message: "No issues to transition", issueCount: 0 };
5401
+ }
5402
+ if (issues.length > 1e3) {
5403
+ throw new Error("Bulk transition is limited to 1000 issues per request. Please split your request.");
5404
+ }
5405
+ const transitionGroups = {};
5406
+ for (const issue of issues) {
5407
+ if (!transitionGroups[issue.transitionId]) {
5408
+ transitionGroups[issue.transitionId] = [];
5409
+ }
5410
+ transitionGroups[issue.transitionId].push(issue.issueIdOrKey);
5411
+ }
5412
+ const bulkTransitionInputs = Object.entries(transitionGroups).map(([transitionId, selectedIssueIdsOrKeys]) => ({
5413
+ selectedIssueIdsOrKeys,
5414
+ transitionId
5415
+ }));
5416
+ const result = await this.request("POST", "/bulk/issues/transition", {
5417
+ body: { bulkTransitionInputs }
5418
+ });
5419
+ return {
5420
+ taskId: result.taskId,
5421
+ message: `Bulk transition started for ${issues.length} issue(s). Use taskId to check progress.`,
5422
+ issueCount: issues.length
5423
+ };
5424
+ }
5425
+ /**
5426
+ * Bulk update multiple issues' fields in a single API call.
5427
+ * Uses the Jira Cloud Bulk Edit API.
5428
+ * Supports up to 1000 issues per request.
5429
+ *
5430
+ * Note: This is an async operation - returns a task ID for tracking progress.
5431
+ */
5432
+ async bulkUpdateIssues(params) {
5433
+ const { issueIdsOrKeys, fields } = params;
5434
+ if (issueIdsOrKeys.length === 0) {
5435
+ return { taskId: "", message: "No issues to update", issueCount: 0 };
5436
+ }
5437
+ if (issueIdsOrKeys.length > 1e3) {
5438
+ throw new Error("Bulk update is limited to 1000 issues per request. Please split your request.");
5439
+ }
5440
+ const selectedActions = [];
5441
+ const editedFieldsInput = {};
5442
+ if (fields.summary !== void 0) {
5443
+ selectedActions.push("summary");
5444
+ editedFieldsInput.simpleFields = editedFieldsInput.simpleFields || {};
5445
+ editedFieldsInput.simpleFields.summary = { value: fields.summary };
5446
+ }
5447
+ if (fields.description !== void 0) {
5448
+ selectedActions.push("description");
5449
+ editedFieldsInput.richTextFields = editedFieldsInput.richTextFields || [];
5450
+ editedFieldsInput.richTextFields.push({
5451
+ fieldId: "description",
5452
+ richText: {
5453
+ adfValue: {
5454
+ version: 1,
5455
+ type: "doc",
5456
+ content: [
5457
+ {
5458
+ type: "paragraph",
5459
+ content: [{ type: "text", text: fields.description }]
5460
+ }
5461
+ ]
5462
+ }
5463
+ }
5464
+ });
5465
+ }
5466
+ if (fields.priority !== void 0) {
5467
+ selectedActions.push("priority");
5468
+ editedFieldsInput.simpleFields = editedFieldsInput.simpleFields || {};
5469
+ editedFieldsInput.simpleFields.priority = { priorityName: fields.priority };
5470
+ }
5471
+ if (fields.assignee !== void 0) {
5472
+ selectedActions.push("assignee");
5473
+ editedFieldsInput.simpleFields = editedFieldsInput.simpleFields || {};
5474
+ editedFieldsInput.simpleFields.assignee = { accountId: fields.assignee };
5475
+ }
5476
+ if (fields.labels !== void 0) {
5477
+ selectedActions.push("labels");
5478
+ editedFieldsInput.labelsFields = editedFieldsInput.labelsFields || [];
5479
+ editedFieldsInput.labelsFields.push({
5480
+ fieldId: "labels",
5481
+ labels: fields.labels.values.map((name) => ({ name })),
5482
+ bulkEditMultiSelectFieldOption: fields.labels.action
5483
+ });
5484
+ }
5485
+ if (selectedActions.length === 0) {
5486
+ throw new Error("At least one field must be specified for bulk update.");
5487
+ }
5488
+ const result = await this.request("POST", "/bulk/issues/fields", {
5489
+ body: {
5490
+ selectedActions,
5491
+ selectedIssueIdsOrKeys: issueIdsOrKeys,
5492
+ editedFieldsInput
5493
+ }
5494
+ });
5495
+ return {
5496
+ taskId: result.taskId,
5497
+ message: `Bulk update started for ${issueIdsOrKeys.length} issue(s). Fields: ${selectedActions.join(", ")}. Use taskId to check progress.`,
5498
+ issueCount: issueIdsOrKeys.length
5499
+ };
5500
+ }
5363
5501
  };
5364
5502
 
5365
5503
  // ../../b4m-core/packages/common/dist/src/atlassian/config.js
@@ -6114,6 +6252,7 @@ export {
6114
6252
  FriendshipEvents,
6115
6253
  OrganizationEvents,
6116
6254
  UserApiKeyEvents,
6255
+ SlackEvents,
6117
6256
  InternalTeamMemberSchema,
6118
6257
  InternalTeamMemberListSchema,
6119
6258
  PREDEFINED_USER_TAGS,
@@ -6149,6 +6288,8 @@ export {
6149
6288
  formatUser,
6150
6289
  formatTransitionResult,
6151
6290
  formatUserList,
6291
+ formatBulkTransitionResult,
6292
+ formatBulkUpdateResult,
6152
6293
  JiraApi,
6153
6294
  getErrorMessage,
6154
6295
  getAtlassianConfig,
@@ -16,7 +16,7 @@ import {
16
16
  dayjsConfig_default,
17
17
  extractSnippetMeta,
18
18
  settingsMap
19
- } from "./chunk-H6SHASMZ.js";
19
+ } from "./chunk-YQZPXUYU.js";
20
20
 
21
21
  // ../../b4m-core/packages/utils/dist/src/storage/S3Storage.js
22
22
  import { S3Client, PutObjectCommand, DeleteObjectCommand, GetObjectCommand, HeadObjectCommand } from "@aws-sdk/client-s3";
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  createFabFile,
4
4
  createFabFileSchema
5
- } from "./chunk-YXHQN7SK.js";
6
- import "./chunk-DNSBC3LO.js";
5
+ } from "./chunk-LFXXYICK.js";
6
+ import "./chunk-ZDI5PEG4.js";
7
7
  import "./chunk-AMDXHL6S.js";
8
- import "./chunk-H6SHASMZ.js";
8
+ import "./chunk-YQZPXUYU.js";
9
9
  import "./chunk-PDX44BCA.js";
10
10
  export {
11
11
  createFabFile,