@caplets/core 0.27.0 → 0.28.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/dist/attach/api.d.ts +8 -0
- package/dist/cli/code-mode.d.ts +3 -2
- package/dist/cli/commands.d.ts +3 -1
- package/dist/cli.d.ts +4 -0
- package/dist/code-mode/types.d.ts +1 -0
- package/dist/{completion-1wDjwHkC.js → completion-D9253pYs.js} +13 -2
- package/dist/config/paths.d.ts +9 -0
- package/dist/config.d.ts +3 -1
- package/dist/engine.d.ts +18 -0
- package/dist/esm-Db9dhnIG.js +7488 -0
- package/dist/index.js +833 -482
- package/dist/native/options.d.ts +1 -0
- package/dist/native/remote.d.ts +2 -1
- package/dist/native/service.d.ts +14 -0
- package/dist/native.js +1 -1
- package/dist/node-BgWIvSVP.js +17214 -0
- package/dist/rolldown-runtime-CE-6LUnI.js +44 -0
- package/dist/serve/http.d.ts +16 -1
- package/dist/serve/options.d.ts +2 -0
- package/dist/{service-BGGiZLHa.js → service-B6YvNthO.js} +1688 -121
- package/dist/src-Cd2QIUm1.js +813 -0
- package/dist/telemetry/context.d.ts +13 -0
- package/dist/telemetry/debug.d.ts +10 -0
- package/dist/telemetry/delivery.d.ts +1 -0
- package/dist/telemetry/events.d.ts +70 -0
- package/dist/telemetry/identity.d.ts +1 -0
- package/dist/telemetry/index.d.ts +8 -0
- package/dist/telemetry/intake.generated.d.ts +2 -0
- package/dist/telemetry/notice.d.ts +8 -0
- package/dist/telemetry/privacy.d.ts +3 -0
- package/dist/telemetry/providers.d.ts +21 -0
- package/dist/telemetry/runtime.d.ts +40 -0
- package/dist/telemetry/state.d.ts +53 -0
- package/package.json +3 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __esmMin = (fn, res, err) => () => {
|
|
10
|
+
if (err) throw err[0];
|
|
11
|
+
try {
|
|
12
|
+
return fn && (res = fn(fn = 0)), res;
|
|
13
|
+
} catch (e) {
|
|
14
|
+
throw err = [e], e;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
18
|
+
var __exportAll = (all, no_symbols) => {
|
|
19
|
+
let target = {};
|
|
20
|
+
for (var name in all) __defProp(target, name, {
|
|
21
|
+
get: all[name],
|
|
22
|
+
enumerable: true
|
|
23
|
+
});
|
|
24
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
25
|
+
return target;
|
|
26
|
+
};
|
|
27
|
+
var __copyProps = (to, from, except, desc) => {
|
|
28
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
29
|
+
key = keys[i];
|
|
30
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
31
|
+
get: ((k) => from[k]).bind(null, key),
|
|
32
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return to;
|
|
36
|
+
};
|
|
37
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
38
|
+
value: mod,
|
|
39
|
+
enumerable: true
|
|
40
|
+
}) : target, mod));
|
|
41
|
+
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
42
|
+
var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
43
|
+
//#endregion
|
|
44
|
+
export { __toCommonJS as a, __require as i, __esmMin as n, __toESM as o, __exportAll as r, __commonJSMin as t };
|
package/dist/serve/http.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { StreamableHTTPTransport } from "@hono/mcp";
|
|
2
2
|
import { Hono } from "hono";
|
|
3
3
|
import { CapletsEngine, type CapletsEngineOptions } from "../engine";
|
|
4
|
+
import { type AttachManifest, type AttachInvokeRequest, type AttachSessionMetadata } from "../attach/api";
|
|
4
5
|
import { type RemoteControlDispatchContext } from "../remote-control/dispatch";
|
|
5
6
|
import { RemoteAuthFlowStore } from "../remote-control/auth-flow";
|
|
6
7
|
import { RemoteServerCredentialStore } from "../remote/server-credential-store";
|
|
@@ -10,6 +11,8 @@ type HttpServeIo = {
|
|
|
10
11
|
control?: Omit<RemoteControlDispatchContext, "writeErr">;
|
|
11
12
|
authFlowStore?: RemoteAuthFlowStore;
|
|
12
13
|
sessionFactory?: HttpMcpSessionFactory;
|
|
14
|
+
attachSessionFactory?: HttpAttachSessionFactory;
|
|
15
|
+
defaultAttachSessionFactory?: HttpAttachSessionFactory;
|
|
13
16
|
exposeAttach?: boolean;
|
|
14
17
|
remoteCredentialStore?: RemoteServerCredentialStore;
|
|
15
18
|
};
|
|
@@ -18,12 +21,23 @@ type HttpMcpSession = {
|
|
|
18
21
|
close(): Promise<void>;
|
|
19
22
|
};
|
|
20
23
|
export type HttpMcpSessionFactory = () => HttpMcpSession | Promise<HttpMcpSession>;
|
|
24
|
+
export declare const CAPLETS_STACK_CHAIN_HEADER = "caplets-stack-chain";
|
|
25
|
+
export type HttpAttachSession = {
|
|
26
|
+
manifest(): Promise<AttachManifest>;
|
|
27
|
+
invoke(request: AttachInvokeRequest): Promise<unknown>;
|
|
28
|
+
onManifestChanged(listener: () => void): () => void;
|
|
29
|
+
close(): Promise<void>;
|
|
30
|
+
};
|
|
31
|
+
export type HttpAttachSessionContext = {
|
|
32
|
+
stackChain: string[];
|
|
33
|
+
};
|
|
34
|
+
export type HttpAttachSessionFactory = (metadata: AttachSessionMetadata, context: HttpAttachSessionContext) => HttpAttachSession | Promise<HttpAttachSession>;
|
|
21
35
|
export type CapletsHttpApp = Hono & {
|
|
22
36
|
closeCapletsSessions: () => Promise<void>;
|
|
23
37
|
};
|
|
24
38
|
export declare function createHttpServeApp(options: HttpServeOptions, engine: CapletsEngine, io?: HttpServeIo): CapletsHttpApp;
|
|
25
39
|
export declare function serveHttp(options: HttpServeOptions, engineOptions?: CapletsEngineOptions, writeErr?: (value: string) => void): Promise<void>;
|
|
26
|
-
export declare function serveHttpWithSessionFactory(options: HttpServeOptions, createSession: HttpMcpSessionFactory, writeErr?: (value: string) => void): Promise<void>;
|
|
40
|
+
export declare function serveHttpWithSessionFactory(options: HttpServeOptions, createSession: HttpMcpSessionFactory, writeErr?: (value: string) => void, io?: Pick<HttpServeIo, "attachSessionFactory" | "defaultAttachSessionFactory" | "exposeAttach">, engineOptions?: CapletsEngineOptions): Promise<void>;
|
|
27
41
|
export declare function routePath(base: string, path: string): string;
|
|
28
42
|
export declare function servicePaths(base: string): {
|
|
29
43
|
base: string;
|
|
@@ -31,6 +45,7 @@ export declare function servicePaths(base: string): {
|
|
|
31
45
|
mcp: string;
|
|
32
46
|
control: string;
|
|
33
47
|
attachManifest: string;
|
|
48
|
+
attachSessions: string;
|
|
34
49
|
attachEvents: string;
|
|
35
50
|
attachInvoke: string;
|
|
36
51
|
projectBindings: string;
|
package/dist/serve/options.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export type RawServeOptions = {
|
|
|
5
5
|
port?: string | number;
|
|
6
6
|
path?: string;
|
|
7
7
|
remoteStatePath?: string;
|
|
8
|
+
upstreamUrl?: string;
|
|
8
9
|
allowUnauthenticatedHttp?: boolean;
|
|
9
10
|
trustProxy?: boolean;
|
|
10
11
|
};
|
|
@@ -19,6 +20,7 @@ export type HttpServeOptions = {
|
|
|
19
20
|
publicOrigin?: string | undefined;
|
|
20
21
|
auth: HttpServeAuthOptions;
|
|
21
22
|
remoteCredentialStateDir?: string | undefined;
|
|
23
|
+
upstreamUrl?: string | undefined;
|
|
22
24
|
allowUnauthenticatedHttp: boolean;
|
|
23
25
|
warnUnauthenticatedNetwork: boolean;
|
|
24
26
|
loopback: boolean;
|