@caplets/core 0.26.0 → 0.26.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/cli.d.ts CHANGED
@@ -24,4 +24,9 @@ type CliIO = {
24
24
  readStdin?: () => Promise<string>;
25
25
  };
26
26
  export declare function runCli(args: string[], io?: CliIO): Promise<void>;
27
+ export declare const readHiddenInputForTest: typeof readHiddenInput;
28
+ declare function readHiddenInput(label: string, options?: {
29
+ input?: NodeJS.ReadableStream;
30
+ output?: Pick<NodeJS.WriteStream, "write">;
31
+ }): Promise<string>;
27
32
  export declare function createProgram(io?: CliIO): Command;
@@ -1,5 +1,5 @@
1
- import { Bn as __exportAll, Ft as DEFAULT_COMPLETION_CACHE_DIR, Ht as resolveConfigPath, Pt as DEFAULT_AUTH_DIR, Vt as resolveCapletsRoot, Wt as resolveProjectConfigPath, lt as loadConfigWithSources } from "./service-rvZ7z6FI.js";
2
- import { u as CapletsError } from "./validation-C4tYXw6G.js";
1
+ import { Hn as __exportAll, It as DEFAULT_AUTH_DIR, Kt as resolveProjectConfigPath, Lt as DEFAULT_COMPLETION_CACHE_DIR, Ut as resolveCapletsRoot, Wt as resolveConfigPath, lt as loadConfigWithSources } from "./service-aBIn4nrw.js";
2
+ import { u as CapletsError } from "./validation-GD2x5HW1.js";
3
3
  import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
4
4
  import { dirname, join } from "node:path";
5
5
  import { createHash } from "node:crypto";
@@ -1,5 +1,5 @@
1
1
  import { _ as record, b as unknown, d as literal, l as discriminatedUnion, m as object, o as array, p as number, r as _enum, s as boolean, v as string, y as union } from "./schemas-BoqMu4MG.js";
2
- import { a as isAllowedHttpBaseUrl, c as validateHttpActionHeaders, i as SERVER_ID_PATTERN, n as HEADER_NAME_PATTERN, o as isAllowedRemoteUrl, r as HTTP_BASE_URL_PATTERN, s as isUrl, t as FORBIDDEN_HEADERS, u as CapletsError } from "./validation-C4tYXw6G.js";
2
+ import { a as isAllowedHttpBaseUrl, c as validateHttpActionHeaders, i as SERVER_ID_PATTERN, n as HEADER_NAME_PATTERN, o as isAllowedRemoteUrl, r as HTTP_BASE_URL_PATTERN, s as isUrl, t as FORBIDDEN_HEADERS, u as CapletsError } from "./validation-GD2x5HW1.js";
3
3
  //#region src/config-runtime.ts
4
4
  const stringMapSchema = record(string(), string());
5
5
  const authSchema = discriminatedUnion("type", [
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Node's POSIX filesystem APIs do not treat backslashes as path separators. Tests
3
+ * sometimes emulate Windows daemon operations with POSIX temp directories, which
4
+ * `node:path.win32` renders as drive-less absolute paths such as
5
+ * `\tmp\caplets-...`. On POSIX hosts those strings would otherwise be created as
6
+ * single backslash-named entries in the current working directory.
7
+ */
8
+ export declare function daemonHostPath(path: string): string;
package/dist/errors.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const CAPLETS_ERROR_CODES: readonly ["CONFIG_NOT_FOUND", "CONFIG_EXISTS", "CONFIG_INVALID", "REQUEST_INVALID", "SERVER_NOT_FOUND", "SERVER_UNAVAILABLE", "SERVER_START_TIMEOUT", "UNKNOWN_OPERATION", "TOOL_NOT_FOUND", "TOOL_CALL_TIMEOUT", "AUTH_REQUIRED", "AUTH_FAILED", "AUTH_REFRESH_FAILED", "DOWNSTREAM_PROTOCOL_ERROR", "DOWNSTREAM_TOOL_ERROR", "UNSUPPORTED_OPERATION", "UNSUPPORTED_CAPABILITY", "PROMPT_NOT_FOUND", "DOWNSTREAM_RESOURCE_ERROR", "DOWNSTREAM_PROMPT_ERROR", "DOWNSTREAM_COMPLETION_ERROR", "ATTACH_MANIFEST_STALE", "ATTACH_EXPORT_NOT_FOUND", "UNSUPPORTED_TRANSPORT", "INTERNAL_ERROR"];
1
+ export declare const CAPLETS_ERROR_CODES: readonly ["CONFIG_NOT_FOUND", "CONFIG_EXISTS", "CONFIG_INVALID", "REQUEST_INVALID", "SERVER_NOT_FOUND", "SERVER_UNAVAILABLE", "SERVER_START_TIMEOUT", "UNKNOWN_OPERATION", "TOOL_NOT_FOUND", "TOOL_CALL_TIMEOUT", "AUTH_REQUIRED", "AUTH_FAILED", "REMOTE_CREDENTIALS_REVOKED", "AUTH_REFRESH_FAILED", "DOWNSTREAM_PROTOCOL_ERROR", "DOWNSTREAM_TOOL_ERROR", "UNSUPPORTED_OPERATION", "UNSUPPORTED_CAPABILITY", "PROMPT_NOT_FOUND", "DOWNSTREAM_RESOURCE_ERROR", "DOWNSTREAM_PROMPT_ERROR", "DOWNSTREAM_COMPLETION_ERROR", "ATTACH_MANIFEST_STALE", "ATTACH_EXPORT_NOT_FOUND", "UNSUPPORTED_TRANSPORT", "INTERNAL_ERROR"];
2
2
  export type CapletsErrorCode = (typeof CAPLETS_ERROR_CODES)[number];
3
3
  export type SafeErrorSummary = {
4
4
  code: CapletsErrorCode;