@psnext/slingcli 2.4.20260507-1 → 2.4.20260507-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.20260507-
|
|
4
|
+
const SLING_VERSION = "2.4.20260507-2";
|
|
5
5
|
|
|
6
6
|
import { setBedrockProviderModule } from "@mariozechner/pi-ai";
|
|
7
7
|
import { bedrockProviderModule } from "@mariozechner/pi-ai/bedrock-provider";
|
|
@@ -92,10 +92,10 @@ 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
|
-
|
|
95
|
+
|
|
96
96
|
// Check if -y or --yes flag is present
|
|
97
97
|
const autoYes = args.includes("-y") || args.includes("--yes");
|
|
98
|
-
|
|
98
|
+
|
|
99
99
|
if (!autoYes && (!process.stdin.isTTY || !process.stdout.isTTY)) return;
|
|
100
100
|
|
|
101
101
|
let latestVersion;
|
|
@@ -114,7 +114,7 @@ async function checkForUpdate(args) {
|
|
|
114
114
|
if (!latestVersion || !semver.gt(latestVersion, SLING_VERSION)) return;
|
|
115
115
|
|
|
116
116
|
console.log(`A new version ${latestVersion} is available (current ${SLING_VERSION}).`);
|
|
117
|
-
|
|
117
|
+
|
|
118
118
|
let shouldUpdate = autoYes;
|
|
119
119
|
if (!autoYes) {
|
|
120
120
|
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
@@ -126,7 +126,7 @@ async function checkForUpdate(args) {
|
|
|
126
126
|
}
|
|
127
127
|
shouldUpdate = !answer.startsWith("n");
|
|
128
128
|
}
|
|
129
|
-
|
|
129
|
+
|
|
130
130
|
if (!shouldUpdate) return;
|
|
131
131
|
|
|
132
132
|
console.log("Installing @psnext/slingcli@" + latestVersion + "...");
|
|
@@ -161,6 +161,12 @@ async function run() {
|
|
|
161
161
|
if (firstPositional && BUILTIN_SUBCOMMANDS.has(firstPositional)) {
|
|
162
162
|
await main(args);
|
|
163
163
|
} else {
|
|
164
|
+
if (existsSync(path.resolve("./.slingshot/skills"))) {
|
|
165
|
+
args.push("--skill", path.resolve("./.slingshot/skills"));
|
|
166
|
+
}
|
|
167
|
+
if (existsSync(path.resolve(homedir(), ".slingshot/skills"))) {
|
|
168
|
+
args.push("--skill", path.resolve(homedir(), ".slingshot/skills"));
|
|
169
|
+
}
|
|
164
170
|
const extensionPath = path.resolve(__dirname, "../slingshot");
|
|
165
171
|
await main(["-e", extensionPath, ...args]);
|
|
166
172
|
}
|
|
@@ -12246,13 +12246,13 @@ export const MODELS = {
|
|
|
12246
12246
|
reasoning: true,
|
|
12247
12247
|
input: ["text", "image"],
|
|
12248
12248
|
cost: {
|
|
12249
|
-
input: 0.
|
|
12249
|
+
input: 0.04,
|
|
12250
12250
|
output: 0.15,
|
|
12251
12251
|
cacheRead: 0,
|
|
12252
12252
|
cacheWrite: 0,
|
|
12253
12253
|
},
|
|
12254
12254
|
contextWindow: 262144,
|
|
12255
|
-
maxTokens:
|
|
12255
|
+
maxTokens: 81920,
|
|
12256
12256
|
},
|
|
12257
12257
|
"qwen/qwen3.5-flash-02-23": {
|
|
12258
12258
|
id: "qwen/qwen3.5-flash-02-23",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@psnext/slingcli",
|
|
3
|
-
"version": "2.4.20260507-
|
|
3
|
+
"version": "2.4.20260507-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.20260507-
|
|
32
|
+
"slingVersion": "2.4.20260507-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",
|
package/slingshot/index.js
CHANGED
|
@@ -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.20260507-
|
|
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.20260507-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 \\ \\ | | | | | . \` | | | |_ |
|