@caplets/core 0.25.0 → 0.26.0

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/native.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as nativeCapletToolDescription, M as nativeCapletsSystemGuidance, N as nativeCodeModeToolId, P as nativeCodeModeToolName, _ as resolveNativeCapletsServiceOptions, h as createSdkRemoteCapletsClient, j as nativeCapletToolName, k as nativeCapletPromptGuidance, m as RemoteNativeCapletsService, t as createNativeCapletsService } from "./service-DjwB8aiW.js";
1
+ import { A as nativeCapletPromptGuidance, F as nativeCodeModeToolName, M as nativeCapletToolName, N as nativeCapletsSystemGuidance, P as nativeCodeModeToolId, h as createSdkRemoteCapletsClient, j as nativeCapletToolDescription, m as RemoteNativeCapletsService, t as createNativeCapletsService, v as resolveNativeCapletsServiceOptions } from "./service-rvZ7z6FI.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 = {}) {
@@ -24,7 +24,7 @@ function mergeJsonShapes(left, right) {
24
24
  }
25
25
  function mergeObjects(left, right) {
26
26
  const fields = {};
27
- const keys = [...new Set([...Object.keys(left.fields), ...Object.keys(right.fields)])].sort();
27
+ const keys = [.../* @__PURE__ */ new Set([...Object.keys(left.fields), ...Object.keys(right.fields)])].sort();
28
28
  let truncated = left.truncated === true || right.truncated === true;
29
29
  const selected = keys.slice(0, OBSERVED_OUTPUT_SHAPE_LIMITS.maxObjectFields);
30
30
  truncated = truncated || keys.length > selected.length;
@@ -277,7 +277,7 @@ function mergeJsonShapes(left, right) {
277
277
  }
278
278
  function mergeObjects(left, right) {
279
279
  const fields = {};
280
- const keys = [...new Set([...Object.keys(left.fields), ...Object.keys(right.fields)])].sort();
280
+ const keys = [.../* @__PURE__ */ new Set([...Object.keys(left.fields), ...Object.keys(right.fields)])].sort();
281
281
  let truncated = left.truncated === true || right.truncated === true;
282
282
  const selected = keys.slice(0, OBSERVED_OUTPUT_SHAPE_LIMITS.maxObjectFields);
283
283
  truncated = truncated || keys.length > selected.length;
@@ -1,2 +1,2 @@
1
- import { _ as OBSERVED_OUTPUT_SHAPE_LIMITS, a as parseShapeableJsonText, c as shapeType, d as backendFingerprint, f as observedOutputShapeKey, i as observeOutputShape, l as mergeJsonShapes, m as stableHash, n as extractJsonShape, o as hasTruncatedShape, p as observedOutputShapeStorageKey, r as normalizedObservableValue, s as shapeToTypeScript, t as usefulOutputSchema, u as FileObservedOutputShapeStore, v as OBSERVED_OUTPUT_SHAPE_VERSION } from "./observed-output-shapes-D2k2-q8K.js";
1
+ import { _ as OBSERVED_OUTPUT_SHAPE_LIMITS, a as parseShapeableJsonText, c as shapeType, d as backendFingerprint, f as observedOutputShapeKey, i as observeOutputShape, l as mergeJsonShapes, m as stableHash, n as extractJsonShape, o as hasTruncatedShape, p as observedOutputShapeStorageKey, r as normalizedObservableValue, s as shapeToTypeScript, t as usefulOutputSchema, u as FileObservedOutputShapeStore, v as OBSERVED_OUTPUT_SHAPE_VERSION } from "./observed-output-shapes-DuP7mJQf.js";
2
2
  export { FileObservedOutputShapeStore, OBSERVED_OUTPUT_SHAPE_LIMITS, OBSERVED_OUTPUT_SHAPE_VERSION, backendFingerprint, extractJsonShape, hasTruncatedShape, mergeJsonShapes, normalizedObservableValue, observeOutputShape, observedOutputShapeKey, observedOutputShapeStorageKey, parseShapeableJsonText, shapeToTypeScript, shapeType, stableHash, usefulOutputSchema };
@@ -1,5 +1,5 @@
1
1
  import type { CapletsErrorCode } from "../errors";
2
- export type RemoteCliCommand = "list" | "inspect" | "check" | "tools" | "search_tools" | "describe_tool" | "call_tool" | "resources" | "search_resources" | "resource_templates" | "read_resource" | "prompts" | "search_prompts" | "get_prompt" | "complete" | "init" | "add" | "install" | "complete_cli" | "auth_login_start" | "auth_login_complete" | "auth_logout" | "auth_refresh" | "auth_list";
2
+ export type RemoteCliCommand = "list" | "inspect" | "check" | "tools" | "search_tools" | "describe_tool" | "call_tool" | "resources" | "search_resources" | "resource_templates" | "read_resource" | "prompts" | "search_prompts" | "get_prompt" | "complete" | "init" | "add" | "install" | "complete_cli" | "auth_login_start" | "auth_login_complete" | "auth_logout" | "auth_refresh" | "auth_list" | "vault_set" | "vault_list" | "vault_get" | "vault_delete" | "vault_access_grant" | "vault_access_revoke" | "vault_access_list";
3
3
  export type RemoteCliRequest = {
4
4
  command: RemoteCliCommand;
5
5
  arguments: Record<string, unknown>;
@@ -121,7 +121,10 @@ function assignProp(target, prop, value) {
121
121
  }
122
122
  function mergeDefs(...defs) {
123
123
  const mergedDescriptors = {};
124
- for (const def of defs) Object.assign(mergedDescriptors, Object.getOwnPropertyDescriptors(def));
124
+ for (const def of defs) {
125
+ const descriptors = Object.getOwnPropertyDescriptors(def);
126
+ Object.assign(mergedDescriptors, descriptors);
127
+ }
125
128
  return Object.defineProperties({}, mergedDescriptors);
126
129
  }
127
130
  function esc(str) {
@@ -1424,7 +1427,7 @@ const $ZodBoolean = /*@__PURE__*/ $constructor("$ZodBoolean", (inst, def) => {
1424
1427
  const $ZodNull = /*@__PURE__*/ $constructor("$ZodNull", (inst, def) => {
1425
1428
  $ZodType.init(inst, def);
1426
1429
  inst._zod.pattern = _null$2;
1427
- inst._zod.values = new Set([null]);
1430
+ inst._zod.values = /* @__PURE__ */ new Set([null]);
1428
1431
  inst._zod.parse = (payload, _ctx) => {
1429
1432
  const input = payload.value;
1430
1433
  if (input === null) return payload;
@@ -1575,13 +1578,13 @@ const $ZodObject = /*@__PURE__*/ $constructor("$ZodObject", (inst, def) => {
1575
1578
  }
1576
1579
  return propValues;
1577
1580
  });
1578
- const isObject$1 = isObject;
1581
+ const isObject$2 = isObject;
1579
1582
  const catchall = def.catchall;
1580
1583
  let value;
1581
1584
  inst._zod.parse = (payload, ctx) => {
1582
1585
  value ?? (value = _normalized.value);
1583
1586
  const input = payload.value;
1584
- if (!isObject$1(input)) {
1587
+ if (!isObject$2(input)) {
1585
1588
  payload.issues.push({
1586
1589
  expected: "object",
1587
1590
  code: "invalid_type",
@@ -1704,7 +1707,7 @@ const $ZodObjectJIT = /*@__PURE__*/ $constructor("$ZodObjectJIT", (inst, def) =>
1704
1707
  return (payload, ctx) => fn(shape, payload, ctx);
1705
1708
  };
1706
1709
  let fastpass;
1707
- const isObject$2 = isObject;
1710
+ const isObject$1 = isObject;
1708
1711
  const jit = !globalConfig.jitless;
1709
1712
  const fastEnabled = jit && allowsEval.value;
1710
1713
  const catchall = def.catchall;
@@ -1712,7 +1715,7 @@ const $ZodObjectJIT = /*@__PURE__*/ $constructor("$ZodObjectJIT", (inst, def) =>
1712
1715
  inst._zod.parse = (payload, ctx) => {
1713
1716
  value ?? (value = _normalized.value);
1714
1717
  const input = payload.value;
1715
- if (!isObject$2(input)) {
1718
+ if (!isObject$1(input)) {
1716
1719
  payload.issues.push({
1717
1720
  expected: "object",
1718
1721
  code: "invalid_type",
@@ -2114,7 +2117,7 @@ const $ZodOptional = /*@__PURE__*/ $constructor("$ZodOptional", (inst, def) => {
2114
2117
  inst._zod.optin = "optional";
2115
2118
  inst._zod.optout = "optional";
2116
2119
  defineLazy(inst._zod, "values", () => {
2117
- return def.innerType._zod.values ? new Set([...def.innerType._zod.values, void 0]) : void 0;
2120
+ return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, void 0]) : void 0;
2118
2121
  });
2119
2122
  defineLazy(inst._zod, "pattern", () => {
2120
2123
  const pattern = def.innerType._zod.pattern;
@@ -2148,7 +2151,7 @@ const $ZodNullable = /*@__PURE__*/ $constructor("$ZodNullable", (inst, def) => {
2148
2151
  return pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0;
2149
2152
  });
2150
2153
  defineLazy(inst._zod, "values", () => {
2151
- return def.innerType._zod.values ? new Set([...def.innerType._zod.values, null]) : void 0;
2154
+ return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, null]) : void 0;
2152
2155
  });
2153
2156
  inst._zod.parse = (payload, ctx) => {
2154
2157
  if (payload.value === null) return payload;