@caplets/core 0.28.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as __exportAll } from "./rolldown-runtime-CE-6LUnI.js";
|
|
2
|
-
import { Dt as loadConfigWithSources, cn as resolveCapletsRoot, dn as resolveProjectConfigPath, en as DEFAULT_AUTH_DIR, ln as resolveConfigPath, tn as DEFAULT_COMPLETION_CACHE_DIR } from "./service-
|
|
2
|
+
import { Dt as loadConfigWithSources, cn as resolveCapletsRoot, dn as resolveProjectConfigPath, en as DEFAULT_AUTH_DIR, ln as resolveConfigPath, tn as DEFAULT_COMPLETION_CACHE_DIR } from "./service-B6YvNthO.js";
|
|
3
3
|
import { d as CapletsError } from "./validation-CWzd2gtn.js";
|
|
4
4
|
import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { dirname, join } from "node:path";
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { $ as redactCodeModeLogText, $n as getParseErrorMessage, $t as readTokenBundle, A as resolveRemoteMode, An as GetPromptRequestSchema, At as loadProjectConfig, Bn as LoggingLevelSchema, Bt as discoverCapletFiles, C as CapletsCloudClient, Cn as CreateMessageResultSchema, Ct as ServerRegistry, D as normalizeRemoteProfileHostUrl, Dn as ElicitResultSchema, Dt as loadConfigWithSources, E as isCapletsCloudUrl, Et as loadConfig, F as resolveCapletsServer, Fn as ListPromptsRequestSchema, Ft as FileVaultStore, G as runCodeMode, Gn as assertCompleteRequestPrompt, Gt as markdownStructuredContent, H as codeModeRunInputSchema, Hn as ReadResourceRequestSchema, Ht as loadCapletFilesFromMap, I as nativeCapletPromptGuidance, In as ListResourceTemplatesRequestSchema, It as VAULT_MAX_VALUE_BYTES, J as diagnoseCodeModeTypeScript, Jn as isJSONRPCErrorResponse, Jt as runOAuthFlow, K as CodeModeSessionManager, Kn as assertCompleteRequestResourceTemplate, Kt as refreshOAuthTokenBundle, L as nativeCapletToolDescription, Ln as ListResourcesRequestSchema, Lt as validateVaultKeyName, M as controlUrlForBase, Mn as InitializedNotificationSchema, Mt as vaultBootstrapResolver, N as isLoopbackHost, Nn as JSONRPCMessageSchema, Nt as vaultResolverForAuthDir, O as resolveCapletsRemote, On as EmptyResultSchema, Ot as loadGlobalConfig, P as parseServerBaseUrl, Pn as LATEST_PROTOCOL_VERSION, Pt as vaultStoreForAuthDir, Q as CodeModeLogStore, Qn as getObjectShape, Qt as isTokenBundleExpired, R as nativeCapletToolName, Rn as ListRootsResultSchema, Rt as decryptVaultValue, S as buildProjectSyncManifest, Sn as CompleteRequestSchema, St as handleServerTool, T as hostedCloudWorkspaceFromRemoteUrl, Tn as CreateTaskResultSchema, Tt as GoogleDiscoveryManager, U as codeModeRunParamsSchema, Un as SUPPORTED_PROTOCOL_VERSIONS, Ut as hasRenderableStructuredContent, Vn as McpError, Vt as validateCapletFile, W as emptyCodeModeRunMeta, Wn as SetLevelRequestSchema, Wt as markdownCallToolResultContent, X as listCodeModeCallableCaplets, Xn as isJSONRPCResultResponse, Xt as startOAuthFlow, Y as createCodeModeCapletsApi, Yn as isJSONRPCRequest, Yt as startGenericOAuthFlow, Z as CodeModeJournalStore, Zn as getLiteralValue, Zt as deleteTokenBundle, _ as attachErrorResponse, _n as Protocol, _t as rotateTelemetryIdentity, a as CloudAuthStore, an as defaultConfigPath, ar as safeParse, at as version, b as invokeAttachExport, bn as CallToolRequestSchema, bt as findProjectRoot, c as redactedCloudAuthStatus, cn as resolveCapletsRoot, ct as buildProductTelemetryEvent, d as projectBindingError, dn as resolveProjectConfigPath, dt as maybePrintTelemetryNotice, en as DEFAULT_AUTH_DIR, er as getSchemaDescription, et as codeModeDeclarationHash, f as projectBindingRecovery, fn as ReadBuffer, ft as resolveTelemetryState, g as CAPLETS_ATTACH_SESSION_HEADER, gn as AjvJsonSchemaValidator, gt as readTelemetryNotice, hn as assertToolsCallTaskCapability, ht as readTelemetryIdentity, i as createRemoteProfileStore, in as defaultConfigBaseDir, ir as objectFromShape, it as CapletsEngine, j as appendBasePath, jn as InitializeRequestSchema, jt as parseConfig, k as resolveHostedCloudRemote, kn as ErrorCode, kt as loadLocalOverlayConfigWithSources, l as PROJECT_BINDING_ERROR_CODES, ln as resolveConfigPath, lt as buildReliabilityTelemetryEvent, mn as assertClientRequestTaskCapability, mt as readTelemetryDeliveryHealth, n as resolveRemoteSelection, nn as DEFAULT_OBSERVED_OUTPUT_SHAPE_CACHE_DIR, nr as isZ4Schema, nt as generateCodeModeRunToolDescription, o as cloudAuthPath, on as defaultStateBaseDir, or as safeParseAsync, ot as createTelemetryDispatcher, p as CloudAuthClient, pn as serializeMessage, pt as deleteTelemetryIdentity, q as QuickJsCodeModeSandbox, qn as isInitializeRequest, qt as runGenericOAuthFlow, r as cloudCredentialsFromRemoteProfile, rn as defaultCacheBaseDir, rr as normalizeObjectSchema, rt as minifyCodeModeDeclarationText, s as migrateCredentials, sn as defaultTelemetryStateDir, st as TelemetryDebugSink, t as createNativeCapletsService, tr as isSchemaOptional, tt as generateCodeModeDeclarations, u as ProjectBindingError, un as resolveProjectCapletsRoot, ut as durationBucket, v as buildAttachProjection, vn as mergeCapabilities, vt as resolveExposure, wn as CreateMessageResultWithToolsSchema, wt as capabilityDescription, x as invokeNativeAttachExport, xn as CallToolResultSchema, xt as fingerprintProjectRoot, y as buildNativeAttachProjection, yn as toJsonSchemaCompat, yt as decodeDirectResourceUri, zn as ListToolsRequestSchema, zt as encryptVaultValue } from "./service-
|
|
1
|
+
import { $ as redactCodeModeLogText, $n as getParseErrorMessage, $t as readTokenBundle, A as resolveRemoteMode, An as GetPromptRequestSchema, At as loadProjectConfig, Bn as LoggingLevelSchema, Bt as discoverCapletFiles, C as CapletsCloudClient, Cn as CreateMessageResultSchema, Ct as ServerRegistry, D as normalizeRemoteProfileHostUrl, Dn as ElicitResultSchema, Dt as loadConfigWithSources, E as isCapletsCloudUrl, Et as loadConfig, F as resolveCapletsServer, Fn as ListPromptsRequestSchema, Ft as FileVaultStore, G as runCodeMode, Gn as assertCompleteRequestPrompt, Gt as markdownStructuredContent, H as codeModeRunInputSchema, Hn as ReadResourceRequestSchema, Ht as loadCapletFilesFromMap, I as nativeCapletPromptGuidance, In as ListResourceTemplatesRequestSchema, It as VAULT_MAX_VALUE_BYTES, J as diagnoseCodeModeTypeScript, Jn as isJSONRPCErrorResponse, Jt as runOAuthFlow, K as CodeModeSessionManager, Kn as assertCompleteRequestResourceTemplate, Kt as refreshOAuthTokenBundle, L as nativeCapletToolDescription, Ln as ListResourcesRequestSchema, Lt as validateVaultKeyName, M as controlUrlForBase, Mn as InitializedNotificationSchema, Mt as vaultBootstrapResolver, N as isLoopbackHost, Nn as JSONRPCMessageSchema, Nt as vaultResolverForAuthDir, O as resolveCapletsRemote, On as EmptyResultSchema, Ot as loadGlobalConfig, P as parseServerBaseUrl, Pn as LATEST_PROTOCOL_VERSION, Pt as vaultStoreForAuthDir, Q as CodeModeLogStore, Qn as getObjectShape, Qt as isTokenBundleExpired, R as nativeCapletToolName, Rn as ListRootsResultSchema, Rt as decryptVaultValue, S as buildProjectSyncManifest, Sn as CompleteRequestSchema, St as handleServerTool, T as hostedCloudWorkspaceFromRemoteUrl, Tn as CreateTaskResultSchema, Tt as GoogleDiscoveryManager, U as codeModeRunParamsSchema, Un as SUPPORTED_PROTOCOL_VERSIONS, Ut as hasRenderableStructuredContent, Vn as McpError, Vt as validateCapletFile, W as emptyCodeModeRunMeta, Wn as SetLevelRequestSchema, Wt as markdownCallToolResultContent, X as listCodeModeCallableCaplets, Xn as isJSONRPCResultResponse, Xt as startOAuthFlow, Y as createCodeModeCapletsApi, Yn as isJSONRPCRequest, Yt as startGenericOAuthFlow, Z as CodeModeJournalStore, Zn as getLiteralValue, Zt as deleteTokenBundle, _ as attachErrorResponse, _n as Protocol, _t as rotateTelemetryIdentity, a as CloudAuthStore, an as defaultConfigPath, ar as safeParse, at as version, b as invokeAttachExport, bn as CallToolRequestSchema, bt as findProjectRoot, c as redactedCloudAuthStatus, cn as resolveCapletsRoot, ct as buildProductTelemetryEvent, d as projectBindingError, dn as resolveProjectConfigPath, dt as maybePrintTelemetryNotice, en as DEFAULT_AUTH_DIR, er as getSchemaDescription, et as codeModeDeclarationHash, f as projectBindingRecovery, fn as ReadBuffer, ft as resolveTelemetryState, g as CAPLETS_ATTACH_SESSION_HEADER, gn as AjvJsonSchemaValidator, gt as readTelemetryNotice, hn as assertToolsCallTaskCapability, ht as readTelemetryIdentity, i as createRemoteProfileStore, in as defaultConfigBaseDir, ir as objectFromShape, it as CapletsEngine, j as appendBasePath, jn as InitializeRequestSchema, jt as parseConfig, k as resolveHostedCloudRemote, kn as ErrorCode, kt as loadLocalOverlayConfigWithSources, l as PROJECT_BINDING_ERROR_CODES, ln as resolveConfigPath, lt as buildReliabilityTelemetryEvent, mn as assertClientRequestTaskCapability, mt as readTelemetryDeliveryHealth, n as resolveRemoteSelection, nn as DEFAULT_OBSERVED_OUTPUT_SHAPE_CACHE_DIR, nr as isZ4Schema, nt as generateCodeModeRunToolDescription, o as cloudAuthPath, on as defaultStateBaseDir, or as safeParseAsync, ot as createTelemetryDispatcher, p as CloudAuthClient, pn as serializeMessage, pt as deleteTelemetryIdentity, q as QuickJsCodeModeSandbox, qn as isInitializeRequest, qt as runGenericOAuthFlow, r as cloudCredentialsFromRemoteProfile, rn as defaultCacheBaseDir, rr as normalizeObjectSchema, rt as minifyCodeModeDeclarationText, s as migrateCredentials, sn as defaultTelemetryStateDir, st as TelemetryDebugSink, t as createNativeCapletsService, tr as isSchemaOptional, tt as generateCodeModeDeclarations, u as ProjectBindingError, un as resolveProjectCapletsRoot, ut as durationBucket, v as buildAttachProjection, vn as mergeCapabilities, vt as resolveExposure, wn as CreateMessageResultWithToolsSchema, wt as capabilityDescription, x as invokeNativeAttachExport, xn as CallToolResultSchema, xt as fingerprintProjectRoot, y as buildNativeAttachProjection, yn as toJsonSchemaCompat, yt as decodeDirectResourceUri, zn as ListToolsRequestSchema, zt as encryptVaultValue } from "./service-B6YvNthO.js";
|
|
2
2
|
import { _ as record, b as unknown, d as literal, m as object, n as ZodOptional, o as array, p as number, r as _enum, s as boolean, v as string, x as url } from "./schemas-BoqMu4MG.js";
|
|
3
3
|
import { a as SERVER_ID_PATTERN, d as CapletsError, m as toSafeError, p as redactSecrets$1, u as CAPLETS_ERROR_CODES } from "./validation-CWzd2gtn.js";
|
|
4
4
|
import { generatedToolInputSchema, generatedToolInputSchemaForCaplet } from "./generated-tool-input-schema.js";
|
|
5
5
|
import { f as observedOutputShapeKey, i as observeOutputShape, u as FileObservedOutputShapeStore } from "./observed-output-shapes-DuP7mJQf.js";
|
|
6
|
-
import { a as formatCapletList, c as resolveCliConfigPaths, l as cliCommands$1, n as completionScript, o as formatConfigPaths, s as listCaplets, t as completeCliWords, u as completionShells } from "./completion-
|
|
6
|
+
import { a as formatCapletList, c as resolveCliConfigPaths, l as cliCommands$1, n as completionScript, o as formatConfigPaths, s as listCaplets, t as completeCliWords, u as completionShells } from "./completion-D9253pYs.js";
|
|
7
7
|
import { n as normalizeCapletSourcePath, t as FilesystemCapletSource } from "./filesystem-Kkg32TOJ.js";
|
|
8
8
|
import { parseConfig as parseConfig$1 } from "./config-runtime.js";
|
|
9
9
|
import fs, { accessSync, chmodSync, closeSync, constants, copyFileSync, cpSync, existsSync, fstatSync, lstatSync, mkdirSync, mkdtempSync, openSync, readFileSync, readSync, readdirSync, readlinkSync, realpathSync, renameSync, rmSync, statSync, watch, writeFileSync, writeSync } from "node:fs";
|
|
@@ -7132,6 +7132,7 @@ function daemonServeArgs(options) {
|
|
|
7132
7132
|
options.path
|
|
7133
7133
|
];
|
|
7134
7134
|
if (options.auth.type === "remote_credentials" && options.remoteCredentialStateDir) args.push("--remote-state-path", options.remoteCredentialStateDir);
|
|
7135
|
+
if (options.upstreamUrl) args.push("--upstream-url", options.upstreamUrl);
|
|
7135
7136
|
if (options.allowUnauthenticatedHttp) args.push("--allow-unauthenticated-http");
|
|
7136
7137
|
if (options.trustProxy) args.push("--trust-proxy");
|
|
7137
7138
|
return args;
|
|
@@ -13294,6 +13295,7 @@ function mergeServeOptions(existing, install) {
|
|
|
13294
13295
|
...install.port !== void 0 ? { port: install.port } : existing?.serve.port ? { port: existing.serve.port } : {},
|
|
13295
13296
|
...install.path !== void 0 ? { path: install.path } : existing?.serve.path ? { path: existing.serve.path } : {},
|
|
13296
13297
|
...install.remoteStatePath !== void 0 ? { remoteStatePath: install.remoteStatePath } : existing?.serve.remoteCredentialStateDir ? { remoteStatePath: existing.serve.remoteCredentialStateDir } : {},
|
|
13298
|
+
...install.upstreamUrl !== void 0 ? { upstreamUrl: install.upstreamUrl } : existing?.serve.upstreamUrl ? { upstreamUrl: existing.serve.upstreamUrl } : {},
|
|
13297
13299
|
...install.allowUnauthenticatedHttp !== void 0 ? { allowUnauthenticatedHttp: install.allowUnauthenticatedHttp } : existing ? { allowUnauthenticatedHttp: existing.serve.allowUnauthenticatedHttp } : {},
|
|
13298
13300
|
...install.trustProxy !== void 0 ? { trustProxy: install.trustProxy } : existing ? { trustProxy: existing.serve.trustProxy } : {},
|
|
13299
13301
|
...existing && existing.serve.auth.type === "development_unauthenticated" && install.allowUnauthenticatedHttp === void 0 ? { preserveUnauthenticatedAuth: true } : {}
|
|
@@ -15468,7 +15470,7 @@ function addJsonOption(command) {
|
|
|
15468
15470
|
return command.option("--json", "print JSON output");
|
|
15469
15471
|
}
|
|
15470
15472
|
function addDaemonInstallOptions(command) {
|
|
15471
|
-
return addJsonOption(command).option("--host <host>", "HTTP bind host").option("--port <port>", "HTTP bind port").option("--path <path>", "HTTP service base path").option("--remote-state-path <path>", "server-owned remote credential state directory").option("--allow-unauthenticated-http", "allow unauthenticated HTTP serving on non-loopback hosts").option("--trust-proxy", "trust X-Forwarded-* headers from a reverse proxy").option("--reset", "rebuild daemon configuration from defaults").option("--env <KEY=VALUE>", "set an environment variable for the service", collectValues, []).option("--unset-env <KEY>", "remove an environment variable from the service", collectValues, []).option("--inherit-env", "run the service through the user's shell environment").option("--no-inherit-env", "disable shell environment inheritance").option("--dry-run", "preview actions without writing files or registering a service").option("--no-validate", "skip temporary service command validation").option("--start", "start the service after install").option("--restart", "restart the service after install").option("--no-restart", "do not restart a running service after updating config");
|
|
15473
|
+
return addJsonOption(command).option("--host <host>", "HTTP bind host").option("--port <port>", "HTTP bind port").option("--path <path>", "HTTP service base path").option("--remote-state-path <path>", "server-owned remote credential state directory").option("--upstream-url <url>", "upstream Caplets runtime URL to compose with this HTTP service").option("--allow-unauthenticated-http", "allow unauthenticated HTTP serving on non-loopback hosts").option("--trust-proxy", "trust X-Forwarded-* headers from a reverse proxy").option("--reset", "rebuild daemon configuration from defaults").option("--env <KEY=VALUE>", "set an environment variable for the service", collectValues, []).option("--unset-env <KEY>", "remove an environment variable from the service", collectValues, []).option("--inherit-env", "run the service through the user's shell environment").option("--no-inherit-env", "disable shell environment inheritance").option("--dry-run", "preview actions without writing files or registering a service").option("--no-validate", "skip temporary service command validation").option("--start", "start the service after install").option("--restart", "restart the service after install").option("--no-restart", "do not restart a running service after updating config");
|
|
15472
15474
|
}
|
|
15473
15475
|
function addServeMigrationCommand(parent, name, replacement) {
|
|
15474
15476
|
parent.command(name, { hidden: true }).allowUnknownOption(true).action(() => {
|
|
@@ -15772,6 +15774,7 @@ function daemonInstallOptions(options) {
|
|
|
15772
15774
|
...options.port !== void 0 ? { port: options.port } : {},
|
|
15773
15775
|
...options.path !== void 0 ? { path: options.path } : {},
|
|
15774
15776
|
...options.remoteStatePath !== void 0 ? { remoteStatePath: options.remoteStatePath } : {},
|
|
15777
|
+
...options.upstreamUrl !== void 0 ? { upstreamUrl: options.upstreamUrl } : {},
|
|
15775
15778
|
...options.allowUnauthenticatedHttp !== void 0 ? { allowUnauthenticatedHttp: options.allowUnauthenticatedHttp } : {},
|
|
15776
15779
|
...options.trustProxy !== void 0 ? { trustProxy: options.trustProxy } : {},
|
|
15777
15780
|
...options.reset !== void 0 ? { reset: options.reset } : {},
|
package/dist/native.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as nativeCodeModeToolId, I as nativeCapletPromptGuidance, L as nativeCapletToolDescription, R as nativeCapletToolName, V as nativeCodeModeToolName, h as createSdkRemoteCapletsClient, m as RemoteNativeCapletsService, t as createNativeCapletsService, w as resolveNativeCapletsServiceOptions, z as nativeCapletsSystemGuidance } from "./service-
|
|
1
|
+
import { B as nativeCodeModeToolId, I as nativeCapletPromptGuidance, L as nativeCapletToolDescription, R as nativeCapletToolName, V as nativeCodeModeToolName, h as createSdkRemoteCapletsClient, m as RemoteNativeCapletsService, t as createNativeCapletsService, w as resolveNativeCapletsServiceOptions, z as nativeCapletsSystemGuidance } from "./service-B6YvNthO.js";
|
|
2
2
|
import { generatedToolInputJsonSchema, generatedToolInputSchema } from "./generated-tool-input-schema.js";
|
|
3
3
|
//#region src/native/process-cleanup.ts
|
|
4
4
|
function registerNativeCapletsProcessCleanup(service, options = {}) {
|
|
@@ -64478,7 +64478,7 @@ async function defaultSentryFactory(dsn) {
|
|
|
64478
64478
|
}
|
|
64479
64479
|
//#endregion
|
|
64480
64480
|
//#region package.json
|
|
64481
|
-
var version = "0.28.
|
|
64481
|
+
var version = "0.28.1";
|
|
64482
64482
|
//#endregion
|
|
64483
64483
|
//#region src/telemetry/runtime.ts
|
|
64484
64484
|
function createRuntimeTelemetryContext(options) {
|
|
@@ -64855,7 +64855,7 @@ var CapletsEngine = class {
|
|
|
64855
64855
|
}
|
|
64856
64856
|
}
|
|
64857
64857
|
async completeCliWords(words) {
|
|
64858
|
-
const { completeCliWords } = await import("./completion-
|
|
64858
|
+
const { completeCliWords } = await import("./completion-D9253pYs.js").then((n) => n.r);
|
|
64859
64859
|
return await completeCliWords(words, {
|
|
64860
64860
|
config: this.registry.config,
|
|
64861
64861
|
managers: {
|