@psnext/slingcli 2.4.20260506-2 → 2.4.20260506-3

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-2";
4
+ const SLING_VERSION = "2.4.20260506-3";
5
5
 
6
6
  import { setBedrockProviderModule } from "@mariozechner/pi-ai";
7
7
  import { bedrockProviderModule } from "@mariozechner/pi-ai/bedrock-provider";
@@ -92,7 +92,11 @@ async function checkForUpdate(args) {
92
92
  if (process.env.SKIP_SLING_AUTO_UPDATE_CHECK) return;
93
93
  if (args.includes("--version") || args.includes("-v")) return;
94
94
  if (args.includes("install")) return;
95
- if (!process.stdin.isTTY || !process.stdout.isTTY) return;
95
+
96
+ // Check if -y or --yes flag is present
97
+ const autoYes = args.includes("-y") || args.includes("--yes");
98
+
99
+ if (!autoYes && (!process.stdin.isTTY || !process.stdout.isTTY)) return;
96
100
 
97
101
  let latestVersion;
98
102
  try {
@@ -110,14 +114,20 @@ async function checkForUpdate(args) {
110
114
  if (!latestVersion || !semver.gt(latestVersion, SLING_VERSION)) return;
111
115
 
112
116
  console.log(`A new version ${latestVersion} is available (current ${SLING_VERSION}).`);
113
- const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
114
- let answer;
115
- try {
116
- answer = (await rl.question("Update now? [Y/n] ")).trim().toLowerCase();
117
- } finally {
118
- rl.close();
117
+
118
+ let shouldUpdate = autoYes;
119
+ if (!autoYes) {
120
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
121
+ let answer;
122
+ try {
123
+ answer = (await rl.question("Update now? [Y/n] ")).trim().toLowerCase();
124
+ } finally {
125
+ rl.close();
126
+ }
127
+ shouldUpdate = !answer.startsWith("n");
119
128
  }
120
- if (answer.startsWith("n")) return;
129
+
130
+ if (!shouldUpdate) return;
121
131
 
122
132
  console.log("Installing @psnext/slingcli@" + latestVersion + "...");
123
133
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@psnext/slingcli",
3
- "version": "2.4.20260506-2",
3
+ "version": "2.4.20260506-3",
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-2",
32
+ "slingVersion": "2.4.20260506-3",
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-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 _______. __ __ .__ __. _______
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-3",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 \\ \\ | | | | | . \` | | | |_ |