@psnext/slingcli 3.3.20261002-1 → 3.3.20261005-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/@modelcontextprotocol/sdk/dist/cjs/client/auth.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth.js +9 -7
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.d.ts +13 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.js +17 -4
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.d.ts +13 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.js +23 -10
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.js +63 -20
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.js +71 -29
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.js +45 -6
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.js +71 -31
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.js +61 -18
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.js +57 -19
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.js +64 -17
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.js +61 -13
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.d.ts +4 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.d.ts +17 -8
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.js +31 -14
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/bearerAuth.d.ts +9 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/bearerAuth.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/bearerAuth.js +17 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/bearerAuth.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.d.ts +12 -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 +46 -2
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/protocol.d.ts +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/protocol.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/protocol.js +39 -9
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/protocol.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/transport.d.ts +10 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/transport.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/transport.js +77 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/transport.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth.js +9 -7
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/sse.d.ts +13 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/sse.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/sse.js +18 -5
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/sse.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.d.ts +13 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js +24 -11
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/elicitationFormExample.js +63 -20
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/elicitationFormExample.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/elicitationUrlExample.js +71 -29
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/elicitationUrlExample.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/jsonResponseStreamableHttp.js +45 -6
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/jsonResponseStreamableHttp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/simpleStreamableHttp.js +71 -31
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/simpleStreamableHttp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/simpleTaskInteractive.js +61 -18
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/simpleTaskInteractive.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/sseAndStreamableHttpCompatibleServer.js +57 -19
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/sseAndStreamableHttpCompatibleServer.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/ssePollingExample.js +64 -17
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/ssePollingExample.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/standaloneSseWithGetStreamableHttp.js +61 -13
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/standaloneSseWithGetStreamableHttp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.d.ts +4 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/stores/in-memory.d.ts +17 -8
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/stores/in-memory.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/stores/in-memory.js +31 -14
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/stores/in-memory.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/middleware/bearerAuth.d.ts +9 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/middleware/bearerAuth.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/middleware/bearerAuth.js +17 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/middleware/bearerAuth.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.d.ts +12 -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 +46 -2
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.d.ts +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js +39 -9
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/transport.d.ts +10 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/transport.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/transport.js +72 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/transport.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/package.json +1 -1
- package/node_modules/hono/dist/cjs/hono-base.js +2 -0
- package/node_modules/hono/dist/cjs/middleware/language/language.js +1 -1
- package/node_modules/hono/dist/cjs/middleware/mount/index.js +71 -0
- package/node_modules/hono/dist/cjs/request.js +4 -4
- package/node_modules/hono/dist/hono-base.js +2 -0
- package/node_modules/hono/dist/middleware/mount/index.js +70 -0
- package/node_modules/hono/dist/request.js +4 -4
- package/node_modules/hono/dist/types/hono-base.d.ts +2 -0
- package/node_modules/hono/dist/types/jsx/base.d.ts +1 -1
- package/node_modules/hono/dist/types/middleware/mount/index.d.ts +46 -0
- package/node_modules/hono/dist/types/request.d.ts +4 -4
- package/node_modules/hono/package.json +9 -1
- package/package.json +3 -3
- package/slingshot/index.js +1 -1
|
@@ -188,7 +188,7 @@ var HonoRequest = class {
|
|
|
188
188
|
return this.#validatedData?.[target];
|
|
189
189
|
}
|
|
190
190
|
/**
|
|
191
|
-
* `.url
|
|
191
|
+
* `.url` can get the request url strings.
|
|
192
192
|
*
|
|
193
193
|
* @see {@link https://hono.dev/docs/api/request#url}
|
|
194
194
|
*
|
|
@@ -204,7 +204,7 @@ var HonoRequest = class {
|
|
|
204
204
|
return this.raw.url;
|
|
205
205
|
}
|
|
206
206
|
/**
|
|
207
|
-
* `.method
|
|
207
|
+
* `.method` can get the method name of the request.
|
|
208
208
|
*
|
|
209
209
|
* @see {@link https://hono.dev/docs/api/request#method}
|
|
210
210
|
*
|
|
@@ -222,7 +222,7 @@ var HonoRequest = class {
|
|
|
222
222
|
return this.#matchResult;
|
|
223
223
|
}
|
|
224
224
|
/**
|
|
225
|
-
* `.matchedRoutes
|
|
225
|
+
* `.matchedRoutes` can return a matched route in the handler
|
|
226
226
|
*
|
|
227
227
|
* @deprecated
|
|
228
228
|
*
|
|
@@ -252,7 +252,7 @@ var HonoRequest = class {
|
|
|
252
252
|
return this.#matchResult[0].map(([[, route]]) => route);
|
|
253
253
|
}
|
|
254
254
|
/**
|
|
255
|
-
*
|
|
255
|
+
* `.routePath` can retrieve the path registered within the handler
|
|
256
256
|
*
|
|
257
257
|
* @deprecated
|
|
258
258
|
*
|
|
@@ -140,6 +140,8 @@ declare class Hono<E extends Env = Env, S extends Schema = {}, BasePath extends
|
|
|
140
140
|
/**
|
|
141
141
|
* `.mount()` allows you to mount applications built with other frameworks into your Hono application.
|
|
142
142
|
*
|
|
143
|
+
* @deprecated Use `mount()` from `hono/mount` instead. `.mount()` will be removed in v5.
|
|
144
|
+
*
|
|
143
145
|
* @see {@link https://hono.dev/docs/api/hono#mount}
|
|
144
146
|
*
|
|
145
147
|
* @param {string} path - base Path
|
|
@@ -4,7 +4,7 @@ import { JSX as JSX$1 } from "./intrinsic-elements.js";
|
|
|
4
4
|
import { Context } from "./context.js";
|
|
5
5
|
//#region src/jsx/base.d.ts
|
|
6
6
|
export type Props = Record<string, any>;
|
|
7
|
-
type FunctionComponentResult = HtmlEscapedString | Child[] | Promise<HtmlEscapedString | Child[]> | null;
|
|
7
|
+
type FunctionComponentResult = HtmlEscapedString | JSXNode | Child[] | Promise<HtmlEscapedString | JSXNode | Child[]> | null;
|
|
8
8
|
export type FC<P = Props> = {
|
|
9
9
|
(props: P): FunctionComponentResult;
|
|
10
10
|
defaultProps?: Partial<P> | undefined;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { MiddlewareHandler } from "../../types.js";
|
|
2
|
+
import { Context } from "../../context.js";
|
|
3
|
+
//#region src/middleware/mount/index.d.ts
|
|
4
|
+
type ApplicationHandler = (request: Request, ...args: any) => Response | Promise<Response>;
|
|
5
|
+
type MountOptionHandler = (c: Context) => unknown;
|
|
6
|
+
type MountReplaceRequest = (originalRequest: Request) => Request;
|
|
7
|
+
type MountOptions = MountOptionHandler | {
|
|
8
|
+
optionHandler?: MountOptionHandler;
|
|
9
|
+
replaceRequest?: MountReplaceRequest | false;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* `mount()` allows you to mount applications built with other frameworks into your Hono application.
|
|
13
|
+
*
|
|
14
|
+
* @see {@link https://hono.dev/docs/api/hono#mount}
|
|
15
|
+
*
|
|
16
|
+
* @param {Function} applicationHandler - other Request Handler
|
|
17
|
+
* @param {MountOptions} [options] - options of `mount()`
|
|
18
|
+
* @returns {MiddlewareHandler} handler to register with `app.all()`
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* import { Router as IttyRouter } from 'itty-router'
|
|
23
|
+
* import { Hono } from 'hono'
|
|
24
|
+
* import { mount } from 'hono/mount'
|
|
25
|
+
* // Create itty-router application
|
|
26
|
+
* const ittyRouter = IttyRouter()
|
|
27
|
+
* // GET /itty-router/hello
|
|
28
|
+
* ittyRouter.get('/hello', () => new Response('Hello from itty-router'))
|
|
29
|
+
*
|
|
30
|
+
* const app = new Hono()
|
|
31
|
+
* app.all('/itty-router/*', mount(ittyRouter.handle))
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* const app = new Hono()
|
|
37
|
+
* // Send the request to another application without modification.
|
|
38
|
+
* app.all('/app/*', mount(anotherApp, {
|
|
39
|
+
* replaceRequest: (req) => req,
|
|
40
|
+
* }))
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare const mount: (applicationHandler: ApplicationHandler, options?: MountOptions) => MiddlewareHandler;
|
|
44
|
+
//#endregion
|
|
45
|
+
export type { ApplicationHandler, MountOptionHandler, MountOptions, MountReplaceRequest };
|
|
46
|
+
export {};
|
|
@@ -217,7 +217,7 @@ export declare class HonoRequest<P extends string = '/', I extends Input['out']
|
|
|
217
217
|
*/
|
|
218
218
|
valid<T extends keyof I & keyof ValidationTargets>(target: T): InputToDataByTarget<I, T>;
|
|
219
219
|
/**
|
|
220
|
-
* `.url
|
|
220
|
+
* `.url` can get the request url strings.
|
|
221
221
|
*
|
|
222
222
|
* @see {@link https://hono.dev/docs/api/request#url}
|
|
223
223
|
*
|
|
@@ -231,7 +231,7 @@ export declare class HonoRequest<P extends string = '/', I extends Input['out']
|
|
|
231
231
|
*/
|
|
232
232
|
get url(): string;
|
|
233
233
|
/**
|
|
234
|
-
* `.method
|
|
234
|
+
* `.method` can get the method name of the request.
|
|
235
235
|
*
|
|
236
236
|
* @see {@link https://hono.dev/docs/api/request#method}
|
|
237
237
|
*
|
|
@@ -245,7 +245,7 @@ export declare class HonoRequest<P extends string = '/', I extends Input['out']
|
|
|
245
245
|
get method(): string;
|
|
246
246
|
get [GET_MATCH_RESULT](): Result<[unknown, RouterRoute]>;
|
|
247
247
|
/**
|
|
248
|
-
* `.matchedRoutes
|
|
248
|
+
* `.matchedRoutes` can return a matched route in the handler
|
|
249
249
|
*
|
|
250
250
|
* @deprecated
|
|
251
251
|
*
|
|
@@ -273,7 +273,7 @@ export declare class HonoRequest<P extends string = '/', I extends Input['out']
|
|
|
273
273
|
*/
|
|
274
274
|
get matchedRoutes(): RouterRoute[];
|
|
275
275
|
/**
|
|
276
|
-
*
|
|
276
|
+
* `.routePath` can retrieve the path registered within the handler
|
|
277
277
|
*
|
|
278
278
|
* @deprecated
|
|
279
279
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hono",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.13",
|
|
4
4
|
"description": "Web framework built on Web Standards",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -103,6 +103,11 @@
|
|
|
103
103
|
"import": "./dist/helper/route/index.js",
|
|
104
104
|
"require": "./dist/cjs/helper/route/index.js"
|
|
105
105
|
},
|
|
106
|
+
"./mount": {
|
|
107
|
+
"types": "./dist/types/middleware/mount/index.d.ts",
|
|
108
|
+
"import": "./dist/middleware/mount/index.js",
|
|
109
|
+
"require": "./dist/cjs/middleware/mount/index.js"
|
|
110
|
+
},
|
|
106
111
|
"./cookie": {
|
|
107
112
|
"types": "./dist/types/helper/cookie/index.d.ts",
|
|
108
113
|
"import": "./dist/helper/cookie/index.js",
|
|
@@ -457,6 +462,9 @@
|
|
|
457
462
|
"route": [
|
|
458
463
|
"./dist/types/helper/route"
|
|
459
464
|
],
|
|
465
|
+
"mount": [
|
|
466
|
+
"./dist/types/middleware/mount"
|
|
467
|
+
],
|
|
460
468
|
"cookie": [
|
|
461
469
|
"./dist/types/helper/cookie"
|
|
462
470
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@psnext/slingcli",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.20261005-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.3.
|
|
33
|
+
"slingVersion": "3.3.20261005-1",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@earendil-works/pi-tui": "file:../.sling-pack/earendil-works-pi-tui-0.87.1.tgz",
|
|
36
36
|
"@earendil-works/pi-ai": "file:../.sling-pack/earendil-works-pi-ai-0.87.1.tgz",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@earendil-works/pi-server": "file:../.sling-pack/earendil-works-pi-server-0.87.1.tgz",
|
|
43
43
|
"@earendil-works/pi-client": "file:../.sling-pack/earendil-works-pi-client-0.87.1.tgz",
|
|
44
44
|
"@earendil-works/pi-protocol": "file:../.sling-pack/earendil-works-pi-protocol-0.87.1.tgz",
|
|
45
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
45
|
+
"@modelcontextprotocol/sdk": "^1.32.0",
|
|
46
46
|
"undici": "^7.19.1",
|
|
47
47
|
"semver": "^7.6.0"
|
|
48
48
|
},
|
package/slingshot/index.js
CHANGED
|
@@ -414,7 +414,7 @@ ${JSON.stringify(e,null,2)}
|
|
|
414
414
|
`,"utf-8"),me(`default-model: recorded ${e}/${n}`)),!0)}catch(r){return me(`default-model: failed to record ${e}/${n}: ${jC(r)}`),!1}finally{await i?.().catch(()=>{})}}function jC(t){return t instanceof Error?t.message:String(t)}function $C(t){let e,n;async function i(){n=void 0;let r=e;e=void 0,r&&await Kle(qle(),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()},zle),n.unref?.())}),t.on("session_shutdown",async()=>{n&&clearTimeout(n),await i()})}var NC="slingshot-smart-model-attribution";function nh(t){return typeof t=="string"&&t.trim().length>0}function Ax(t){let e=new Set;for(let n of t)nh(n.family)&&n.family==="smart"&&e.add(n.id);return e}function p3(t){return{smartModelIds:new Set(t),pendingResponseModel:void 0}}function HC(t,e){t.smartModelIds=new Set(e)}function d3(t){t.pendingResponseModel=void 0}function m3(t){return t===null||typeof t!="object"||Array.isArray(t)?null:t}function h3(t,e){let n=m3(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"&&nh(o)&&t.smartModelIds.has(o)&&nh(s)&&(t.pendingResponseModel=s)}function g3(t,e){if(!nh(t.pendingResponseModel))return;let n=t.pendingResponseModel;try{e({responseModel:n})}catch{}finally{t.pendingResponseModel=void 0}}function f3(t){let e=m3(t);return e===null?!1:nh(e.responseModel)}ne();function x3(t,e){let n;try{if(t===null||typeof t!="object")return;n=t.responseModel}catch{return}let i={responseModel:n};if(!f3(i))return;let r=i.responseModel.replace(/[\x00-\x1f\x7f-\x9f]/g,"").trim();if(r.length!==0)return new I(e.fg("dim",`Model used: ${r}`),0,0)}function zC(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 Vle(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(`
|
|
415
415
|
`);i=s.pop()??"",s.length>0&&o.enqueue(n.encode(`${s.map(t).join(`
|
|
416
416
|
`)}
|
|
417
|
-
`))},flush(r){i&&r.enqueue(n.encode(t(i)))}})}function Px(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 zC(s.body.pipeThrough(Vle(i)),s);if(!a.includes("json"))return s;let l=await s.text();if(!l.includes(e))return zC(l,s);let u=n(l);return zC(u??l,s)}}var v3="_input_tokens";function y3(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 b3(t){let e=y3(t?.usage);for(let n of t?.choices??[])y3(n?.usage)&&(e=!0);return e}function Qle(t){if(!t.startsWith("data: ")||!t.includes(v3))return t;try{let e=JSON.parse(t.slice(6));return b3(e)?`data: ${JSON.stringify(e)}`:t}catch{return t}}function w3(t=globalThis.fetch){return Px(t,v3,e=>{try{let n=JSON.parse(e);return b3(n)?JSON.stringify(n):null}catch{return null}},Qle)}var Ex=null,qC=null;function np(){return Ex}function S3(){Ex=null,qC=null}function Jle(t){Ex=(Ex??0)+t,qC=t}var T3='"usage"';function k3(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)&&Jle(r)}}}function Yle(t){if(!t.startsWith("data: ")||!t.includes(T3))return t;try{k3(JSON.parse(t.slice(6)))}catch{}return t}function C3(t=globalThis.fetch){let e=Px(t,T3,n=>{try{k3(JSON.parse(n))}catch{}return null},Yle);return async(n,i)=>(qC=null,e(n,i))}var Xle=["patternProperties"];function Zle(t){return typeof t=="string"&&t.toLowerCase().includes("gemini")}function GC(t){if(Array.isArray(t)){let i=!1;for(let r of t)GC(r)&&(i=!0);return i}if(typeof t!="object"||t===null)return!1;let e=!1,n=t;for(let i of Xle)i in n&&(delete n[i],e=!0);for(let i of Object.values(n))GC(i)&&(e=!0);return e}function M3(t){if(typeof t!="object"||t===null)return!1;let{model:e,tools:n}=t;return!Zle(e)||!Array.isArray(n)?!1:GC(n)}bd();_n();import rl from"node:fs";import eue from"node:path";var tue="auth.json",KC="slingshot",nue=3e4,iue=2e3,rue=50,oue=t=>new Promise(e=>setTimeout(e,t));async function sue(t){let e=`${t}.lock`,n=Date.now()+iue;for(;;)try{return rl.mkdirSync(e),()=>{try{rl.rmdirSync(e)}catch{}}}catch(i){if(i.code!=="EEXIST")throw i;try{if(Date.now()-rl.statSync(e).mtimeMs>nue){rl.rmdirSync(e);continue}}catch{}if(Date.now()>=n)return null;await oue(rue)}}async function aue(){let t=eue.resolve(Ae(),tue),e=null;try{if(!rl.existsSync(t))return;if(e=await sue(t),!e){me(`client-state: could not lock ${t}; leaving stored credential in place`);return}let n=rl.readFileSync(t,"utf-8"),i=JSON.parse(n);if(!i||typeof i!="object"||Array.isArray(i)||!(KC in i))return;delete i[KC],rl.writeFileSync(t,JSON.stringify(i,null,2),"utf-8"),me(`client-state: cleared "${KC}" credential from ${t}`)}catch(n){Ge("client-state: failed to clear stored user credential",n)}finally{e?.()}}async function ih(){Zm(),await aue(),me("client-state: reset complete")}var Ix={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 ../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 ../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.3.
|
|
417
|
+
`))},flush(r){i&&r.enqueue(n.encode(t(i)))}})}function Px(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 zC(s.body.pipeThrough(Vle(i)),s);if(!a.includes("json"))return s;let l=await s.text();if(!l.includes(e))return zC(l,s);let u=n(l);return zC(u??l,s)}}var v3="_input_tokens";function y3(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 b3(t){let e=y3(t?.usage);for(let n of t?.choices??[])y3(n?.usage)&&(e=!0);return e}function Qle(t){if(!t.startsWith("data: ")||!t.includes(v3))return t;try{let e=JSON.parse(t.slice(6));return b3(e)?`data: ${JSON.stringify(e)}`:t}catch{return t}}function w3(t=globalThis.fetch){return Px(t,v3,e=>{try{let n=JSON.parse(e);return b3(n)?JSON.stringify(n):null}catch{return null}},Qle)}var Ex=null,qC=null;function np(){return Ex}function S3(){Ex=null,qC=null}function Jle(t){Ex=(Ex??0)+t,qC=t}var T3='"usage"';function k3(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)&&Jle(r)}}}function Yle(t){if(!t.startsWith("data: ")||!t.includes(T3))return t;try{k3(JSON.parse(t.slice(6)))}catch{}return t}function C3(t=globalThis.fetch){let e=Px(t,T3,n=>{try{k3(JSON.parse(n))}catch{}return null},Yle);return async(n,i)=>(qC=null,e(n,i))}var Xle=["patternProperties"];function Zle(t){return typeof t=="string"&&t.toLowerCase().includes("gemini")}function GC(t){if(Array.isArray(t)){let i=!1;for(let r of t)GC(r)&&(i=!0);return i}if(typeof t!="object"||t===null)return!1;let e=!1,n=t;for(let i of Xle)i in n&&(delete n[i],e=!0);for(let i of Object.values(n))GC(i)&&(e=!0);return e}function M3(t){if(typeof t!="object"||t===null)return!1;let{model:e,tools:n}=t;return!Zle(e)||!Array.isArray(n)?!1:GC(n)}bd();_n();import rl from"node:fs";import eue from"node:path";var tue="auth.json",KC="slingshot",nue=3e4,iue=2e3,rue=50,oue=t=>new Promise(e=>setTimeout(e,t));async function sue(t){let e=`${t}.lock`,n=Date.now()+iue;for(;;)try{return rl.mkdirSync(e),()=>{try{rl.rmdirSync(e)}catch{}}}catch(i){if(i.code!=="EEXIST")throw i;try{if(Date.now()-rl.statSync(e).mtimeMs>nue){rl.rmdirSync(e);continue}}catch{}if(Date.now()>=n)return null;await oue(rue)}}async function aue(){let t=eue.resolve(Ae(),tue),e=null;try{if(!rl.existsSync(t))return;if(e=await sue(t),!e){me(`client-state: could not lock ${t}; leaving stored credential in place`);return}let n=rl.readFileSync(t,"utf-8"),i=JSON.parse(n);if(!i||typeof i!="object"||Array.isArray(i)||!(KC in i))return;delete i[KC],rl.writeFileSync(t,JSON.stringify(i,null,2),"utf-8"),me(`client-state: cleared "${KC}" credential from ${t}`)}catch(n){Ge("client-state: failed to clear stored user credential",n)}finally{e?.()}}async function ih(){Zm(),await aue(),me("client-state: reset complete")}var Ix={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 ../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 ../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.3.20261005-1",overrides:{rimraf:"6.1.2",gaxios:{rimraf:"6.1.2"},postcss:"8.5.28",next:{postcss:"8.5.28"},"ip-address":"10.7.1","fast-uri":"3.1.8","brace-expansion":"5.0.12","proxy-addr":"2.0.8",undici:"8.10.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.0","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 rh from"chalk";function R3(t,e){return{render(n){let i=` \u26AC _______. __ __ .__ __. _______
|
|
418
418
|
\u274D \xB7 \u274D / || | | | | \\ | | / _____|
|
|
419
419
|
\u2726 \u26AC \u2726 | (----\`| | | | | \\| | | | __
|
|
420
420
|
\u26AC \xB7 \u26AC \u26AC \xB7 \u26AC \\ \\ | | | | | . \` | | | |_ |
|