@xagent/x-cli 1.1.81 → 1.1.83

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
@@ -1,6 +1,6 @@
1
1
  <!-- Test comment for PR creation -->
2
2
 
3
- ## 1.1.81 – Logo Assets & NPM Publication Complete
3
+ ## 1.1.83 – Logo Assets & NPM Publication Complete
4
4
 
5
5
  ✅ **Live on NPM**: [@xagent/x-cli](https://www.npmjs.com/package/@xagent/x-cli) - Fully published and ready for global installation
6
6
 
@@ -857,13 +857,45 @@ Every push to the `main` branch automatically:
857
857
 
858
858
  ### What You Need to Do
859
859
 
860
- **Nothing!** Just push your changes to main:
860
+ **⚠️ CRITICAL: Use Smart Push Script Only! ⚠️**
861
+
862
+ **🚨 FOR AI AGENTS: NEVER use direct git push to main!**
861
863
 
862
864
  ```bash
865
+ # ✅ CORRECT METHOD - Always use smart push:
863
866
  git add .
864
867
  git commit -m "your feature/fix"
865
- git push origin main
866
- # ✨ Automation handles the rest!
868
+ npm run smart-push
869
+ # ✨ Automation handles quality checks + NPM publishing!
870
+ ```
871
+
872
+ **🚫 NEVER DO THIS:**
873
+
874
+ ```bash
875
+ git push origin main # ❌ Bypasses quality gates!
876
+ git push # ❌ Missing automation checks!
877
+ ```
878
+
879
+ **💡 Why Smart Push Required:**
880
+
881
+ - Runs TypeScript & ESLint quality checks
882
+ - Monitors GitHub Actions workflow status
883
+ - Verifies NPM package publication
884
+ - Handles branch protection with automatic PRs
885
+ - Provides real-time feedback and error recovery
886
+
887
+ **📋 Complete Development Workflow:**
888
+
889
+ ```bash
890
+ # 1. Create feature branch for development
891
+ git checkout -b feature/my-changes
892
+ # 2. Make changes and commits
893
+ git add . && git commit -m "implement feature"
894
+ # 3. Switch to main and merge
895
+ git checkout main
896
+ git merge feature/my-changes
897
+ # 4. Smart push to trigger NPM publish
898
+ npm run smart-push
867
899
  ```
868
900
 
869
901
  ### 🚨 Critical Dependencies
@@ -1116,3 +1148,5 @@ _Want to see your name here? Check out our [Contributing Guide](CONTRIBUTING.md)
1116
1148
  Join our growing community of AI-powered terminal enthusiasts!
1117
1149
 
1118
1150
  # Test: Branch Protection Rules Test
1151
+
1152
+ # test
package/dist/index.js CHANGED
@@ -71,8 +71,9 @@ var GrokClient;
71
71
  var init_client = __esm({
72
72
  "src/grok/client.ts"() {
73
73
  GrokClient = class {
74
- constructor(apiKey2 = process.env.OPENAI_API_KEY || process.env.GROK_API_KEY || process.env.XAI_API_KEY, model, baseURL) {
74
+ constructor(apiKey2, model, baseURL) {
75
75
  this.currentModel = "grok-4-fast-non-reasoning";
76
+ apiKey2 = apiKey2 || process.env.OPENAI_API_KEY || process.env.GROK_API_KEY || process.env.XAI_API_KEY;
76
77
  this.client = new OpenAI({
77
78
  apiKey: apiKey2,
78
79
  baseURL: baseURL || process.env.GROK_BASE_URL || "https://api.x.ai/v1",
@@ -9317,26 +9318,17 @@ var init_research_recommend = __esm({
9317
9318
  issues: [],
9318
9319
  options: [],
9319
9320
  recommendation: {
9320
- option: 1,
9321
+ optionId: 1,
9321
9322
  reasoning: "Mock plan - real AI integration pending",
9322
- confidence: 0.8
9323
+ justification: "Using mock data while implementing AI integration",
9324
+ confidence: "high"
9323
9325
  },
9324
9326
  plan: {
9325
9327
  summary: "Mock summary - detailed plan generation pending",
9326
- approach: "Mock approach - implementation strategy pending",
9327
- todo: [
9328
- {
9329
- id: 1,
9330
- description: "Mock task - actual tasks will be generated by AI",
9331
- priority: "medium",
9332
- estimatedEffort: "2 hours"
9333
- }
9334
- ],
9335
- riskAssessment: {
9336
- complexity: "low",
9337
- dependencies: [],
9338
- potentialIssues: []
9339
- }
9328
+ approach: ["Mock approach - implementation strategy pending"],
9329
+ todo: ["Mock task - actual tasks will be generated by AI"],
9330
+ estimatedEffort: "2 hours",
9331
+ keyConsiderations: ["Mock consideration - real considerations pending"]
9340
9332
  }
9341
9333
  };
9342
9334
  return mockOutput;
@@ -16205,7 +16197,7 @@ var init_package = __esm({
16205
16197
  package_default = {
16206
16198
  type: "module",
16207
16199
  name: "@xagent/x-cli",
16208
- version: "1.1.81",
16200
+ version: "1.1.83",
16209
16201
  description: "An open-source AI agent that brings advanced AI capabilities directly into your terminal.",
16210
16202
  main: "dist/index.js",
16211
16203
  module: "dist/index.js",
@@ -16217,37 +16209,29 @@ var init_package = __esm({
16217
16209
  }
16218
16210
  },
16219
16211
  bin: {
16220
- xcli: "dist/index.js"
16212
+ grok: "./dist/index.js"
16221
16213
  },
16222
16214
  files: [
16223
- "dist/**/*",
16224
- ".xcli/**/*",
16215
+ "dist",
16225
16216
  "README.md",
16226
- "LICENSE",
16227
- "docs/assets/logos/**/*"
16217
+ "package.json"
16228
16218
  ],
16229
16219
  scripts: {
16230
- build: "tsup",
16231
- "build:tsc": "tsc",
16232
- dev: "npm run build && node dist/index.js --prompt 'Development test: Hello X-CLI!'",
16233
- "dev:node": "tsx src/index.ts",
16234
- "dev:watch": "npm run build && node --watch dist/index.js",
16235
- start: "node dist/index.js",
16236
- local: "node scripts/local.js",
16237
- "test:workflow": "node scripts/test-workflow.js",
16238
- "start:bun": "bun run dist/index.js",
16239
- lint: "eslint . --ext .js,.jsx,.ts,.tsx --ignore-pattern 'dist/**'",
16220
+ build: "tsup src/index.ts --format esm --dts",
16221
+ dev: "tsx watch src/index.ts",
16222
+ lint: "eslint src --ext .ts",
16240
16223
  typecheck: "tsc --noEmit",
16241
- "install:bun": "bun install",
16242
- preinstall: "echo '\u{1F916} Installing X CLI...'",
16243
- postinstall: `echo '==================================================' && echo '\u2705 X CLI installed successfully!' && echo '==================================================' && echo '\u{1F680} Try: xcli --help' && echo '\u{1F4A1} If "command not found", add to PATH:' && node -e "const p=process.platform;const isMac=p==='darwin';const isLinux=p==='linux';if(isMac||isLinux){const shell=isMac?'zshrc':'bashrc';console.log((isMac?'\u{1F34E} Mac':'\u{1F427} Linux')+': echo \\'export PATH=\\"$(npm config get prefix)/bin:$PATH\\"\\' >> ~/.'+shell+' && source ~/.'+shell);}" && echo '\u{1F4D6} Docs: https://github.com/hinetapora/x-cli-hurry-mode#installation' && echo '\u{1F511} Set API key: export GROK_API_KEY=your_key_here' && echo '==================================================' && echo '\u{1F527} Auto-setup PATH? Press Enter to add (or Ctrl+C to skip)' && read -t 10 && node -e "const fs=require('fs');const p=process.platform;const isMac=p==='darwin';const isLinux=p==='linux';if(isMac||isLinux){const shellFile=isMac?'.zshrc':'.bashrc';const rcPath=process.env.HOME+'/'+shellFile;const pathCmd='export PATH=\\"$(npm config get prefix)/bin:$PATH\\"';try{const content=fs.readFileSync(rcPath,'utf8');if(!content.includes(pathCmd)){fs.appendFileSync(rcPath,'\\n'+pathCmd+'\\n');console.log('\u2705 Added to ~/'+shellFile+' - restart terminal');}else{console.log('\u2139\uFE0F Already in ~/'+shellFile);}}catch(e){console.log('\u26A0\uFE0F Could not modify ~/'+shellFile+' - add manually');}}" && echo '\u{1F50D} Verifying: ' && xcli --version 2>/dev/null || echo '\u26A0\uFE0F xcli not in PATH yet - follow above steps'`,
16244
16224
  prepare: "husky install",
16245
16225
  "dev:site": "cd apps/site && npm run start",
16246
16226
  "build:site": "cd apps/site && npm run build",
16247
16227
  "sync:docs": "cd apps/site && node src/scripts/sync-agent-docs.js",
16248
- "smart-push": "./scripts/smart-push.sh"
16228
+ "smart-push": "./scripts/smart-push.sh",
16229
+ push: "echo '\u{1F6A8} BLOCKED: Use npm run smart-push instead' && echo '\u{1F4A1} Direct git push bypasses automation' && exit 1",
16230
+ "git-push": "echo '\u{1F6A8} BLOCKED: Use npm run smart-push instead' && echo '\u{1F4A1} Direct git push bypasses automation' && exit 1"
16249
16231
  },
16250
16232
  "lint-staged": {
16233
+ ".agent/**/*.{md,mdx}": "prettier --write",
16234
+ "apps/site/docs/**/*.{md,mdx}": [],
16251
16235
  "*.{ts,tsx}": [
16252
16236
  "eslint --fix --ignore-pattern 'dist/**'"
16253
16237
  ],
@@ -21794,7 +21778,7 @@ var require_package = __commonJS({
21794
21778
  module.exports = {
21795
21779
  type: "module",
21796
21780
  name: "@xagent/x-cli",
21797
- version: "1.1.81",
21781
+ version: "1.1.83",
21798
21782
  description: "An open-source AI agent that brings advanced AI capabilities directly into your terminal.",
21799
21783
  main: "dist/index.js",
21800
21784
  module: "dist/index.js",
@@ -21806,37 +21790,29 @@ var require_package = __commonJS({
21806
21790
  }
21807
21791
  },
21808
21792
  bin: {
21809
- xcli: "dist/index.js"
21793
+ grok: "./dist/index.js"
21810
21794
  },
21811
21795
  files: [
21812
- "dist/**/*",
21813
- ".xcli/**/*",
21796
+ "dist",
21814
21797
  "README.md",
21815
- "LICENSE",
21816
- "docs/assets/logos/**/*"
21798
+ "package.json"
21817
21799
  ],
21818
21800
  scripts: {
21819
- build: "tsup",
21820
- "build:tsc": "tsc",
21821
- dev: "npm run build && node dist/index.js --prompt 'Development test: Hello X-CLI!'",
21822
- "dev:node": "tsx src/index.ts",
21823
- "dev:watch": "npm run build && node --watch dist/index.js",
21824
- start: "node dist/index.js",
21825
- local: "node scripts/local.js",
21826
- "test:workflow": "node scripts/test-workflow.js",
21827
- "start:bun": "bun run dist/index.js",
21828
- lint: "eslint . --ext .js,.jsx,.ts,.tsx --ignore-pattern 'dist/**'",
21801
+ build: "tsup src/index.ts --format esm --dts",
21802
+ dev: "tsx watch src/index.ts",
21803
+ lint: "eslint src --ext .ts",
21829
21804
  typecheck: "tsc --noEmit",
21830
- "install:bun": "bun install",
21831
- preinstall: "echo '\u{1F916} Installing X CLI...'",
21832
- postinstall: `echo '==================================================' && echo '\u2705 X CLI installed successfully!' && echo '==================================================' && echo '\u{1F680} Try: xcli --help' && echo '\u{1F4A1} If "command not found", add to PATH:' && node -e "const p=process.platform;const isMac=p==='darwin';const isLinux=p==='linux';if(isMac||isLinux){const shell=isMac?'zshrc':'bashrc';console.log((isMac?'\u{1F34E} Mac':'\u{1F427} Linux')+': echo \\'export PATH=\\"$(npm config get prefix)/bin:$PATH\\"\\' >> ~/.'+shell+' && source ~/.'+shell);}" && echo '\u{1F4D6} Docs: https://github.com/hinetapora/x-cli-hurry-mode#installation' && echo '\u{1F511} Set API key: export GROK_API_KEY=your_key_here' && echo '==================================================' && echo '\u{1F527} Auto-setup PATH? Press Enter to add (or Ctrl+C to skip)' && read -t 10 && node -e "const fs=require('fs');const p=process.platform;const isMac=p==='darwin';const isLinux=p==='linux';if(isMac||isLinux){const shellFile=isMac?'.zshrc':'.bashrc';const rcPath=process.env.HOME+'/'+shellFile;const pathCmd='export PATH=\\"$(npm config get prefix)/bin:$PATH\\"';try{const content=fs.readFileSync(rcPath,'utf8');if(!content.includes(pathCmd)){fs.appendFileSync(rcPath,'\\n'+pathCmd+'\\n');console.log('\u2705 Added to ~/'+shellFile+' - restart terminal');}else{console.log('\u2139\uFE0F Already in ~/'+shellFile);}}catch(e){console.log('\u26A0\uFE0F Could not modify ~/'+shellFile+' - add manually');}}" && echo '\u{1F50D} Verifying: ' && xcli --version 2>/dev/null || echo '\u26A0\uFE0F xcli not in PATH yet - follow above steps'`,
21833
21805
  prepare: "husky install",
21834
21806
  "dev:site": "cd apps/site && npm run start",
21835
21807
  "build:site": "cd apps/site && npm run build",
21836
21808
  "sync:docs": "cd apps/site && node src/scripts/sync-agent-docs.js",
21837
- "smart-push": "./scripts/smart-push.sh"
21809
+ "smart-push": "./scripts/smart-push.sh",
21810
+ push: "echo '\u{1F6A8} BLOCKED: Use npm run smart-push instead' && echo '\u{1F4A1} Direct git push bypasses automation' && exit 1",
21811
+ "git-push": "echo '\u{1F6A8} BLOCKED: Use npm run smart-push instead' && echo '\u{1F4A1} Direct git push bypasses automation' && exit 1"
21838
21812
  },
21839
21813
  "lint-staged": {
21814
+ ".agent/**/*.{md,mdx}": "prettier --write",
21815
+ "apps/site/docs/**/*.{md,mdx}": [],
21840
21816
  "*.{ts,tsx}": [
21841
21817
  "eslint --fix --ignore-pattern 'dist/**'"
21842
21818
  ],