@psnext/slingcli 2.4.20260506-1 → 2.4.20260506-2

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/sling.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  process.title = "sling";
3
3
 
4
- const SLING_VERSION = "2.4.20260506-1";
4
+ const SLING_VERSION = "2.4.20260506-2";
5
5
 
6
6
  import { setBedrockProviderModule } from "@mariozechner/pi-ai";
7
7
  import { bedrockProviderModule } from "@mariozechner/pi-ai/bedrock-provider";
@@ -142,8 +142,18 @@ async function run() {
142
142
  await checkAndInstallPackages();
143
143
  setBedrockProviderModule(bedrockProviderModule);
144
144
  const args = applyNoEnv(rawArgs);
145
- const extensionPath = path.resolve(__dirname, "../slingshot");
146
- await main(["-e", extensionPath, ...args]);
145
+
146
+ // Built-in subcommands are dispatched by parsePackageCommand, which only
147
+ // inspects args[0]. Prepending "-e <path>" pushes the subcommand off args[0]
148
+ // and silently falls through to interactive mode.
149
+ const BUILTIN_SUBCOMMANDS = new Set(["install", "remove", "uninstall", "update", "list", "config"]);
150
+ const firstPositional = args.find((a) => !a.startsWith("-"));
151
+ if (firstPositional && BUILTIN_SUBCOMMANDS.has(firstPositional)) {
152
+ await main(args);
153
+ } else {
154
+ const extensionPath = path.resolve(__dirname, "../slingshot");
155
+ await main(["-e", extensionPath, ...args]);
156
+ }
147
157
  }
148
158
 
149
159
  run().catch((err) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@psnext/slingcli",
3
- "version": "2.4.20260506-1",
3
+ "version": "2.4.20260506-2",
4
4
  "description": "Connects Sling CLI to Publicis Sapient Slingshot enterprise LLM gateway. Bundles the pi coding-agent runtime.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -29,7 +29,7 @@
29
29
  "type": "git",
30
30
  "url": "git+https://pscode.lioncloud.net/psaiproducts/slingcli.git"
31
31
  },
32
- "slingVersion": "2.4.20260506-1",
32
+ "slingVersion": "2.4.20260506-2",
33
33
  "dependencies": {
34
34
  "@mariozechner/pi-tui": "file:../.sling-pack/mariozechner-pi-tui-0.73.0.tgz",
35
35
  "@mariozechner/pi-ai": "file:../.sling-pack/mariozechner-pi-ai-0.73.0.tgz",
@@ -22,7 +22,7 @@ Log file: ${N}
22
22
  `;q.appendFileSync(N,t)}catch{}}function Se(e,s){if(!(!N||!q))try{let i=`[${new Date().toISOString()}] ${e}:
23
23
  ${JSON.stringify(s,null,2)}
24
24
 
25
- `;q.appendFileSync(N,i)}catch{}}var ae={name:"slingshot.cli",private:!0,type:"module",workspaces:["packages/*","packages/web-ui/example","packages/coding-agent/examples/extensions/with-deps","packages/coding-agent/examples/extensions/custom-provider-anthropic","packages/coding-agent/examples/extensions/custom-provider-gitlab-duo","packages/coding-agent/examples/extensions/custom-provider-qwen-cli"],scripts:{clean:"npm run clean --workspaces",build:"cd packages/tui && npm run build && cd ../ai && npm run build && cd ../agent && npm run build && cd ../coding-agent && npm run build && cd ../mom && npm run build && cd ../web-ui && npm run build && cd ../pods && npm run build",dev:'concurrently --names "ai,agent,coding-agent,mom,web-ui,tui" --prefix-colors "cyan,yellow,red,white,green,magenta" "cd packages/ai && npm run dev" "cd packages/agent && npm run dev" "cd packages/coding-agent && npm run dev" "cd packages/mom && npm run dev" "cd packages/web-ui && npm run dev" "cd packages/tui && npm run dev"',"dev:tsc":'concurrently --names "ai,web-ui" --prefix-colors "cyan,green" "cd packages/ai && npm run dev:tsc" "cd packages/web-ui && npm run dev:tsc"',check:"","check:browser-smoke":"","profile:tui":"node scripts/profile-coding-agent-node.mjs --mode tui","profile:rpc":"node scripts/profile-coding-agent-node.mjs --mode rpc",test:"npm run test --workspaces --if-present","version:patch":"npm version patch -ws --no-git-tag-version && node scripts/sync-versions.js && shx rm -rf node_modules packages/*/node_modules package-lock.json && npm install","version:minor":"npm version minor -ws --no-git-tag-version && node scripts/sync-versions.js && shx rm -rf node_modules packages/*/node_modules package-lock.json && npm install","version:major":"npm version major -ws --no-git-tag-version && node scripts/sync-versions.js && shx rm -rf node_modules packages/*/node_modules package-lock.json && npm install","version:set":"npm version -ws",prepublishOnly:"npm run clean && npm run build && npm run check",publish:"npm run prepublishOnly && npm publish -ws --access public","publish:dry":"npm run prepublishOnly && npm publish -ws --access public --dry-run","release:patch":"node scripts/release.mjs patch","release:minor":"node scripts/release.mjs minor","release:major":"node scripts/release.mjs major",prepare:"husky"},devDependencies:{"@biomejs/biome":"2.3.5","@types/node":"^24.12.2","@typescript/native-preview":"7.0.0-dev.20260120.1",concurrently:"^9.2.1",esbuild:"^0.25.0",husky:"^9.1.7",shx:"^0.4.0",tsx:"^4.20.3",typescript:"^5.9.2"},engines:{node:">=20.0.0"},slingVersion:"2.4.20260506-1",overrides:{rimraf:"6.1.3","fast-xml-parser":"5.7.2",gaxios:{rimraf:"6.1.3"}},dependencies:{"compound-engineering-pi":"^0.2.4"}};async function we(e,s,t,i){let o=mt(),r=await s.modelRegistry.getApiKeyForProvider(s.model?.provider||"slingshot");if(!r){W()&&P("ERROR: No API key found");return}let a=r.startsWith("Bearer ")?r:`Bearer ${r}`,c=process.env.SLINGSHOT_PROJECT_ID||t?.projectId||pt,n=process.env.SLINGSHOT_WORKSPACE_ID||t?.workspaceId||ft,l=process.env.CLIENT_ID||gt,h={"Content-Type":"application/json",accept:"application/json","access-token":a,"x-project-id":c,"x-workspace-id":n,"x-client-id":l,"sage-trace-id":o,"User-Agent":"pi-slingshot/1.0.0"},u=parseFloat(process.env.SLINGSHOT_TEMPERATURE||"0.2"),g=parseFloat(process.env.SLINGSHOT_TOP_P||"0.8"),b={source:ae.name||"sling",ai_model_info:{ai_provider_name:s.model?.provider||"slingshot",sage_modl_name:s.model?.id||"unknown",sage_modl_option:{temperature:String(u),max_token_size:String(s.model?.maxTokens||16834),top_p:String(g)}},rag_info:{type:null,account_name:"dummy",project_names:[],repository_names:[],programming_language:null},tab_data:{tab_count:"1"},tags:null,slingshot_version:ae.slingVersion||"2.3.2",chat_type:"agent",...i||{}};return{headers:h,sageCommonData:b}}async function _e(e,s,t,i){let o={eventName:e,sageCommonData:t,eventData:i};try{let r=await fetch(dt,{method:"POST",headers:s,body:JSON.stringify(o)});if(r.ok){let a=await r.json().catch(()=>{});if(a.error_code)throw new Error(`Analytics API error: ${a.error_code} - ${a.error_message||"No message"}`);W()&&(P(`'SUCCESS: Event sent: ${e}`),P(`Response: ${JSON.stringify(a)}`),P("\u2500".repeat(66)))}else{let a=await r.text().catch(()=>""),c={status:r.status,statusText:r.statusText,responseBody:a,requestHeaders:s};throw W()&&(P(`ERROR: ${r.status} ${r.statusText}`),Se("Error Details",c),Se("Failed Request Body",o)),new Error(`Analytics API error: ${r.status} ${r.statusText}`)}}catch(r){let a=r instanceof Error?r.message:String(r);console.warn("[Slingshot Analytics] Request that caused error:",a),W()&&(P(`EXCEPTION: ${a}`),r instanceof Error&&r.stack&&P(`Stack trace: ${r.stack}`),Se("Request that caused exception",o))}}import le from"chalk";function Ct(e,s){return{render(t){let i=` \u26AC _______. __ __ .__ __. _______
25
+ `;q.appendFileSync(N,i)}catch{}}var ae={name:"slingshot.cli",private:!0,type:"module",workspaces:["packages/*","packages/web-ui/example","packages/coding-agent/examples/extensions/with-deps","packages/coding-agent/examples/extensions/custom-provider-anthropic","packages/coding-agent/examples/extensions/custom-provider-gitlab-duo","packages/coding-agent/examples/extensions/custom-provider-qwen-cli"],scripts:{clean:"npm run clean --workspaces",build:"cd packages/tui && npm run build && cd ../ai && npm run build && cd ../agent && npm run build && cd ../coding-agent && npm run build && cd ../mom && npm run build && cd ../web-ui && npm run build && cd ../pods && npm run build",dev:'concurrently --names "ai,agent,coding-agent,mom,web-ui,tui" --prefix-colors "cyan,yellow,red,white,green,magenta" "cd packages/ai && npm run dev" "cd packages/agent && npm run dev" "cd packages/coding-agent && npm run dev" "cd packages/mom && npm run dev" "cd packages/web-ui && npm run dev" "cd packages/tui && npm run dev"',"dev:tsc":'concurrently --names "ai,web-ui" --prefix-colors "cyan,green" "cd packages/ai && npm run dev:tsc" "cd packages/web-ui && npm run dev:tsc"',check:"","check:browser-smoke":"","profile:tui":"node scripts/profile-coding-agent-node.mjs --mode tui","profile:rpc":"node scripts/profile-coding-agent-node.mjs --mode rpc",test:"npm run test --workspaces --if-present","version:patch":"npm version patch -ws --no-git-tag-version && node scripts/sync-versions.js && shx rm -rf node_modules packages/*/node_modules package-lock.json && npm install","version:minor":"npm version minor -ws --no-git-tag-version && node scripts/sync-versions.js && shx rm -rf node_modules packages/*/node_modules package-lock.json && npm install","version:major":"npm version major -ws --no-git-tag-version && node scripts/sync-versions.js && shx rm -rf node_modules packages/*/node_modules package-lock.json && npm install","version:set":"npm version -ws",prepublishOnly:"npm run clean && npm run build && npm run check",publish:"npm run prepublishOnly && npm publish -ws --access public","publish:dry":"npm run prepublishOnly && npm publish -ws --access public --dry-run","release:patch":"node scripts/release.mjs patch","release:minor":"node scripts/release.mjs minor","release:major":"node scripts/release.mjs major",prepare:"husky"},devDependencies:{"@biomejs/biome":"2.3.5","@types/node":"^24.12.2","@typescript/native-preview":"7.0.0-dev.20260120.1",concurrently:"^9.2.1",esbuild:"^0.25.0",husky:"^9.1.7",shx:"^0.4.0",tsx:"^4.20.3",typescript:"^5.9.2"},engines:{node:">=20.0.0"},slingVersion:"2.4.20260506-2",overrides:{rimraf:"6.1.3","fast-xml-parser":"5.7.2",gaxios:{rimraf:"6.1.3"}},dependencies:{"compound-engineering-pi":"^0.2.4"}};async function we(e,s,t,i){let o=mt(),r=await s.modelRegistry.getApiKeyForProvider(s.model?.provider||"slingshot");if(!r){W()&&P("ERROR: No API key found");return}let a=r.startsWith("Bearer ")?r:`Bearer ${r}`,c=process.env.SLINGSHOT_PROJECT_ID||t?.projectId||pt,n=process.env.SLINGSHOT_WORKSPACE_ID||t?.workspaceId||ft,l=process.env.CLIENT_ID||gt,h={"Content-Type":"application/json",accept:"application/json","access-token":a,"x-project-id":c,"x-workspace-id":n,"x-client-id":l,"sage-trace-id":o,"User-Agent":"pi-slingshot/1.0.0"},u=parseFloat(process.env.SLINGSHOT_TEMPERATURE||"0.2"),g=parseFloat(process.env.SLINGSHOT_TOP_P||"0.8"),b={source:ae.name||"sling",ai_model_info:{ai_provider_name:s.model?.provider||"slingshot",sage_modl_name:s.model?.id||"unknown",sage_modl_option:{temperature:String(u),max_token_size:String(s.model?.maxTokens||16834),top_p:String(g)}},rag_info:{type:null,account_name:"dummy",project_names:[],repository_names:[],programming_language:null},tab_data:{tab_count:"1"},tags:null,slingshot_version:ae.slingVersion||"2.3.2",chat_type:"agent",...i||{}};return{headers:h,sageCommonData:b}}async function _e(e,s,t,i){let o={eventName:e,sageCommonData:t,eventData:i};try{let r=await fetch(dt,{method:"POST",headers:s,body:JSON.stringify(o)});if(r.ok){let a=await r.json().catch(()=>{});if(a.error_code)throw new Error(`Analytics API error: ${a.error_code} - ${a.error_message||"No message"}`);W()&&(P(`'SUCCESS: Event sent: ${e}`),P(`Response: ${JSON.stringify(a)}`),P("\u2500".repeat(66)))}else{let a=await r.text().catch(()=>""),c={status:r.status,statusText:r.statusText,responseBody:a,requestHeaders:s};throw W()&&(P(`ERROR: ${r.status} ${r.statusText}`),Se("Error Details",c),Se("Failed Request Body",o)),new Error(`Analytics API error: ${r.status} ${r.statusText}`)}}catch(r){let a=r instanceof Error?r.message:String(r);console.warn("[Slingshot Analytics] Request that caused error:",a),W()&&(P(`EXCEPTION: ${a}`),r instanceof Error&&r.stack&&P(`Stack trace: ${r.stack}`),Se("Request that caused exception",o))}}import le from"chalk";function Ct(e,s){return{render(t){let i=` \u26AC _______. __ __ .__ __. _______
26
26
  \u274D \xB7 \u274D / || | | | | \\ | | / _____|
27
27
  \u2726 \u26AC \u2726 | (----\`| | | | | \\| | | | __
28
28
  \u26AC \xB7 \u26AC \u26AC \xB7 \u26AC \\ \\ | | | | | . \` | | | |_ |