a24z 1.0.38 → 1.0.40
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/bin/a24z.js +26 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +2 -2
- package/package.json +5 -1
package/bin/a24z.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// This is the NPM bin entry point that loads the compiled TypeScript
|
|
4
|
+
import { createRequire } from 'module';
|
|
5
|
+
import { fileURLToPath } from 'url';
|
|
6
|
+
import { resolve, dirname } from 'path';
|
|
7
|
+
|
|
8
|
+
const require = createRequire(import.meta.url);
|
|
9
|
+
const fs = require('fs');
|
|
10
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
+
const __dirname = dirname(__filename);
|
|
12
|
+
|
|
13
|
+
const bundlePath = resolve(__dirname, '../dist/index.js');
|
|
14
|
+
|
|
15
|
+
// Verify bundle exists
|
|
16
|
+
if (!fs.existsSync(bundlePath)) {
|
|
17
|
+
console.error('❌ Error: A24Z CLI was built with Bun but the bundle is missing.');
|
|
18
|
+
console.error('Please run: bun run build');
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Load the bundle
|
|
23
|
+
import(bundlePath).catch(error => {
|
|
24
|
+
console.error('❌ Error: Failed to load A24Z CLI (bundle):', error);
|
|
25
|
+
console.error('');
|
|
26
|
+
});
|
package/dist/index.js
CHANGED
|
@@ -159,7 +159,7 @@ ${V3D}
|
|
|
159
159
|
Try running with %s or get access `,T.cyan("sudo"))+`
|
|
160
160
|
to the local update config store via
|
|
161
161
|
`+T.cyan(nJ(" sudo chown -R $USER:$(id -gn $USER) %s ",L6));J8.on("exit",()=>{console.error(O7(F,{textAlignment:"center"}))})}}check(){if(!this.config||this.config.get("optOut")||this.#E)return;if(this.update=this.config.get("update"),this.update)this.update.current=this.#B,this.config.delete("update");if(Date.now()-this.config.get("lastUpdateCheck")<this.#C)return;w5D(J8.execPath,[kk.join(S5D,"check.js"),JSON.stringify(this.#D)],{detached:!0,stdio:"ignore"}).unref()}async fetchInfo(){let{distTag:D}=this.#D,F=await PJ(this._packageName,{version:D});return{latest:F,current:this.#B,type:xk.default(this.#B,F)??D,name:this._packageName}}notify(D){let F=!this._shouldNotifyInNpmScript&&mS;if(!J8.stdout.isTTY||F||!this.update||!uk.default(this.update.latest,this.update.current))return this;D={isGlobal:tS,...D};let E=D.isGlobal?`npm i -g ${this._packageName}`:`npm i ${this._packageName}`,B="Update available "+T.dim("{currentVersion}")+T.reset(" → ")+T.green("{latestVersion}")+`
|
|
162
|
-
Run `+T.cyan("{updateCommand}")+" to update",C=D.message||B;D.boxenOptions??={padding:1,margin:1,textAlignment:"center",borderColor:"yellow",borderStyle:"round"};let Z=O7(cJ(C,{packageName:this._packageName,currentVersion:this.update.current,latestVersion:this.update.latest,updateCommand:E}),D.boxenOptions);if(D.defer===!1)console.error(Z);else J8.on("exit",()=>{console.error(Z)});return this}}function aJ(D){let F=new P7(D);return F.check(),F}var O4=d(yx(),1);import xED from"zlib";import{promisify as uED}from"util";var vx={name:"a24z",version:"1.0.
|
|
162
|
+
Run `+T.cyan("{updateCommand}")+" to update",C=D.message||B;D.boxenOptions??={padding:1,margin:1,textAlignment:"center",borderColor:"yellow",borderStyle:"round"};let Z=O7(cJ(C,{packageName:this._packageName,currentVersion:this.update.current,latestVersion:this.update.latest,updateCommand:E}),D.boxenOptions);if(D.defer===!1)console.error(Z);else J8.on("exit",()=>{console.error(Z)});return this}}function aJ(D){let F=new P7(D);return F.check(),F}var O4=d(yx(),1);import xED from"zlib";import{promisify as uED}from"util";var vx={name:"a24z",version:"1.0.40",description:"AI Agent Observability CLI - Monitor and analyze your AI tool performance",main:"dist/index.js",bin:{a24z:"bin/a24z.js"},type:"module",files:["bin/","dist/","README.md"],scripts:{build:"rm -rf dist && NODE_ENV=production bun run build.ts","build:dev":"rm -rf dist && NODE_ENV=development bun run build.ts",prepublishOnly:"bun run build","perf:test":"node scripts/perf-test.js",test:"bun test","test:watch":"bun test --watch"},keywords:["claude","ai","observability","monitoring","cli","tools","analytics","performance"],author:"a24z",homepage:"https://a24z.ai",dependencies:{},devDependencies:{"@iarna/toml":"^2.2.5","@types/bun":"latest","@types/iarna__toml":"^2.0.5","@types/inquirer":"^9.0.7","@types/node":"^20.10.0","@types/update-notifier":"^6.0.8",chalk:"^5.3.0",commander:"^11.1.0",inquirer:"^9.2.12",open:"^9.1.0",ora:"^7.0.1",typescript:"^5.3.2","update-notifier":"^7.3.1"},engines:{node:">=16.0.0"}};var yED=uED(xED.gzip);function vED(){return{apiUrl:"https://api.a24z.ai",clientId:"client_01K4ZPKT6DNRF3FZFVHXZVWVJ8"}}var _ED=kED(import.meta.url),hED=pD.dirname(_ED),l7=pD.join(W8.homedir(),".a24z"),K0=pD.join(l7,"settings.json"),_x=pD.join(W8.homedir(),".claude"),P1=pD.join(_x,"settings.json"),fED=pD.join(W8.homedir(),".gemini"),w1=pD.join(fED,"settings.json"),gED=pD.join(W8.homedir(),".codex"),j1=pD.join(gED,"config.toml"),d7=pD.join(_x,"a24z-config.json"),KY=["claude-code","gemini-cli","codex"],hx={"claude-code":!0,"gemini-cli":!1,codex:!0},mED=KY.filter((D)=>hx[D]);function p7(D){let F=D.toLowerCase().trim();if(!KY.includes(F))throw console.error(T.red(`
|
|
163
163
|
❌ Unknown tool: '${D}'`)),console.log(T.cyan(`
|
|
164
164
|
\uD83D\uDCE6 Available tools:`)),console.log(T.white(" • claude-code")+T.gray(" - Anthropic's Claude Code editor")),console.log(T.white(" • codex")+T.gray(" - OpenAI Codex CLI")),console.log(T.cyan(`
|
|
165
165
|
\uD83D\uDCA1 Example:`)),console.log(T.yellow(" a24z install claude-code")),console.log(""),Error(`Unknown tool: '${D}'. Available tools: ${KY.join(", ")}`);if(!hx[F]){console.error(T.red(`
|
|
@@ -214,4 +214,4 @@ Examples:
|
|
|
214
214
|
$ a24z org switch <org-id> # Switch by ID
|
|
215
215
|
`).action(async(Z)=>{await F.switchOrganization(Z)}),C.command("current").description("Display currently active organization").action(async()=>{await F.getCurrentOrganization()}),D.parse()}export{p7 as validateTool,dED as sanitizeUrlInput,vED as getDefaultUrls,pED as deriveSessionIdFromPath,lED as decodeCwdFromPath};
|
|
216
216
|
|
|
217
|
-
//# debugId=
|
|
217
|
+
//# debugId=665FD18B321E0D9964756E2164756E21
|