@psnext/slingcli 3.5.20261019-1 → 3.5.20261026-1
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/node_modules/@aws-sdk/core/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-env/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-http/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +11 -11
- package/node_modules/@aws-sdk/credential-provider-login/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-node/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-process/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +5 -5
- package/node_modules/@aws-sdk/eventstream-handler-node/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-eventstream/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-websocket/package.json +4 -4
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/CognitoIdentityClient.d.ts +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/SigninClient.d.ts +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/SSOClient.d.ts +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/SSOOIDCClient.d.ts +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/STSClient.d.ts +2 -1
- package/node_modules/@aws-sdk/nested-clients/package.json +5 -5
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +2 -2
- package/node_modules/@aws-sdk/types/dist-types/feature-ids.d.ts +3 -0
- package/node_modules/@aws-sdk/types/dist-types/ts3.4/feature-ids.d.ts +3 -0
- package/node_modules/@aws-sdk/types/package.json +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.js +10 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/transport.d.ts +8 -8
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/transport.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js +10 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/transport.d.ts +8 -8
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/transport.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/package.json +1 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +15 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +10 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +10 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +5 -5
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js +16 -2
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js +10 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js +5 -5
- package/node_modules/@smithy/core/package.json +1 -1
- package/node_modules/body-parser/README.md +17 -13
- package/node_modules/body-parser/lib/read.js +74 -57
- package/node_modules/body-parser/lib/types/json.js +11 -11
- package/node_modules/body-parser/lib/types/urlencoded.js +5 -5
- package/node_modules/body-parser/lib/utils.js +0 -15
- package/node_modules/body-parser/package.json +7 -12
- package/node_modules/hono/README.md +2 -3
- package/node_modules/hono/dist/cjs/helper/css/common.js +8 -3
- package/node_modules/hono/dist/cjs/helper/css/index.js +1 -1
- package/node_modules/hono/dist/cjs/helper/route/index.js +3 -1
- package/node_modules/hono/dist/cjs/jsx/base.js +1 -1
- package/node_modules/hono/dist/cjs/middleware/bearer-auth/index.js +8 -0
- package/node_modules/hono/dist/cjs/middleware/serve-static/index.js +3 -1
- package/node_modules/hono/dist/cjs/router/trie-router/node.js +2 -2
- package/node_modules/hono/dist/cjs/utils/url.js +11 -6
- package/node_modules/hono/dist/helper/css/common.js +8 -3
- package/node_modules/hono/dist/helper/css/index.js +1 -1
- package/node_modules/hono/dist/helper/route/index.js +3 -1
- package/node_modules/hono/dist/jsx/base.js +1 -1
- package/node_modules/hono/dist/middleware/bearer-auth/index.js +8 -0
- package/node_modules/hono/dist/middleware/serve-static/index.js +3 -1
- package/node_modules/hono/dist/router/trie-router/node.js +2 -2
- package/node_modules/hono/dist/types/adapter/aws-lambda/conninfo.d.ts +1 -1
- package/node_modules/hono/dist/types/adapter/bun/conninfo.d.ts +1 -1
- package/node_modules/hono/dist/types/adapter/bun/ssg.d.ts +1 -1
- package/node_modules/hono/dist/types/adapter/cloudflare-pages/conninfo.d.ts +1 -1
- package/node_modules/hono/dist/types/adapter/cloudflare-workers/conninfo.d.ts +1 -1
- package/node_modules/hono/dist/types/adapter/deno/conninfo.d.ts +1 -1
- package/node_modules/hono/dist/types/adapter/deno/ssg.d.ts +1 -1
- package/node_modules/hono/dist/types/adapter/lambda-edge/conninfo.d.ts +1 -1
- package/node_modules/hono/dist/types/adapter/netlify/conninfo.d.ts +1 -1
- package/node_modules/hono/dist/types/adapter/vercel/conninfo.d.ts +1 -1
- package/node_modules/hono/dist/types/helper/testing/index.d.ts +2 -1
- package/node_modules/hono/dist/types/hono-base.d.ts +21 -9
- package/node_modules/hono/dist/types/index.d.ts +1 -1
- package/node_modules/hono/dist/types/jsx/components.d.ts +2 -2
- package/node_modules/hono/dist/types/jsx/context.d.ts +2 -2
- package/node_modules/hono/dist/types/jsx/dom/components.d.ts +2 -2
- package/node_modules/hono/dist/types/jsx/dom/css.d.ts +2 -2
- package/node_modules/hono/dist/types/jsx/streaming.d.ts +4 -3
- package/node_modules/hono/dist/types/middleware/bearer-auth/index.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/ip-restriction/index.d.ts +3 -3
- package/node_modules/hono/dist/types/middleware/jsx-renderer/index.d.ts +3 -3
- package/node_modules/hono/dist/types/utils/ipaddr.d.ts +1 -1
- package/node_modules/hono/dist/utils/url.js +11 -6
- package/node_modules/hono/package.json +1 -1
- package/node_modules/ip-address/dist/common.js +2 -2
- package/node_modules/ip-address/dist/common.js.map +1 -1
- package/node_modules/ip-address/package.json +2 -2
- package/node_modules/on-finished/index.js +14 -2
- package/node_modules/on-finished/package.json +11 -7
- package/package.json +2 -2
- package/sling-default-packages.json +3 -2
- package/slingshot/index.js +1 -1
- package/node_modules/on-finished/HISTORY.md +0 -98
|
@@ -65,10 +65,11 @@ function onFinished (msg, listener) {
|
|
|
65
65
|
|
|
66
66
|
function isFinished (msg) {
|
|
67
67
|
var socket = msg.socket
|
|
68
|
+
var finished = writableEnded(msg)
|
|
68
69
|
|
|
69
|
-
if (typeof
|
|
70
|
+
if (typeof finished === 'boolean') {
|
|
70
71
|
// OutgoingMessage
|
|
71
|
-
return Boolean(
|
|
72
|
+
return Boolean(finished || (socket && !socket.writable))
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
if (typeof msg.complete === 'boolean') {
|
|
@@ -232,3 +233,14 @@ function wrap (fn) {
|
|
|
232
233
|
// return bound function
|
|
233
234
|
return res.runInAsyncScope.bind(res, fn, null)
|
|
234
235
|
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Determines if a writable stream has finished.
|
|
239
|
+
*
|
|
240
|
+
* @param {Object} res
|
|
241
|
+
* @returns {boolean}
|
|
242
|
+
* @private
|
|
243
|
+
*/
|
|
244
|
+
function writableEnded (res) {
|
|
245
|
+
return typeof res.writableEnded === 'boolean' ? res.writableEnded : res.finished
|
|
246
|
+
}
|
|
@@ -1,38 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "on-finished",
|
|
3
3
|
"description": "Execute a callback when a request closes, finishes, or errors",
|
|
4
|
-
"version": "2.4.
|
|
4
|
+
"version": "2.4.2",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
7
7
|
"Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"
|
|
8
8
|
],
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": "jshttp/on-finished",
|
|
11
|
+
"funding": {
|
|
12
|
+
"type": "opencollective",
|
|
13
|
+
"url": "https://opencollective.com/express"
|
|
14
|
+
},
|
|
15
|
+
"type": "commonjs",
|
|
11
16
|
"dependencies": {
|
|
12
17
|
"ee-first": "1.1.1"
|
|
13
18
|
},
|
|
14
19
|
"devDependencies": {
|
|
15
|
-
"eslint": "
|
|
20
|
+
"eslint": "8.17.0",
|
|
16
21
|
"eslint-config-standard": "14.1.1",
|
|
17
|
-
"eslint-plugin-import": "2.
|
|
22
|
+
"eslint-plugin-import": "2.26.0",
|
|
18
23
|
"eslint-plugin-markdown": "2.2.1",
|
|
19
24
|
"eslint-plugin-node": "11.1.0",
|
|
20
|
-
"eslint-plugin-promise": "
|
|
25
|
+
"eslint-plugin-promise": "6.0.0",
|
|
21
26
|
"eslint-plugin-standard": "4.1.0",
|
|
22
|
-
"mocha": "
|
|
27
|
+
"mocha": "12.0.3",
|
|
23
28
|
"nyc": "15.1.0"
|
|
24
29
|
},
|
|
25
30
|
"engines": {
|
|
26
31
|
"node": ">= 0.8"
|
|
27
32
|
},
|
|
28
33
|
"files": [
|
|
29
|
-
"HISTORY.md",
|
|
30
34
|
"LICENSE",
|
|
31
35
|
"index.js"
|
|
32
36
|
],
|
|
33
37
|
"scripts": {
|
|
34
38
|
"lint": "eslint .",
|
|
35
|
-
"test": "mocha --reporter spec --
|
|
39
|
+
"test": "mocha --reporter spec --check-leaks test/",
|
|
36
40
|
"test-ci": "nyc --reporter=lcovonly --reporter=text npm test",
|
|
37
41
|
"test-cov": "nyc --reporter=html --reporter=text npm test"
|
|
38
42
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@psnext/slingcli",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.20261026-1",
|
|
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": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"type": "git",
|
|
31
31
|
"url": "git+https://pscode.lioncloud.net/psaiproducts/slingcli.git"
|
|
32
32
|
},
|
|
33
|
-
"slingVersion": "3.5.
|
|
33
|
+
"slingVersion": "3.5.20261026-1",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@earendil-works/pi-tui": "file:../.sling-pack/earendil-works-pi-tui-1.0.0.tgz",
|
|
36
36
|
"@earendil-works/pi-ai": "file:../.sling-pack/earendil-works-pi-ai-1.0.0.tgz",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"packages": [
|
|
4
4
|
"npm:pi-intercom",
|
|
5
5
|
"npm:@psnext/s-subagents",
|
|
6
|
-
"npm
|
|
6
|
+
"npm:@juicesharp/rpiv-ask-user-question",
|
|
7
7
|
"npm:pi-hermes-memory",
|
|
8
8
|
"npm:pi-smart-fetch",
|
|
9
9
|
"npm:pi-mcp-adapter",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
],
|
|
13
13
|
"unsupportedPackages": [
|
|
14
14
|
"npm:pi-subagents",
|
|
15
|
-
"npm:context-mode"
|
|
15
|
+
"npm:context-mode",
|
|
16
|
+
"npm:pi-ask-user"
|
|
16
17
|
]
|
|
17
18
|
}
|
package/slingshot/index.js
CHANGED
|
@@ -573,7 +573,7 @@ ${JSON.stringify(e,null,2)}
|
|
|
573
573
|
`,"utf-8"),Me(`default-model: recorded ${e}/${n}`)),!0)}catch(r){return Me(`default-model: failed to record ${e}/${n}: ${ZI(r)}`),!1}finally{await i?.().catch(()=>{})}}function ZI(t){return t instanceof Error?t.message:String(t)}function eP(t){let e,n;async function i(){n=void 0;let r=e;e=void 0,r&&await sSe(rSe(),r.provider,r.modelId)}t.on("model_select",async r=>{r.source!=="restore"&&(e={provider:r.model.provider,modelId:r.model.id},n&&clearTimeout(n),n=setTimeout(()=>{i()},iSe),n.unref?.())}),t.on("session_shutdown",async()=>{n&&clearTimeout(n),await i()})}var tP="slingshot-smart-model-attribution";function Ng(t){return typeof t=="string"&&t.trim().length>0}function Qb(t){let e=new Set;for(let n of t)Ng(n.family)&&n.family==="smart"&&e.add(n.id);return e}function uG(t){return{smartModelIds:new Set(t),pendingResponseModel:void 0}}function nP(t,e){t.smartModelIds=new Set(e)}function pG(t){t.pendingResponseModel=void 0}function dG(t){return t===null||typeof t!="object"||Array.isArray(t)?null:t}function mG(t,e){let n=dG(e);if(n===null)return;let i,r,o,s;try{i=n.role,r=n.provider,o=n.model,s=n.responseModel}catch{return}i==="assistant"&&r==="slingshot"&&Ng(o)&&t.smartModelIds.has(o)&&Ng(s)&&(t.pendingResponseModel=s)}function hG(t,e){if(!Ng(t.pendingResponseModel))return;let n=t.pendingResponseModel;try{e({responseModel:n})}catch{}finally{t.pendingResponseModel=void 0}}function gG(t){let e=dG(t);return e===null?!1:Ng(e.responseModel)}se();function fG(t,e){let n;try{if(t===null||typeof t!="object")return;n=t.responseModel}catch{return}let i={responseModel:n};if(!gG(i))return;let r=i.responseModel.replace(/[\x00-\x1f\x7f-\x9f]/g,"").trim();if(r.length!==0)return new O(e.fg("dim",`Model used: ${r}`),0,0)}function iP(t,e){let n=new Headers(e.headers);return n.delete("content-length"),n.delete("content-encoding"),new Response(t,{status:e.status,statusText:e.statusText,headers:n})}function aSe(t){let e=new TextDecoder,n=new TextEncoder,i="";return new TransformStream({transform(r,o){i+=e.decode(r,{stream:!0});let s=i.split(`
|
|
574
574
|
`);i=s.pop()??"",s.length>0&&o.enqueue(n.encode(`${s.map(t).join(`
|
|
575
575
|
`)}
|
|
576
|
-
`))},flush(r){i&&r.enqueue(n.encode(t(i)))}})}function Jb(t,e,n,i){return async(r,o)=>{let s=await t(r,o);if(!s.ok||!s.body)return s;let a=s.headers.get("content-type")??"";if(a.includes("event-stream"))return iP(s.body.pipeThrough(aSe(i)),s);if(!a.includes("json"))return s;let l=await s.text();if(!l.includes(e))return iP(l,s);let c=n(l);return iP(c??l,s)}}var xG="_input_tokens";function yG(t){if(!t)return!1;let e=t.prompt_tokens_details??{},n=e.cached_tokens??t.cache_read_input_tokens,i=e.cache_write_tokens??t.cache_creation_input_tokens;return n===e.cached_tokens&&i===e.cache_write_tokens?!1:(t.prompt_tokens_details={...e,cached_tokens:n??0,cache_write_tokens:i??0},!0)}function vG(t){let e=yG(t?.usage);for(let n of t?.choices??[])yG(n?.usage)&&(e=!0);return e}function lSe(t){if(!t.startsWith("data: ")||!t.includes(xG))return t;try{let e=JSON.parse(t.slice(6));return vG(e)?`data: ${JSON.stringify(e)}`:t}catch{return t}}function bG(t=globalThis.fetch){return Jb(t,xG,e=>{try{let n=JSON.parse(e);return vG(n)?JSON.stringify(n):null}catch{return null}},lSe)}var Yb=null,rP=null;function Cd(){return Yb}function SG(){Yb=null,rP=null}function cSe(t){Yb=(Yb??0)+t,rP=t}var wG='"usage"';function TG(t){if(!t||typeof t!="object")return;let n=t.usage;if(n&&typeof n=="object"){let i=n.cost;if(i&&typeof i=="object"){let r=i.totalCost;typeof r=="number"&&Number.isFinite(r)&&cSe(r)}}}function uSe(t){if(!t.startsWith("data: ")||!t.includes(wG))return t;try{TG(JSON.parse(t.slice(6)))}catch{}return t}function CG(t=globalThis.fetch){let e=Jb(t,wG,n=>{try{TG(JSON.parse(n))}catch{}return null},uSe);return async(n,i)=>(rP=null,e(n,i))}var pSe=["patternProperties"];function dSe(t){return typeof t=="string"&&t.toLowerCase().includes("gemini")}function oP(t){if(Array.isArray(t)){let i=!1;for(let r of t)oP(r)&&(i=!0);return i}if(typeof t!="object"||t===null)return!1;let e=!1,n=t;for(let i of pSe)i in n&&(delete n[i],e=!0);for(let i of Object.values(n))oP(i)&&(e=!0);return e}function MG(t){if(typeof t!="object"||t===null)return!1;let{model:e,tools:n}=t;return!dSe(e)||!Array.isArray(n)?!1:oP(n)}function kG(t,{api:e,userToken:n,appToken:i,appContext:r,claudeCacheControl:o}){if(t["X-App-Authorization"]=`Bearer ${i}`,t["x-app-context"]=Buffer.from(JSON.stringify(r)).toString("base64"),e==="anthropic-messages"){t.Authorization=`Bearer ${n}`,t["X-Api-Key"]=null;return}t["x-claude-cache-control"]=o}Um();oi();import cc from"node:fs";import mSe from"node:path";var hSe="auth.json",sP="slingshot",gSe=3e4,fSe=2e3,ySe=50,xSe=t=>new Promise(e=>setTimeout(e,t));async function vSe(t){let e=`${t}.lock`,n=Date.now()+fSe;for(;;)try{return cc.mkdirSync(e),()=>{try{cc.rmdirSync(e)}catch{}}}catch(i){if(i.code!=="EEXIST")throw i;try{if(Date.now()-cc.statSync(e).mtimeMs>gSe){cc.rmdirSync(e);continue}}catch{}if(Date.now()>=n)return null;await xSe(ySe)}}async function bSe(){let t=mSe.resolve(ke(),hSe),e=null;try{if(!cc.existsSync(t))return;if(e=await vSe(t),!e){Me(`client-state: could not lock ${t}; leaving stored credential in place`);return}let n=cc.readFileSync(t,"utf-8"),i=JSON.parse(n);if(!i||typeof i!="object"||Array.isArray(i)||!(sP in i))return;delete i[sP],cc.writeFileSync(t,JSON.stringify(i,null,2),"utf-8"),Me(`client-state: cleared "${sP}" credential from ${t}`)}catch(n){ut("client-state: failed to clear stored user credential",n)}finally{e?.()}}async function jg(){Bg(),await bSe(),Me("client-state: reset complete")}var Xb={name:"slingshot.cli",private:!0,type:"module",workspaces:["packages/*"],scripts:{clean:"npm run clean --workspaces",build:"cd packages/telemetry && npm run build && cd ../chord && npm run build && cd ../protocol && npm run build && cd ../client && npm run build && cd ../tui && npm run build && cd ../ai && npm run build && cd ../agent && npm run build && cd ../codemode && npm run build && cd ../mcp && npm run build && cd ../server && npm run build && cd ../coding-agent && npm run build","build:offline":"cd packages/telemetry && npm run build && cd ../chord && npm run build && cd ../protocol && npm run build && cd ../client && npm run build && cd ../tui && npm run build && cd ../ai && npm run build:offline && cd ../agent && npm run build && cd ../codemode && npm run build && cd ../mcp && npm run build && cd ../server && npm run build && cd ../coding-agent && npm run build",dev:'concurrently --names "ai,agent,coding-agent,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/server && 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":"","test:models":"node scripts/test-models.mjs","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:{"@types/better-sqlite3":"^7.6.13","@types/lodash.mergewith":"^4.6.9","@types/turndown":"^5.0.6",concurrently:"^9.2.3","fast-xml-parser":"^5.9.3",jiti:"2.7.0",psadk:"^1.5.1",turbo:"^2.9.18",vitest:"^4.1.11","@anthropic-ai/sandbox-runtime":"0.0.26","@biomejs/biome":"2.3.5","@types/node":"22.19.19","@typescript/native-preview":"7.0.0-dev.20260120.1",esbuild:"0.28.2",husky:"9.1.7",shx:"0.4.0",tsx:"4.22.1",typescript:"5.9.3"},engines:{node:">=20.0.0"},slingVersion:"3.5.
|
|
576
|
+
`))},flush(r){i&&r.enqueue(n.encode(t(i)))}})}function Jb(t,e,n,i){return async(r,o)=>{let s=await t(r,o);if(!s.ok||!s.body)return s;let a=s.headers.get("content-type")??"";if(a.includes("event-stream"))return iP(s.body.pipeThrough(aSe(i)),s);if(!a.includes("json"))return s;let l=await s.text();if(!l.includes(e))return iP(l,s);let c=n(l);return iP(c??l,s)}}var xG="_input_tokens";function yG(t){if(!t)return!1;let e=t.prompt_tokens_details??{},n=e.cached_tokens??t.cache_read_input_tokens,i=e.cache_write_tokens??t.cache_creation_input_tokens;return n===e.cached_tokens&&i===e.cache_write_tokens?!1:(t.prompt_tokens_details={...e,cached_tokens:n??0,cache_write_tokens:i??0},!0)}function vG(t){let e=yG(t?.usage);for(let n of t?.choices??[])yG(n?.usage)&&(e=!0);return e}function lSe(t){if(!t.startsWith("data: ")||!t.includes(xG))return t;try{let e=JSON.parse(t.slice(6));return vG(e)?`data: ${JSON.stringify(e)}`:t}catch{return t}}function bG(t=globalThis.fetch){return Jb(t,xG,e=>{try{let n=JSON.parse(e);return vG(n)?JSON.stringify(n):null}catch{return null}},lSe)}var Yb=null,rP=null;function Cd(){return Yb}function SG(){Yb=null,rP=null}function cSe(t){Yb=(Yb??0)+t,rP=t}var wG='"usage"';function TG(t){if(!t||typeof t!="object")return;let n=t.usage;if(n&&typeof n=="object"){let i=n.cost;if(i&&typeof i=="object"){let r=i.totalCost;typeof r=="number"&&Number.isFinite(r)&&cSe(r)}}}function uSe(t){if(!t.startsWith("data: ")||!t.includes(wG))return t;try{TG(JSON.parse(t.slice(6)))}catch{}return t}function CG(t=globalThis.fetch){let e=Jb(t,wG,n=>{try{TG(JSON.parse(n))}catch{}return null},uSe);return async(n,i)=>(rP=null,e(n,i))}var pSe=["patternProperties"];function dSe(t){return typeof t=="string"&&t.toLowerCase().includes("gemini")}function oP(t){if(Array.isArray(t)){let i=!1;for(let r of t)oP(r)&&(i=!0);return i}if(typeof t!="object"||t===null)return!1;let e=!1,n=t;for(let i of pSe)i in n&&(delete n[i],e=!0);for(let i of Object.values(n))oP(i)&&(e=!0);return e}function MG(t){if(typeof t!="object"||t===null)return!1;let{model:e,tools:n}=t;return!dSe(e)||!Array.isArray(n)?!1:oP(n)}function kG(t,{api:e,userToken:n,appToken:i,appContext:r,claudeCacheControl:o}){if(t["X-App-Authorization"]=`Bearer ${i}`,t["x-app-context"]=Buffer.from(JSON.stringify(r)).toString("base64"),e==="anthropic-messages"){t.Authorization=`Bearer ${n}`,t["X-Api-Key"]=null;return}t["x-claude-cache-control"]=o}Um();oi();import cc from"node:fs";import mSe from"node:path";var hSe="auth.json",sP="slingshot",gSe=3e4,fSe=2e3,ySe=50,xSe=t=>new Promise(e=>setTimeout(e,t));async function vSe(t){let e=`${t}.lock`,n=Date.now()+fSe;for(;;)try{return cc.mkdirSync(e),()=>{try{cc.rmdirSync(e)}catch{}}}catch(i){if(i.code!=="EEXIST")throw i;try{if(Date.now()-cc.statSync(e).mtimeMs>gSe){cc.rmdirSync(e);continue}}catch{}if(Date.now()>=n)return null;await xSe(ySe)}}async function bSe(){let t=mSe.resolve(ke(),hSe),e=null;try{if(!cc.existsSync(t))return;if(e=await vSe(t),!e){Me(`client-state: could not lock ${t}; leaving stored credential in place`);return}let n=cc.readFileSync(t,"utf-8"),i=JSON.parse(n);if(!i||typeof i!="object"||Array.isArray(i)||!(sP in i))return;delete i[sP],cc.writeFileSync(t,JSON.stringify(i,null,2),"utf-8"),Me(`client-state: cleared "${sP}" credential from ${t}`)}catch(n){ut("client-state: failed to clear stored user credential",n)}finally{e?.()}}async function jg(){Bg(),await bSe(),Me("client-state: reset complete")}var Xb={name:"slingshot.cli",private:!0,type:"module",workspaces:["packages/*"],scripts:{clean:"npm run clean --workspaces",build:"cd packages/telemetry && npm run build && cd ../chord && npm run build && cd ../protocol && npm run build && cd ../client && npm run build && cd ../tui && npm run build && cd ../ai && npm run build && cd ../agent && npm run build && cd ../codemode && npm run build && cd ../mcp && npm run build && cd ../server && npm run build && cd ../coding-agent && npm run build","build:offline":"cd packages/telemetry && npm run build && cd ../chord && npm run build && cd ../protocol && npm run build && cd ../client && npm run build && cd ../tui && npm run build && cd ../ai && npm run build:offline && cd ../agent && npm run build && cd ../codemode && npm run build && cd ../mcp && npm run build && cd ../server && npm run build && cd ../coding-agent && npm run build",dev:'concurrently --names "ai,agent,coding-agent,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/server && 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":"","test:models":"node scripts/test-models.mjs","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:{"@types/better-sqlite3":"^7.6.13","@types/lodash.mergewith":"^4.6.9","@types/turndown":"^5.0.6",concurrently:"^9.2.3","fast-xml-parser":"^5.9.3",jiti:"2.7.0",psadk:"^1.5.1",turbo:"^2.9.18",vitest:"^4.1.11","@anthropic-ai/sandbox-runtime":"0.0.26","@biomejs/biome":"2.3.5","@types/node":"22.19.19","@typescript/native-preview":"7.0.0-dev.20260120.1",esbuild:"0.28.2",husky:"9.1.7",shx:"0.4.0",tsx:"4.22.1",typescript:"5.9.3"},engines:{node:">=20.0.0"},slingVersion:"3.5.20261026-1",overrides:{rimraf:"6.1.2",gaxios:{rimraf:"6.1.2"},postcss:"8.5.28",next:{postcss:"8.5.28"},"ip-address":"10.7.4","fast-uri":"3.1.8","brace-expansion":"5.0.12","proxy-addr":"2.0.8",undici:"8.12.2","@modelcontextprotocol/sdk":"^1.32.0",ai:">=5.0.52","fast-xml-parser":"^5.9.3","@aws-sdk/xml-builder":{"fast-xml-parser":"^5.9.3"},"adaptivecards-templating":{"adaptive-expressions":{"fast-xml-parser":"^5.5.8"}},picomatch:"^4.0.4","path-to-regexp":"8.4.1",router:{"path-to-regexp":"8.4.1"},minimatch:"^10.2.3",tar:"7.5.22",react:"19.1.1","react-dom":"19.1.1","@types/react":"19","@types/react-dom":"19",tailwindcss:"4.1.12",lightningcss:"1.30.2",glob:{".":"13.0.6",minimatch:"10.2.3"},prismjs:"^1.30.0",qs:"6.16.1","shell-quote":"1.9.0","@hono/node-server":"1.19.15",protobufjs:"^8.8.0","@opentelemetry/otlp-transformer":{protobufjs:"^8.8.0"},langchain:{langsmith:">=0.7.0"},hono:"4.13.7",fsevents:"^2.3.3",swiper:"^12.1.2",lodash:"^4.18.0","lodash-es":"^4.18.1",axios:"^1.20.0","ibm-cloud-sdk-core":"^5.4.11",dompurify:">=3.4.15","react-markdown-mermaid":{mermaid:"10.9.8"}},dependencies:{"@modelcontextprotocol/sdk":"^1.32.0","@mozilla/readability":"^0.6.0","better-sqlite3":"^12.11.1","compound-engineering-pi":"^0.2.4","get-east-asian-width":"^1.4.0",linkedom:"^0.18.12",turndown:"^7.2.4",unpdf:"^1.6.2"}};import Hg from"chalk";function RG(t,e){return{render(n){let i=` \u26AC _______. __ __ .__ __. _______
|
|
577
577
|
\u274D \xB7 \u274D / || | | | | \\ | | / _____|
|
|
578
578
|
\u2726 \u26AC \u2726 | (----\`| | | | | \\| | | | __
|
|
579
579
|
\u26AC \xB7 \u26AC \u26AC \xB7 \u26AC \\ \\ | | | | | . \` | | | |_ |
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
2.4.1 / 2022-02-22
|
|
2
|
-
==================
|
|
3
|
-
|
|
4
|
-
* Fix error on early async hooks implementations
|
|
5
|
-
|
|
6
|
-
2.4.0 / 2022-02-21
|
|
7
|
-
==================
|
|
8
|
-
|
|
9
|
-
* Prevent loss of async hooks context
|
|
10
|
-
|
|
11
|
-
2.3.0 / 2015-05-26
|
|
12
|
-
==================
|
|
13
|
-
|
|
14
|
-
* Add defined behavior for HTTP `CONNECT` requests
|
|
15
|
-
* Add defined behavior for HTTP `Upgrade` requests
|
|
16
|
-
* deps: ee-first@1.1.1
|
|
17
|
-
|
|
18
|
-
2.2.1 / 2015-04-22
|
|
19
|
-
==================
|
|
20
|
-
|
|
21
|
-
* Fix `isFinished(req)` when data buffered
|
|
22
|
-
|
|
23
|
-
2.2.0 / 2014-12-22
|
|
24
|
-
==================
|
|
25
|
-
|
|
26
|
-
* Add message object to callback arguments
|
|
27
|
-
|
|
28
|
-
2.1.1 / 2014-10-22
|
|
29
|
-
==================
|
|
30
|
-
|
|
31
|
-
* Fix handling of pipelined requests
|
|
32
|
-
|
|
33
|
-
2.1.0 / 2014-08-16
|
|
34
|
-
==================
|
|
35
|
-
|
|
36
|
-
* Check if `socket` is detached
|
|
37
|
-
* Return `undefined` for `isFinished` if state unknown
|
|
38
|
-
|
|
39
|
-
2.0.0 / 2014-08-16
|
|
40
|
-
==================
|
|
41
|
-
|
|
42
|
-
* Add `isFinished` function
|
|
43
|
-
* Move to `jshttp` organization
|
|
44
|
-
* Remove support for plain socket argument
|
|
45
|
-
* Rename to `on-finished`
|
|
46
|
-
* Support both `req` and `res` as arguments
|
|
47
|
-
* deps: ee-first@1.0.5
|
|
48
|
-
|
|
49
|
-
1.2.2 / 2014-06-10
|
|
50
|
-
==================
|
|
51
|
-
|
|
52
|
-
* Reduce listeners added to emitters
|
|
53
|
-
- avoids "event emitter leak" warnings when used multiple times on same request
|
|
54
|
-
|
|
55
|
-
1.2.1 / 2014-06-08
|
|
56
|
-
==================
|
|
57
|
-
|
|
58
|
-
* Fix returned value when already finished
|
|
59
|
-
|
|
60
|
-
1.2.0 / 2014-06-05
|
|
61
|
-
==================
|
|
62
|
-
|
|
63
|
-
* Call callback when called on already-finished socket
|
|
64
|
-
|
|
65
|
-
1.1.4 / 2014-05-27
|
|
66
|
-
==================
|
|
67
|
-
|
|
68
|
-
* Support node.js 0.8
|
|
69
|
-
|
|
70
|
-
1.1.3 / 2014-04-30
|
|
71
|
-
==================
|
|
72
|
-
|
|
73
|
-
* Make sure errors passed as instanceof `Error`
|
|
74
|
-
|
|
75
|
-
1.1.2 / 2014-04-18
|
|
76
|
-
==================
|
|
77
|
-
|
|
78
|
-
* Default the `socket` to passed-in object
|
|
79
|
-
|
|
80
|
-
1.1.1 / 2014-01-16
|
|
81
|
-
==================
|
|
82
|
-
|
|
83
|
-
* Rename module to `finished`
|
|
84
|
-
|
|
85
|
-
1.1.0 / 2013-12-25
|
|
86
|
-
==================
|
|
87
|
-
|
|
88
|
-
* Call callback when called on already-errored socket
|
|
89
|
-
|
|
90
|
-
1.0.1 / 2013-12-20
|
|
91
|
-
==================
|
|
92
|
-
|
|
93
|
-
* Actually pass the error to the callback
|
|
94
|
-
|
|
95
|
-
1.0.0 / 2013-12-20
|
|
96
|
-
==================
|
|
97
|
-
|
|
98
|
-
* Initial release
|