shark-ai 0.4.17 → 0.4.19

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.en.md CHANGED
@@ -87,7 +87,7 @@ npm install -g shark-ai
87
87
 
88
88
  **Requirements:**
89
89
  - Node.js >= 20.0.0
90
- - StackSpot AI Account (for authentication)
90
+ - StackSpot AI Account (for authentication). See the [StackSpot Setup Guide](docs/stackspot-setup.md) to configure credentials and agents.
91
91
 
92
92
  ---
93
93
 
package/README.md CHANGED
@@ -87,7 +87,7 @@ npm install -g shark-ai
87
87
 
88
88
  **Requisitos:**
89
89
  - Node.js >= 20.0.0
90
- - Conta StackSpot AI (para autenticação)
90
+ - Conta StackSpot AI (para autenticação). Veja o [Guia Completo de Setup do StackSpot](docs/stackspot-setup.md) para configurar credenciais e agentes.
91
91
 
92
92
  ---
93
93
 
package/dist/bin/shark.js CHANGED
@@ -37,7 +37,7 @@ import {
37
37
  replaceLineRange,
38
38
  startSmartReplace,
39
39
  workflowManager
40
- } from "../chunk-T3DPAQAV.js";
40
+ } from "../chunk-KMWAJHAA.js";
41
41
  import {
42
42
  ConfigManager,
43
43
  FileLogger,
@@ -641,18 +641,43 @@ var StackSpotProvider = class {
641
641
  }
642
642
  agentId;
643
643
  getAgentId() {
644
- if (this.agentId) {
645
- return this.agentId;
644
+ const config = ConfigManager.getInstance().getConfig();
645
+ const configKeyMapping = {
646
+ "developer_agent": "dev",
647
+ "business_analyst": "ba",
648
+ "specification_agent": "spec",
649
+ "qa_agent": "qa",
650
+ "scan_agent": "scan",
651
+ "code_review": "codeReview"
652
+ };
653
+ const mappedKey = configKeyMapping[this.agentType];
654
+ if (mappedKey && config.agents?.[mappedKey]) {
655
+ return config.agents[mappedKey];
646
656
  }
647
657
  const envIdMapping = {
648
- "business_analyst": process.env.STACKSPOT_BA_AGENT_ID || "01KEJ95G304TNNAKGH5XNEEBVD",
649
- "developer_agent": process.env.STACKSPOT_DEV_AGENT_ID || "01KEQCGJ65YENRA4QBXVN1YFFX",
650
- "qa_agent": process.env.STACKSPOT_QA_AGENT_ID || "01KEQFJZ3Q3JER11NH22HEZX9X",
651
- "specification_agent": process.env.STACKSPOT_SPEC_AGENT_ID || "01KEPXTX37FTB4N672TZST4SGP",
652
- "scan_agent": process.env.STACKSPOT_SCAN_AGENT_ID || "01KEQ9AHWB550J2244YBH3QATN",
653
- "code_review": process.env.STACKSPOT_CODE_REVIEW_AGENT_ID || ""
658
+ "business_analyst": process.env.STACKSPOT_BA_AGENT_ID,
659
+ "developer_agent": process.env.STACKSPOT_DEV_AGENT_ID,
660
+ "qa_agent": process.env.STACKSPOT_QA_AGENT_ID,
661
+ "specification_agent": process.env.STACKSPOT_SPEC_AGENT_ID,
662
+ "scan_agent": process.env.STACKSPOT_SCAN_AGENT_ID,
663
+ "code_review": process.env.STACKSPOT_CODE_REVIEW_AGENT_ID
664
+ };
665
+ const envResolved = envIdMapping[this.agentType];
666
+ if (envResolved) {
667
+ return envResolved;
668
+ }
669
+ if (this.agentId && this.agentId !== "01KEQCGJ65YENRA4QBXVN1YFFX") {
670
+ return this.agentId;
671
+ }
672
+ const defaultIdMapping = {
673
+ "business_analyst": "01KEJ95G304TNNAKGH5XNEEBVD",
674
+ "developer_agent": "01KEQCGJ65YENRA4QBXVN1YFFX",
675
+ "qa_agent": "01KEQFJZ3Q3JER11NH22HEZX9X",
676
+ "specification_agent": "01KEPXTX37FTB4N672TZST4SGP",
677
+ "scan_agent": "01KEQ9AHWB550J2244YBH3QATN",
678
+ "code_review": ""
654
679
  };
655
- const resolved = envIdMapping[this.agentType];
680
+ const resolved = defaultIdMapping[this.agentType];
656
681
  if (this.agentType === "code_review") {
657
682
  if (!resolved) {
658
683
  throw new Error("Agent ID for 'code_review' is not configured.");
@@ -696,6 +721,7 @@ ${prompt}` : prompt;
696
721
  stackspot_knowledge: false,
697
722
  return_ks_in_response: true,
698
723
  deep_search_ks: false,
724
+ use_conversation: true,
699
725
  conversation_id: options.conversationId
700
726
  };
701
727
  const agentVersion = this.getAgentVersion();
@@ -3328,7 +3354,7 @@ var SubagentManager = class {
3328
3354
  this.registerSubagent(id, sub.TypeName, sub.Role);
3329
3355
  const promise = (async () => {
3330
3356
  try {
3331
- const { interactiveDeveloperAgent: interactiveDeveloperAgent2 } = await import("./developer-agent-CEDTDILQ.js");
3357
+ const { interactiveDeveloperAgent: interactiveDeveloperAgent2 } = await import("./developer-agent-HZOMPDMH.js");
3332
3358
  const customType = this.customTypes.get(sub.TypeName);
3333
3359
  let customContext = `[Subagent Context] ID: ${id}, Parent ID: ${parentId}, Role: ${sub.Role}
3334
3360
  `;
@@ -3756,4 +3782,4 @@ export {
3756
3782
  astOrganizeImports,
3757
3783
  interactiveDeveloperAgent
3758
3784
  };
3759
- //# sourceMappingURL=chunk-T3DPAQAV.js.map
3785
+ //# sourceMappingURL=chunk-KMWAJHAA.js.map