chat-recall 0.7.36 → 0.7.37
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/channel-detect.d.ts.map +1 -1
- package/dist/channel-detect.js +9 -0
- package/dist/channel-detect.js.map +1 -1
- package/dist/channel-state.d.ts.map +1 -1
- package/dist/channel-state.js +16 -2
- package/dist/channel-state.js.map +1 -1
- package/dist/cli.js +4 -4
- package/dist/mcp-relay.js +11 -1
- package/dist/mcp.js +1406 -610
- package/dist/message-hook.js +16 -4
- package/dist/watch.js +5 -5
- package/package.json +1 -1
package/dist/mcp.js
CHANGED
|
@@ -3020,7 +3020,7 @@ var require_tools = __commonJS({
|
|
|
3020
3020
|
stream.flushSync();
|
|
3021
3021
|
}
|
|
3022
3022
|
}
|
|
3023
|
-
function createArgsNormalizer(
|
|
3023
|
+
function createArgsNormalizer(defaultOptions2) {
|
|
3024
3024
|
return function normalizeArgs(instance, caller, opts = {}, stream) {
|
|
3025
3025
|
if (typeof opts === "string") {
|
|
3026
3026
|
stream = buildSafeSonicBoom({ dest: opts });
|
|
@@ -3046,9 +3046,9 @@ var require_tools = __commonJS({
|
|
|
3046
3046
|
}
|
|
3047
3047
|
stream = transport2({ caller, ...opts.transport, levels: customLevels });
|
|
3048
3048
|
}
|
|
3049
|
-
opts = Object.assign({},
|
|
3050
|
-
opts.serializers = Object.assign({},
|
|
3051
|
-
opts.formatters = Object.assign({},
|
|
3049
|
+
opts = Object.assign({}, defaultOptions2, opts);
|
|
3050
|
+
opts.serializers = Object.assign({}, defaultOptions2.serializers, opts.serializers);
|
|
3051
|
+
opts.formatters = Object.assign({}, defaultOptions2.formatters, opts.formatters);
|
|
3052
3052
|
if (opts.prettyPrint) {
|
|
3053
3053
|
throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");
|
|
3054
3054
|
}
|
|
@@ -4379,7 +4379,7 @@ var require_pino = __commonJS({
|
|
|
4379
4379
|
var { pid } = process;
|
|
4380
4380
|
var hostname3 = os.hostname();
|
|
4381
4381
|
var defaultErrorSerializer = stdSerializers.err;
|
|
4382
|
-
var
|
|
4382
|
+
var defaultOptions2 = {
|
|
4383
4383
|
level: "info",
|
|
4384
4384
|
levelComparison: SORTING_ORDER.ASC,
|
|
4385
4385
|
levels: DEFAULT_LEVELS,
|
|
@@ -4411,7 +4411,7 @@ var require_pino = __commonJS({
|
|
|
4411
4411
|
depthLimit: 5,
|
|
4412
4412
|
edgeLimit: 100
|
|
4413
4413
|
};
|
|
4414
|
-
var normalize = createArgsNormalizer(
|
|
4414
|
+
var normalize = createArgsNormalizer(defaultOptions2);
|
|
4415
4415
|
var serializers = Object.assign(/* @__PURE__ */ Object.create(null), stdSerializers);
|
|
4416
4416
|
function pino2(...args) {
|
|
4417
4417
|
const instance = {};
|
|
@@ -29285,7 +29285,7 @@ var init_http = __esm({
|
|
|
29285
29285
|
CLI_VERSION = JSON.parse(readFileSync44(new URL("../package.json", import.meta.url), "utf-8")).version || CLI_VERSION;
|
|
29286
29286
|
} catch {
|
|
29287
29287
|
try {
|
|
29288
|
-
if (true) CLI_VERSION = "0.7.
|
|
29288
|
+
if (true) CLI_VERSION = "0.7.37";
|
|
29289
29289
|
} catch {
|
|
29290
29290
|
}
|
|
29291
29291
|
}
|
|
@@ -29783,7 +29783,7 @@ var init_telemetry = __esm({
|
|
|
29783
29783
|
init_sync_client();
|
|
29784
29784
|
cliVersion2 = () => {
|
|
29785
29785
|
try {
|
|
29786
|
-
return true ? "0.7.
|
|
29786
|
+
return true ? "0.7.37" : "dev";
|
|
29787
29787
|
} catch {
|
|
29788
29788
|
return "dev";
|
|
29789
29789
|
}
|
|
@@ -32184,7 +32184,7 @@ var init_sync_client = __esm({
|
|
|
32184
32184
|
ownVersion = JSON.parse(readFileSync47(join56(dir, "../package.json"), "utf-8")).version || ownVersion;
|
|
32185
32185
|
} catch {
|
|
32186
32186
|
try {
|
|
32187
|
-
if (true) ownVersion = "0.7.
|
|
32187
|
+
if (true) ownVersion = "0.7.37";
|
|
32188
32188
|
} catch {
|
|
32189
32189
|
}
|
|
32190
32190
|
}
|
|
@@ -35806,6 +35806,1309 @@ function isMultiTenant() {
|
|
|
35806
35806
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
35807
35807
|
import { CallToolRequestSchema, ListToolsRequestSchema, ListResourcesRequestSchema, ListPromptsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
35808
35808
|
import { z } from "zod";
|
|
35809
|
+
|
|
35810
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/Options.js
|
|
35811
|
+
var ignoreOverride = /* @__PURE__ */ Symbol("Let zodToJsonSchema decide on which parser to use");
|
|
35812
|
+
var defaultOptions = {
|
|
35813
|
+
name: void 0,
|
|
35814
|
+
$refStrategy: "root",
|
|
35815
|
+
basePath: ["#"],
|
|
35816
|
+
effectStrategy: "input",
|
|
35817
|
+
pipeStrategy: "all",
|
|
35818
|
+
dateStrategy: "format:date-time",
|
|
35819
|
+
mapStrategy: "entries",
|
|
35820
|
+
removeAdditionalStrategy: "passthrough",
|
|
35821
|
+
allowedAdditionalProperties: true,
|
|
35822
|
+
rejectedAdditionalProperties: false,
|
|
35823
|
+
definitionPath: "definitions",
|
|
35824
|
+
target: "jsonSchema7",
|
|
35825
|
+
strictUnions: false,
|
|
35826
|
+
definitions: {},
|
|
35827
|
+
errorMessages: false,
|
|
35828
|
+
markdownDescription: false,
|
|
35829
|
+
patternStrategy: "escape",
|
|
35830
|
+
applyRegexFlags: false,
|
|
35831
|
+
emailStrategy: "format:email",
|
|
35832
|
+
base64Strategy: "contentEncoding:base64",
|
|
35833
|
+
nameStrategy: "ref",
|
|
35834
|
+
openAiAnyTypeName: "OpenAiAnyType"
|
|
35835
|
+
};
|
|
35836
|
+
var getDefaultOptions = (options) => typeof options === "string" ? {
|
|
35837
|
+
...defaultOptions,
|
|
35838
|
+
name: options
|
|
35839
|
+
} : {
|
|
35840
|
+
...defaultOptions,
|
|
35841
|
+
...options
|
|
35842
|
+
};
|
|
35843
|
+
|
|
35844
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/Refs.js
|
|
35845
|
+
var getRefs = (options) => {
|
|
35846
|
+
const _options = getDefaultOptions(options);
|
|
35847
|
+
const currentPath = _options.name !== void 0 ? [..._options.basePath, _options.definitionPath, _options.name] : _options.basePath;
|
|
35848
|
+
return {
|
|
35849
|
+
..._options,
|
|
35850
|
+
flags: { hasReferencedOpenAiAnyType: false },
|
|
35851
|
+
currentPath,
|
|
35852
|
+
propertyPath: void 0,
|
|
35853
|
+
seen: new Map(Object.entries(_options.definitions).map(([name, def]) => [
|
|
35854
|
+
def._def,
|
|
35855
|
+
{
|
|
35856
|
+
def: def._def,
|
|
35857
|
+
path: [..._options.basePath, _options.definitionPath, name],
|
|
35858
|
+
// Resolution of references will be forced even though seen, so it's ok that the schema is undefined here for now.
|
|
35859
|
+
jsonSchema: void 0
|
|
35860
|
+
}
|
|
35861
|
+
]))
|
|
35862
|
+
};
|
|
35863
|
+
};
|
|
35864
|
+
|
|
35865
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/errorMessages.js
|
|
35866
|
+
function addErrorMessage(res, key2, errorMessage, refs) {
|
|
35867
|
+
if (!refs?.errorMessages)
|
|
35868
|
+
return;
|
|
35869
|
+
if (errorMessage) {
|
|
35870
|
+
res.errorMessage = {
|
|
35871
|
+
...res.errorMessage,
|
|
35872
|
+
[key2]: errorMessage
|
|
35873
|
+
};
|
|
35874
|
+
}
|
|
35875
|
+
}
|
|
35876
|
+
function setResponseValueAndErrors(res, key2, value, errorMessage, refs) {
|
|
35877
|
+
res[key2] = value;
|
|
35878
|
+
addErrorMessage(res, key2, errorMessage, refs);
|
|
35879
|
+
}
|
|
35880
|
+
|
|
35881
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/getRelativePath.js
|
|
35882
|
+
var getRelativePath = (pathA, pathB) => {
|
|
35883
|
+
let i = 0;
|
|
35884
|
+
for (; i < pathA.length && i < pathB.length; i++) {
|
|
35885
|
+
if (pathA[i] !== pathB[i])
|
|
35886
|
+
break;
|
|
35887
|
+
}
|
|
35888
|
+
return [(pathA.length - i).toString(), ...pathB.slice(i)].join("/");
|
|
35889
|
+
};
|
|
35890
|
+
|
|
35891
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/selectParser.js
|
|
35892
|
+
import { ZodFirstPartyTypeKind as ZodFirstPartyTypeKind3 } from "zod/v3";
|
|
35893
|
+
|
|
35894
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/any.js
|
|
35895
|
+
function parseAnyDef(refs) {
|
|
35896
|
+
if (refs.target !== "openAi") {
|
|
35897
|
+
return {};
|
|
35898
|
+
}
|
|
35899
|
+
const anyDefinitionPath = [
|
|
35900
|
+
...refs.basePath,
|
|
35901
|
+
refs.definitionPath,
|
|
35902
|
+
refs.openAiAnyTypeName
|
|
35903
|
+
];
|
|
35904
|
+
refs.flags.hasReferencedOpenAiAnyType = true;
|
|
35905
|
+
return {
|
|
35906
|
+
$ref: refs.$refStrategy === "relative" ? getRelativePath(anyDefinitionPath, refs.currentPath) : anyDefinitionPath.join("/")
|
|
35907
|
+
};
|
|
35908
|
+
}
|
|
35909
|
+
|
|
35910
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/array.js
|
|
35911
|
+
import { ZodFirstPartyTypeKind } from "zod/v3";
|
|
35912
|
+
function parseArrayDef(def, refs) {
|
|
35913
|
+
const res = {
|
|
35914
|
+
type: "array"
|
|
35915
|
+
};
|
|
35916
|
+
if (def.type?._def && def.type?._def?.typeName !== ZodFirstPartyTypeKind.ZodAny) {
|
|
35917
|
+
res.items = parseDef(def.type._def, {
|
|
35918
|
+
...refs,
|
|
35919
|
+
currentPath: [...refs.currentPath, "items"]
|
|
35920
|
+
});
|
|
35921
|
+
}
|
|
35922
|
+
if (def.minLength) {
|
|
35923
|
+
setResponseValueAndErrors(res, "minItems", def.minLength.value, def.minLength.message, refs);
|
|
35924
|
+
}
|
|
35925
|
+
if (def.maxLength) {
|
|
35926
|
+
setResponseValueAndErrors(res, "maxItems", def.maxLength.value, def.maxLength.message, refs);
|
|
35927
|
+
}
|
|
35928
|
+
if (def.exactLength) {
|
|
35929
|
+
setResponseValueAndErrors(res, "minItems", def.exactLength.value, def.exactLength.message, refs);
|
|
35930
|
+
setResponseValueAndErrors(res, "maxItems", def.exactLength.value, def.exactLength.message, refs);
|
|
35931
|
+
}
|
|
35932
|
+
return res;
|
|
35933
|
+
}
|
|
35934
|
+
|
|
35935
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js
|
|
35936
|
+
function parseBigintDef(def, refs) {
|
|
35937
|
+
const res = {
|
|
35938
|
+
type: "integer",
|
|
35939
|
+
format: "int64"
|
|
35940
|
+
};
|
|
35941
|
+
if (!def.checks)
|
|
35942
|
+
return res;
|
|
35943
|
+
for (const check of def.checks) {
|
|
35944
|
+
switch (check.kind) {
|
|
35945
|
+
case "min":
|
|
35946
|
+
if (refs.target === "jsonSchema7") {
|
|
35947
|
+
if (check.inclusive) {
|
|
35948
|
+
setResponseValueAndErrors(res, "minimum", check.value, check.message, refs);
|
|
35949
|
+
} else {
|
|
35950
|
+
setResponseValueAndErrors(res, "exclusiveMinimum", check.value, check.message, refs);
|
|
35951
|
+
}
|
|
35952
|
+
} else {
|
|
35953
|
+
if (!check.inclusive) {
|
|
35954
|
+
res.exclusiveMinimum = true;
|
|
35955
|
+
}
|
|
35956
|
+
setResponseValueAndErrors(res, "minimum", check.value, check.message, refs);
|
|
35957
|
+
}
|
|
35958
|
+
break;
|
|
35959
|
+
case "max":
|
|
35960
|
+
if (refs.target === "jsonSchema7") {
|
|
35961
|
+
if (check.inclusive) {
|
|
35962
|
+
setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
|
|
35963
|
+
} else {
|
|
35964
|
+
setResponseValueAndErrors(res, "exclusiveMaximum", check.value, check.message, refs);
|
|
35965
|
+
}
|
|
35966
|
+
} else {
|
|
35967
|
+
if (!check.inclusive) {
|
|
35968
|
+
res.exclusiveMaximum = true;
|
|
35969
|
+
}
|
|
35970
|
+
setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
|
|
35971
|
+
}
|
|
35972
|
+
break;
|
|
35973
|
+
case "multipleOf":
|
|
35974
|
+
setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs);
|
|
35975
|
+
break;
|
|
35976
|
+
}
|
|
35977
|
+
}
|
|
35978
|
+
return res;
|
|
35979
|
+
}
|
|
35980
|
+
|
|
35981
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js
|
|
35982
|
+
function parseBooleanDef() {
|
|
35983
|
+
return {
|
|
35984
|
+
type: "boolean"
|
|
35985
|
+
};
|
|
35986
|
+
}
|
|
35987
|
+
|
|
35988
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/branded.js
|
|
35989
|
+
function parseBrandedDef(_def, refs) {
|
|
35990
|
+
return parseDef(_def.type._def, refs);
|
|
35991
|
+
}
|
|
35992
|
+
|
|
35993
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/catch.js
|
|
35994
|
+
var parseCatchDef = (def, refs) => {
|
|
35995
|
+
return parseDef(def.innerType._def, refs);
|
|
35996
|
+
};
|
|
35997
|
+
|
|
35998
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/date.js
|
|
35999
|
+
function parseDateDef(def, refs, overrideDateStrategy) {
|
|
36000
|
+
const strategy = overrideDateStrategy ?? refs.dateStrategy;
|
|
36001
|
+
if (Array.isArray(strategy)) {
|
|
36002
|
+
return {
|
|
36003
|
+
anyOf: strategy.map((item, i) => parseDateDef(def, refs, item))
|
|
36004
|
+
};
|
|
36005
|
+
}
|
|
36006
|
+
switch (strategy) {
|
|
36007
|
+
case "string":
|
|
36008
|
+
case "format:date-time":
|
|
36009
|
+
return {
|
|
36010
|
+
type: "string",
|
|
36011
|
+
format: "date-time"
|
|
36012
|
+
};
|
|
36013
|
+
case "format:date":
|
|
36014
|
+
return {
|
|
36015
|
+
type: "string",
|
|
36016
|
+
format: "date"
|
|
36017
|
+
};
|
|
36018
|
+
case "integer":
|
|
36019
|
+
return integerDateParser(def, refs);
|
|
36020
|
+
}
|
|
36021
|
+
}
|
|
36022
|
+
var integerDateParser = (def, refs) => {
|
|
36023
|
+
const res = {
|
|
36024
|
+
type: "integer",
|
|
36025
|
+
format: "unix-time"
|
|
36026
|
+
};
|
|
36027
|
+
if (refs.target === "openApi3") {
|
|
36028
|
+
return res;
|
|
36029
|
+
}
|
|
36030
|
+
for (const check of def.checks) {
|
|
36031
|
+
switch (check.kind) {
|
|
36032
|
+
case "min":
|
|
36033
|
+
setResponseValueAndErrors(
|
|
36034
|
+
res,
|
|
36035
|
+
"minimum",
|
|
36036
|
+
check.value,
|
|
36037
|
+
// This is in milliseconds
|
|
36038
|
+
check.message,
|
|
36039
|
+
refs
|
|
36040
|
+
);
|
|
36041
|
+
break;
|
|
36042
|
+
case "max":
|
|
36043
|
+
setResponseValueAndErrors(
|
|
36044
|
+
res,
|
|
36045
|
+
"maximum",
|
|
36046
|
+
check.value,
|
|
36047
|
+
// This is in milliseconds
|
|
36048
|
+
check.message,
|
|
36049
|
+
refs
|
|
36050
|
+
);
|
|
36051
|
+
break;
|
|
36052
|
+
}
|
|
36053
|
+
}
|
|
36054
|
+
return res;
|
|
36055
|
+
};
|
|
36056
|
+
|
|
36057
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/default.js
|
|
36058
|
+
function parseDefaultDef(_def, refs) {
|
|
36059
|
+
return {
|
|
36060
|
+
...parseDef(_def.innerType._def, refs),
|
|
36061
|
+
default: _def.defaultValue()
|
|
36062
|
+
};
|
|
36063
|
+
}
|
|
36064
|
+
|
|
36065
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/effects.js
|
|
36066
|
+
function parseEffectsDef(_def, refs) {
|
|
36067
|
+
return refs.effectStrategy === "input" ? parseDef(_def.schema._def, refs) : parseAnyDef(refs);
|
|
36068
|
+
}
|
|
36069
|
+
|
|
36070
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/enum.js
|
|
36071
|
+
function parseEnumDef(def) {
|
|
36072
|
+
return {
|
|
36073
|
+
type: "string",
|
|
36074
|
+
enum: Array.from(def.values)
|
|
36075
|
+
};
|
|
36076
|
+
}
|
|
36077
|
+
|
|
36078
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js
|
|
36079
|
+
var isJsonSchema7AllOfType = (type) => {
|
|
36080
|
+
if ("type" in type && type.type === "string")
|
|
36081
|
+
return false;
|
|
36082
|
+
return "allOf" in type;
|
|
36083
|
+
};
|
|
36084
|
+
function parseIntersectionDef(def, refs) {
|
|
36085
|
+
const allOf = [
|
|
36086
|
+
parseDef(def.left._def, {
|
|
36087
|
+
...refs,
|
|
36088
|
+
currentPath: [...refs.currentPath, "allOf", "0"]
|
|
36089
|
+
}),
|
|
36090
|
+
parseDef(def.right._def, {
|
|
36091
|
+
...refs,
|
|
36092
|
+
currentPath: [...refs.currentPath, "allOf", "1"]
|
|
36093
|
+
})
|
|
36094
|
+
].filter((x) => !!x);
|
|
36095
|
+
let unevaluatedProperties = refs.target === "jsonSchema2019-09" ? { unevaluatedProperties: false } : void 0;
|
|
36096
|
+
const mergedAllOf = [];
|
|
36097
|
+
allOf.forEach((schema) => {
|
|
36098
|
+
if (isJsonSchema7AllOfType(schema)) {
|
|
36099
|
+
mergedAllOf.push(...schema.allOf);
|
|
36100
|
+
if (schema.unevaluatedProperties === void 0) {
|
|
36101
|
+
unevaluatedProperties = void 0;
|
|
36102
|
+
}
|
|
36103
|
+
} else {
|
|
36104
|
+
let nestedSchema = schema;
|
|
36105
|
+
if ("additionalProperties" in schema && schema.additionalProperties === false) {
|
|
36106
|
+
const { additionalProperties, ...rest } = schema;
|
|
36107
|
+
nestedSchema = rest;
|
|
36108
|
+
} else {
|
|
36109
|
+
unevaluatedProperties = void 0;
|
|
36110
|
+
}
|
|
36111
|
+
mergedAllOf.push(nestedSchema);
|
|
36112
|
+
}
|
|
36113
|
+
});
|
|
36114
|
+
return mergedAllOf.length ? {
|
|
36115
|
+
allOf: mergedAllOf,
|
|
36116
|
+
...unevaluatedProperties
|
|
36117
|
+
} : void 0;
|
|
36118
|
+
}
|
|
36119
|
+
|
|
36120
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/literal.js
|
|
36121
|
+
function parseLiteralDef(def, refs) {
|
|
36122
|
+
const parsedType = typeof def.value;
|
|
36123
|
+
if (parsedType !== "bigint" && parsedType !== "number" && parsedType !== "boolean" && parsedType !== "string") {
|
|
36124
|
+
return {
|
|
36125
|
+
type: Array.isArray(def.value) ? "array" : "object"
|
|
36126
|
+
};
|
|
36127
|
+
}
|
|
36128
|
+
if (refs.target === "openApi3") {
|
|
36129
|
+
return {
|
|
36130
|
+
type: parsedType === "bigint" ? "integer" : parsedType,
|
|
36131
|
+
enum: [def.value]
|
|
36132
|
+
};
|
|
36133
|
+
}
|
|
36134
|
+
return {
|
|
36135
|
+
type: parsedType === "bigint" ? "integer" : parsedType,
|
|
36136
|
+
const: def.value
|
|
36137
|
+
};
|
|
36138
|
+
}
|
|
36139
|
+
|
|
36140
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/record.js
|
|
36141
|
+
import { ZodFirstPartyTypeKind as ZodFirstPartyTypeKind2 } from "zod/v3";
|
|
36142
|
+
|
|
36143
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/string.js
|
|
36144
|
+
var emojiRegex = void 0;
|
|
36145
|
+
var zodPatterns = {
|
|
36146
|
+
/**
|
|
36147
|
+
* `c` was changed to `[cC]` to replicate /i flag
|
|
36148
|
+
*/
|
|
36149
|
+
cuid: /^[cC][^\s-]{8,}$/,
|
|
36150
|
+
cuid2: /^[0-9a-z]+$/,
|
|
36151
|
+
ulid: /^[0-9A-HJKMNP-TV-Z]{26}$/,
|
|
36152
|
+
/**
|
|
36153
|
+
* `a-z` was added to replicate /i flag
|
|
36154
|
+
*/
|
|
36155
|
+
email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,
|
|
36156
|
+
/**
|
|
36157
|
+
* Constructed a valid Unicode RegExp
|
|
36158
|
+
*
|
|
36159
|
+
* Lazily instantiate since this type of regex isn't supported
|
|
36160
|
+
* in all envs (e.g. React Native).
|
|
36161
|
+
*
|
|
36162
|
+
* See:
|
|
36163
|
+
* https://github.com/colinhacks/zod/issues/2433
|
|
36164
|
+
* Fix in Zod:
|
|
36165
|
+
* https://github.com/colinhacks/zod/commit/9340fd51e48576a75adc919bff65dbc4a5d4c99b
|
|
36166
|
+
*/
|
|
36167
|
+
emoji: () => {
|
|
36168
|
+
if (emojiRegex === void 0) {
|
|
36169
|
+
emojiRegex = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u");
|
|
36170
|
+
}
|
|
36171
|
+
return emojiRegex;
|
|
36172
|
+
},
|
|
36173
|
+
/**
|
|
36174
|
+
* Unused
|
|
36175
|
+
*/
|
|
36176
|
+
uuid: /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,
|
|
36177
|
+
/**
|
|
36178
|
+
* Unused
|
|
36179
|
+
*/
|
|
36180
|
+
ipv4: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,
|
|
36181
|
+
ipv4Cidr: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,
|
|
36182
|
+
/**
|
|
36183
|
+
* Unused
|
|
36184
|
+
*/
|
|
36185
|
+
ipv6: /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,
|
|
36186
|
+
ipv6Cidr: /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,
|
|
36187
|
+
base64: /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,
|
|
36188
|
+
base64url: /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,
|
|
36189
|
+
nanoid: /^[a-zA-Z0-9_-]{21}$/,
|
|
36190
|
+
jwt: /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/
|
|
36191
|
+
};
|
|
36192
|
+
function parseStringDef(def, refs) {
|
|
36193
|
+
const res = {
|
|
36194
|
+
type: "string"
|
|
36195
|
+
};
|
|
36196
|
+
if (def.checks) {
|
|
36197
|
+
for (const check of def.checks) {
|
|
36198
|
+
switch (check.kind) {
|
|
36199
|
+
case "min":
|
|
36200
|
+
setResponseValueAndErrors(res, "minLength", typeof res.minLength === "number" ? Math.max(res.minLength, check.value) : check.value, check.message, refs);
|
|
36201
|
+
break;
|
|
36202
|
+
case "max":
|
|
36203
|
+
setResponseValueAndErrors(res, "maxLength", typeof res.maxLength === "number" ? Math.min(res.maxLength, check.value) : check.value, check.message, refs);
|
|
36204
|
+
break;
|
|
36205
|
+
case "email":
|
|
36206
|
+
switch (refs.emailStrategy) {
|
|
36207
|
+
case "format:email":
|
|
36208
|
+
addFormat(res, "email", check.message, refs);
|
|
36209
|
+
break;
|
|
36210
|
+
case "format:idn-email":
|
|
36211
|
+
addFormat(res, "idn-email", check.message, refs);
|
|
36212
|
+
break;
|
|
36213
|
+
case "pattern:zod":
|
|
36214
|
+
addPattern(res, zodPatterns.email, check.message, refs);
|
|
36215
|
+
break;
|
|
36216
|
+
}
|
|
36217
|
+
break;
|
|
36218
|
+
case "url":
|
|
36219
|
+
addFormat(res, "uri", check.message, refs);
|
|
36220
|
+
break;
|
|
36221
|
+
case "uuid":
|
|
36222
|
+
addFormat(res, "uuid", check.message, refs);
|
|
36223
|
+
break;
|
|
36224
|
+
case "regex":
|
|
36225
|
+
addPattern(res, check.regex, check.message, refs);
|
|
36226
|
+
break;
|
|
36227
|
+
case "cuid":
|
|
36228
|
+
addPattern(res, zodPatterns.cuid, check.message, refs);
|
|
36229
|
+
break;
|
|
36230
|
+
case "cuid2":
|
|
36231
|
+
addPattern(res, zodPatterns.cuid2, check.message, refs);
|
|
36232
|
+
break;
|
|
36233
|
+
case "startsWith":
|
|
36234
|
+
addPattern(res, RegExp(`^${escapeLiteralCheckValue(check.value, refs)}`), check.message, refs);
|
|
36235
|
+
break;
|
|
36236
|
+
case "endsWith":
|
|
36237
|
+
addPattern(res, RegExp(`${escapeLiteralCheckValue(check.value, refs)}$`), check.message, refs);
|
|
36238
|
+
break;
|
|
36239
|
+
case "datetime":
|
|
36240
|
+
addFormat(res, "date-time", check.message, refs);
|
|
36241
|
+
break;
|
|
36242
|
+
case "date":
|
|
36243
|
+
addFormat(res, "date", check.message, refs);
|
|
36244
|
+
break;
|
|
36245
|
+
case "time":
|
|
36246
|
+
addFormat(res, "time", check.message, refs);
|
|
36247
|
+
break;
|
|
36248
|
+
case "duration":
|
|
36249
|
+
addFormat(res, "duration", check.message, refs);
|
|
36250
|
+
break;
|
|
36251
|
+
case "length":
|
|
36252
|
+
setResponseValueAndErrors(res, "minLength", typeof res.minLength === "number" ? Math.max(res.minLength, check.value) : check.value, check.message, refs);
|
|
36253
|
+
setResponseValueAndErrors(res, "maxLength", typeof res.maxLength === "number" ? Math.min(res.maxLength, check.value) : check.value, check.message, refs);
|
|
36254
|
+
break;
|
|
36255
|
+
case "includes": {
|
|
36256
|
+
addPattern(res, RegExp(escapeLiteralCheckValue(check.value, refs)), check.message, refs);
|
|
36257
|
+
break;
|
|
36258
|
+
}
|
|
36259
|
+
case "ip": {
|
|
36260
|
+
if (check.version !== "v6") {
|
|
36261
|
+
addFormat(res, "ipv4", check.message, refs);
|
|
36262
|
+
}
|
|
36263
|
+
if (check.version !== "v4") {
|
|
36264
|
+
addFormat(res, "ipv6", check.message, refs);
|
|
36265
|
+
}
|
|
36266
|
+
break;
|
|
36267
|
+
}
|
|
36268
|
+
case "base64url":
|
|
36269
|
+
addPattern(res, zodPatterns.base64url, check.message, refs);
|
|
36270
|
+
break;
|
|
36271
|
+
case "jwt":
|
|
36272
|
+
addPattern(res, zodPatterns.jwt, check.message, refs);
|
|
36273
|
+
break;
|
|
36274
|
+
case "cidr": {
|
|
36275
|
+
if (check.version !== "v6") {
|
|
36276
|
+
addPattern(res, zodPatterns.ipv4Cidr, check.message, refs);
|
|
36277
|
+
}
|
|
36278
|
+
if (check.version !== "v4") {
|
|
36279
|
+
addPattern(res, zodPatterns.ipv6Cidr, check.message, refs);
|
|
36280
|
+
}
|
|
36281
|
+
break;
|
|
36282
|
+
}
|
|
36283
|
+
case "emoji":
|
|
36284
|
+
addPattern(res, zodPatterns.emoji(), check.message, refs);
|
|
36285
|
+
break;
|
|
36286
|
+
case "ulid": {
|
|
36287
|
+
addPattern(res, zodPatterns.ulid, check.message, refs);
|
|
36288
|
+
break;
|
|
36289
|
+
}
|
|
36290
|
+
case "base64": {
|
|
36291
|
+
switch (refs.base64Strategy) {
|
|
36292
|
+
case "format:binary": {
|
|
36293
|
+
addFormat(res, "binary", check.message, refs);
|
|
36294
|
+
break;
|
|
36295
|
+
}
|
|
36296
|
+
case "contentEncoding:base64": {
|
|
36297
|
+
setResponseValueAndErrors(res, "contentEncoding", "base64", check.message, refs);
|
|
36298
|
+
break;
|
|
36299
|
+
}
|
|
36300
|
+
case "pattern:zod": {
|
|
36301
|
+
addPattern(res, zodPatterns.base64, check.message, refs);
|
|
36302
|
+
break;
|
|
36303
|
+
}
|
|
36304
|
+
}
|
|
36305
|
+
break;
|
|
36306
|
+
}
|
|
36307
|
+
case "nanoid": {
|
|
36308
|
+
addPattern(res, zodPatterns.nanoid, check.message, refs);
|
|
36309
|
+
}
|
|
36310
|
+
case "toLowerCase":
|
|
36311
|
+
case "toUpperCase":
|
|
36312
|
+
case "trim":
|
|
36313
|
+
break;
|
|
36314
|
+
default:
|
|
36315
|
+
/* @__PURE__ */ ((_) => {
|
|
36316
|
+
})(check);
|
|
36317
|
+
}
|
|
36318
|
+
}
|
|
36319
|
+
}
|
|
36320
|
+
return res;
|
|
36321
|
+
}
|
|
36322
|
+
function escapeLiteralCheckValue(literal, refs) {
|
|
36323
|
+
return refs.patternStrategy === "escape" ? escapeNonAlphaNumeric(literal) : literal;
|
|
36324
|
+
}
|
|
36325
|
+
var ALPHA_NUMERIC = new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
|
|
36326
|
+
function escapeNonAlphaNumeric(source) {
|
|
36327
|
+
let result = "";
|
|
36328
|
+
for (let i = 0; i < source.length; i++) {
|
|
36329
|
+
if (!ALPHA_NUMERIC.has(source[i])) {
|
|
36330
|
+
result += "\\";
|
|
36331
|
+
}
|
|
36332
|
+
result += source[i];
|
|
36333
|
+
}
|
|
36334
|
+
return result;
|
|
36335
|
+
}
|
|
36336
|
+
function addFormat(schema, value, message, refs) {
|
|
36337
|
+
if (schema.format || schema.anyOf?.some((x) => x.format)) {
|
|
36338
|
+
if (!schema.anyOf) {
|
|
36339
|
+
schema.anyOf = [];
|
|
36340
|
+
}
|
|
36341
|
+
if (schema.format) {
|
|
36342
|
+
schema.anyOf.push({
|
|
36343
|
+
format: schema.format,
|
|
36344
|
+
...schema.errorMessage && refs.errorMessages && {
|
|
36345
|
+
errorMessage: { format: schema.errorMessage.format }
|
|
36346
|
+
}
|
|
36347
|
+
});
|
|
36348
|
+
delete schema.format;
|
|
36349
|
+
if (schema.errorMessage) {
|
|
36350
|
+
delete schema.errorMessage.format;
|
|
36351
|
+
if (Object.keys(schema.errorMessage).length === 0) {
|
|
36352
|
+
delete schema.errorMessage;
|
|
36353
|
+
}
|
|
36354
|
+
}
|
|
36355
|
+
}
|
|
36356
|
+
schema.anyOf.push({
|
|
36357
|
+
format: value,
|
|
36358
|
+
...message && refs.errorMessages && { errorMessage: { format: message } }
|
|
36359
|
+
});
|
|
36360
|
+
} else {
|
|
36361
|
+
setResponseValueAndErrors(schema, "format", value, message, refs);
|
|
36362
|
+
}
|
|
36363
|
+
}
|
|
36364
|
+
function addPattern(schema, regex, message, refs) {
|
|
36365
|
+
if (schema.pattern || schema.allOf?.some((x) => x.pattern)) {
|
|
36366
|
+
if (!schema.allOf) {
|
|
36367
|
+
schema.allOf = [];
|
|
36368
|
+
}
|
|
36369
|
+
if (schema.pattern) {
|
|
36370
|
+
schema.allOf.push({
|
|
36371
|
+
pattern: schema.pattern,
|
|
36372
|
+
...schema.errorMessage && refs.errorMessages && {
|
|
36373
|
+
errorMessage: { pattern: schema.errorMessage.pattern }
|
|
36374
|
+
}
|
|
36375
|
+
});
|
|
36376
|
+
delete schema.pattern;
|
|
36377
|
+
if (schema.errorMessage) {
|
|
36378
|
+
delete schema.errorMessage.pattern;
|
|
36379
|
+
if (Object.keys(schema.errorMessage).length === 0) {
|
|
36380
|
+
delete schema.errorMessage;
|
|
36381
|
+
}
|
|
36382
|
+
}
|
|
36383
|
+
}
|
|
36384
|
+
schema.allOf.push({
|
|
36385
|
+
pattern: stringifyRegExpWithFlags(regex, refs),
|
|
36386
|
+
...message && refs.errorMessages && { errorMessage: { pattern: message } }
|
|
36387
|
+
});
|
|
36388
|
+
} else {
|
|
36389
|
+
setResponseValueAndErrors(schema, "pattern", stringifyRegExpWithFlags(regex, refs), message, refs);
|
|
36390
|
+
}
|
|
36391
|
+
}
|
|
36392
|
+
function stringifyRegExpWithFlags(regex, refs) {
|
|
36393
|
+
if (!refs.applyRegexFlags || !regex.flags) {
|
|
36394
|
+
return regex.source;
|
|
36395
|
+
}
|
|
36396
|
+
const flags = {
|
|
36397
|
+
i: regex.flags.includes("i"),
|
|
36398
|
+
m: regex.flags.includes("m"),
|
|
36399
|
+
s: regex.flags.includes("s")
|
|
36400
|
+
// `.` matches newlines
|
|
36401
|
+
};
|
|
36402
|
+
const source = flags.i ? regex.source.toLowerCase() : regex.source;
|
|
36403
|
+
let pattern = "";
|
|
36404
|
+
let isEscaped = false;
|
|
36405
|
+
let inCharGroup = false;
|
|
36406
|
+
let inCharRange = false;
|
|
36407
|
+
for (let i = 0; i < source.length; i++) {
|
|
36408
|
+
if (isEscaped) {
|
|
36409
|
+
pattern += source[i];
|
|
36410
|
+
isEscaped = false;
|
|
36411
|
+
continue;
|
|
36412
|
+
}
|
|
36413
|
+
if (flags.i) {
|
|
36414
|
+
if (inCharGroup) {
|
|
36415
|
+
if (source[i].match(/[a-z]/)) {
|
|
36416
|
+
if (inCharRange) {
|
|
36417
|
+
pattern += source[i];
|
|
36418
|
+
pattern += `${source[i - 2]}-${source[i]}`.toUpperCase();
|
|
36419
|
+
inCharRange = false;
|
|
36420
|
+
} else if (source[i + 1] === "-" && source[i + 2]?.match(/[a-z]/)) {
|
|
36421
|
+
pattern += source[i];
|
|
36422
|
+
inCharRange = true;
|
|
36423
|
+
} else {
|
|
36424
|
+
pattern += `${source[i]}${source[i].toUpperCase()}`;
|
|
36425
|
+
}
|
|
36426
|
+
continue;
|
|
36427
|
+
}
|
|
36428
|
+
} else if (source[i].match(/[a-z]/)) {
|
|
36429
|
+
pattern += `[${source[i]}${source[i].toUpperCase()}]`;
|
|
36430
|
+
continue;
|
|
36431
|
+
}
|
|
36432
|
+
}
|
|
36433
|
+
if (flags.m) {
|
|
36434
|
+
if (source[i] === "^") {
|
|
36435
|
+
pattern += `(^|(?<=[\r
|
|
36436
|
+
]))`;
|
|
36437
|
+
continue;
|
|
36438
|
+
} else if (source[i] === "$") {
|
|
36439
|
+
pattern += `($|(?=[\r
|
|
36440
|
+
]))`;
|
|
36441
|
+
continue;
|
|
36442
|
+
}
|
|
36443
|
+
}
|
|
36444
|
+
if (flags.s && source[i] === ".") {
|
|
36445
|
+
pattern += inCharGroup ? `${source[i]}\r
|
|
36446
|
+
` : `[${source[i]}\r
|
|
36447
|
+
]`;
|
|
36448
|
+
continue;
|
|
36449
|
+
}
|
|
36450
|
+
pattern += source[i];
|
|
36451
|
+
if (source[i] === "\\") {
|
|
36452
|
+
isEscaped = true;
|
|
36453
|
+
} else if (inCharGroup && source[i] === "]") {
|
|
36454
|
+
inCharGroup = false;
|
|
36455
|
+
} else if (!inCharGroup && source[i] === "[") {
|
|
36456
|
+
inCharGroup = true;
|
|
36457
|
+
}
|
|
36458
|
+
}
|
|
36459
|
+
try {
|
|
36460
|
+
new RegExp(pattern);
|
|
36461
|
+
} catch {
|
|
36462
|
+
console.warn(`Could not convert regex pattern at ${refs.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`);
|
|
36463
|
+
return regex.source;
|
|
36464
|
+
}
|
|
36465
|
+
return pattern;
|
|
36466
|
+
}
|
|
36467
|
+
|
|
36468
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/record.js
|
|
36469
|
+
function parseRecordDef(def, refs) {
|
|
36470
|
+
if (refs.target === "openAi") {
|
|
36471
|
+
console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");
|
|
36472
|
+
}
|
|
36473
|
+
if (refs.target === "openApi3" && def.keyType?._def.typeName === ZodFirstPartyTypeKind2.ZodEnum) {
|
|
36474
|
+
return {
|
|
36475
|
+
type: "object",
|
|
36476
|
+
required: def.keyType._def.values,
|
|
36477
|
+
properties: def.keyType._def.values.reduce((acc, key2) => ({
|
|
36478
|
+
...acc,
|
|
36479
|
+
[key2]: parseDef(def.valueType._def, {
|
|
36480
|
+
...refs,
|
|
36481
|
+
currentPath: [...refs.currentPath, "properties", key2]
|
|
36482
|
+
}) ?? parseAnyDef(refs)
|
|
36483
|
+
}), {}),
|
|
36484
|
+
additionalProperties: refs.rejectedAdditionalProperties
|
|
36485
|
+
};
|
|
36486
|
+
}
|
|
36487
|
+
const schema = {
|
|
36488
|
+
type: "object",
|
|
36489
|
+
additionalProperties: parseDef(def.valueType._def, {
|
|
36490
|
+
...refs,
|
|
36491
|
+
currentPath: [...refs.currentPath, "additionalProperties"]
|
|
36492
|
+
}) ?? refs.allowedAdditionalProperties
|
|
36493
|
+
};
|
|
36494
|
+
if (refs.target === "openApi3") {
|
|
36495
|
+
return schema;
|
|
36496
|
+
}
|
|
36497
|
+
if (def.keyType?._def.typeName === ZodFirstPartyTypeKind2.ZodString && def.keyType._def.checks?.length) {
|
|
36498
|
+
const { type, ...keyType } = parseStringDef(def.keyType._def, refs);
|
|
36499
|
+
return {
|
|
36500
|
+
...schema,
|
|
36501
|
+
propertyNames: keyType
|
|
36502
|
+
};
|
|
36503
|
+
} else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind2.ZodEnum) {
|
|
36504
|
+
return {
|
|
36505
|
+
...schema,
|
|
36506
|
+
propertyNames: {
|
|
36507
|
+
enum: def.keyType._def.values
|
|
36508
|
+
}
|
|
36509
|
+
};
|
|
36510
|
+
} else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind2.ZodBranded && def.keyType._def.type._def.typeName === ZodFirstPartyTypeKind2.ZodString && def.keyType._def.type._def.checks?.length) {
|
|
36511
|
+
const { type, ...keyType } = parseBrandedDef(def.keyType._def, refs);
|
|
36512
|
+
return {
|
|
36513
|
+
...schema,
|
|
36514
|
+
propertyNames: keyType
|
|
36515
|
+
};
|
|
36516
|
+
}
|
|
36517
|
+
return schema;
|
|
36518
|
+
}
|
|
36519
|
+
|
|
36520
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/map.js
|
|
36521
|
+
function parseMapDef(def, refs) {
|
|
36522
|
+
if (refs.mapStrategy === "record") {
|
|
36523
|
+
return parseRecordDef(def, refs);
|
|
36524
|
+
}
|
|
36525
|
+
const keys = parseDef(def.keyType._def, {
|
|
36526
|
+
...refs,
|
|
36527
|
+
currentPath: [...refs.currentPath, "items", "items", "0"]
|
|
36528
|
+
}) || parseAnyDef(refs);
|
|
36529
|
+
const values = parseDef(def.valueType._def, {
|
|
36530
|
+
...refs,
|
|
36531
|
+
currentPath: [...refs.currentPath, "items", "items", "1"]
|
|
36532
|
+
}) || parseAnyDef(refs);
|
|
36533
|
+
return {
|
|
36534
|
+
type: "array",
|
|
36535
|
+
maxItems: 125,
|
|
36536
|
+
items: {
|
|
36537
|
+
type: "array",
|
|
36538
|
+
items: [keys, values],
|
|
36539
|
+
minItems: 2,
|
|
36540
|
+
maxItems: 2
|
|
36541
|
+
}
|
|
36542
|
+
};
|
|
36543
|
+
}
|
|
36544
|
+
|
|
36545
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js
|
|
36546
|
+
function parseNativeEnumDef(def) {
|
|
36547
|
+
const object = def.values;
|
|
36548
|
+
const actualKeys = Object.keys(def.values).filter((key2) => {
|
|
36549
|
+
return typeof object[object[key2]] !== "number";
|
|
36550
|
+
});
|
|
36551
|
+
const actualValues = actualKeys.map((key2) => object[key2]);
|
|
36552
|
+
const parsedTypes = Array.from(new Set(actualValues.map((values) => typeof values)));
|
|
36553
|
+
return {
|
|
36554
|
+
type: parsedTypes.length === 1 ? parsedTypes[0] === "string" ? "string" : "number" : ["string", "number"],
|
|
36555
|
+
enum: actualValues
|
|
36556
|
+
};
|
|
36557
|
+
}
|
|
36558
|
+
|
|
36559
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/never.js
|
|
36560
|
+
function parseNeverDef(refs) {
|
|
36561
|
+
return refs.target === "openAi" ? void 0 : {
|
|
36562
|
+
not: parseAnyDef({
|
|
36563
|
+
...refs,
|
|
36564
|
+
currentPath: [...refs.currentPath, "not"]
|
|
36565
|
+
})
|
|
36566
|
+
};
|
|
36567
|
+
}
|
|
36568
|
+
|
|
36569
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/null.js
|
|
36570
|
+
function parseNullDef(refs) {
|
|
36571
|
+
return refs.target === "openApi3" ? {
|
|
36572
|
+
enum: ["null"],
|
|
36573
|
+
nullable: true
|
|
36574
|
+
} : {
|
|
36575
|
+
type: "null"
|
|
36576
|
+
};
|
|
36577
|
+
}
|
|
36578
|
+
|
|
36579
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/union.js
|
|
36580
|
+
var primitiveMappings = {
|
|
36581
|
+
ZodString: "string",
|
|
36582
|
+
ZodNumber: "number",
|
|
36583
|
+
ZodBigInt: "integer",
|
|
36584
|
+
ZodBoolean: "boolean",
|
|
36585
|
+
ZodNull: "null"
|
|
36586
|
+
};
|
|
36587
|
+
function parseUnionDef(def, refs) {
|
|
36588
|
+
if (refs.target === "openApi3")
|
|
36589
|
+
return asAnyOf(def, refs);
|
|
36590
|
+
const options = def.options instanceof Map ? Array.from(def.options.values()) : def.options;
|
|
36591
|
+
if (options.every((x) => x._def.typeName in primitiveMappings && (!x._def.checks || !x._def.checks.length))) {
|
|
36592
|
+
const types = options.reduce((types2, x) => {
|
|
36593
|
+
const type = primitiveMappings[x._def.typeName];
|
|
36594
|
+
return type && !types2.includes(type) ? [...types2, type] : types2;
|
|
36595
|
+
}, []);
|
|
36596
|
+
return {
|
|
36597
|
+
type: types.length > 1 ? types : types[0]
|
|
36598
|
+
};
|
|
36599
|
+
} else if (options.every((x) => x._def.typeName === "ZodLiteral" && !x.description)) {
|
|
36600
|
+
const types = options.reduce((acc, x) => {
|
|
36601
|
+
const type = typeof x._def.value;
|
|
36602
|
+
switch (type) {
|
|
36603
|
+
case "string":
|
|
36604
|
+
case "number":
|
|
36605
|
+
case "boolean":
|
|
36606
|
+
return [...acc, type];
|
|
36607
|
+
case "bigint":
|
|
36608
|
+
return [...acc, "integer"];
|
|
36609
|
+
case "object":
|
|
36610
|
+
if (x._def.value === null)
|
|
36611
|
+
return [...acc, "null"];
|
|
36612
|
+
case "symbol":
|
|
36613
|
+
case "undefined":
|
|
36614
|
+
case "function":
|
|
36615
|
+
default:
|
|
36616
|
+
return acc;
|
|
36617
|
+
}
|
|
36618
|
+
}, []);
|
|
36619
|
+
if (types.length === options.length) {
|
|
36620
|
+
const uniqueTypes = types.filter((x, i, a) => a.indexOf(x) === i);
|
|
36621
|
+
return {
|
|
36622
|
+
type: uniqueTypes.length > 1 ? uniqueTypes : uniqueTypes[0],
|
|
36623
|
+
enum: options.reduce((acc, x) => {
|
|
36624
|
+
return acc.includes(x._def.value) ? acc : [...acc, x._def.value];
|
|
36625
|
+
}, [])
|
|
36626
|
+
};
|
|
36627
|
+
}
|
|
36628
|
+
} else if (options.every((x) => x._def.typeName === "ZodEnum")) {
|
|
36629
|
+
return {
|
|
36630
|
+
type: "string",
|
|
36631
|
+
enum: options.reduce((acc, x) => [
|
|
36632
|
+
...acc,
|
|
36633
|
+
...x._def.values.filter((x2) => !acc.includes(x2))
|
|
36634
|
+
], [])
|
|
36635
|
+
};
|
|
36636
|
+
}
|
|
36637
|
+
return asAnyOf(def, refs);
|
|
36638
|
+
}
|
|
36639
|
+
var asAnyOf = (def, refs) => {
|
|
36640
|
+
const anyOf = (def.options instanceof Map ? Array.from(def.options.values()) : def.options).map((x, i) => parseDef(x._def, {
|
|
36641
|
+
...refs,
|
|
36642
|
+
currentPath: [...refs.currentPath, "anyOf", `${i}`]
|
|
36643
|
+
})).filter((x) => !!x && (!refs.strictUnions || typeof x === "object" && Object.keys(x).length > 0));
|
|
36644
|
+
return anyOf.length ? { anyOf } : void 0;
|
|
36645
|
+
};
|
|
36646
|
+
|
|
36647
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js
|
|
36648
|
+
function parseNullableDef(def, refs) {
|
|
36649
|
+
if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(def.innerType._def.typeName) && (!def.innerType._def.checks || !def.innerType._def.checks.length)) {
|
|
36650
|
+
if (refs.target === "openApi3") {
|
|
36651
|
+
return {
|
|
36652
|
+
type: primitiveMappings[def.innerType._def.typeName],
|
|
36653
|
+
nullable: true
|
|
36654
|
+
};
|
|
36655
|
+
}
|
|
36656
|
+
return {
|
|
36657
|
+
type: [
|
|
36658
|
+
primitiveMappings[def.innerType._def.typeName],
|
|
36659
|
+
"null"
|
|
36660
|
+
]
|
|
36661
|
+
};
|
|
36662
|
+
}
|
|
36663
|
+
if (refs.target === "openApi3") {
|
|
36664
|
+
const base3 = parseDef(def.innerType._def, {
|
|
36665
|
+
...refs,
|
|
36666
|
+
currentPath: [...refs.currentPath]
|
|
36667
|
+
});
|
|
36668
|
+
if (base3 && "$ref" in base3)
|
|
36669
|
+
return { allOf: [base3], nullable: true };
|
|
36670
|
+
return base3 && { ...base3, nullable: true };
|
|
36671
|
+
}
|
|
36672
|
+
const base2 = parseDef(def.innerType._def, {
|
|
36673
|
+
...refs,
|
|
36674
|
+
currentPath: [...refs.currentPath, "anyOf", "0"]
|
|
36675
|
+
});
|
|
36676
|
+
return base2 && { anyOf: [base2, { type: "null" }] };
|
|
36677
|
+
}
|
|
36678
|
+
|
|
36679
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/number.js
|
|
36680
|
+
function parseNumberDef(def, refs) {
|
|
36681
|
+
const res = {
|
|
36682
|
+
type: "number"
|
|
36683
|
+
};
|
|
36684
|
+
if (!def.checks)
|
|
36685
|
+
return res;
|
|
36686
|
+
for (const check of def.checks) {
|
|
36687
|
+
switch (check.kind) {
|
|
36688
|
+
case "int":
|
|
36689
|
+
res.type = "integer";
|
|
36690
|
+
addErrorMessage(res, "type", check.message, refs);
|
|
36691
|
+
break;
|
|
36692
|
+
case "min":
|
|
36693
|
+
if (refs.target === "jsonSchema7") {
|
|
36694
|
+
if (check.inclusive) {
|
|
36695
|
+
setResponseValueAndErrors(res, "minimum", check.value, check.message, refs);
|
|
36696
|
+
} else {
|
|
36697
|
+
setResponseValueAndErrors(res, "exclusiveMinimum", check.value, check.message, refs);
|
|
36698
|
+
}
|
|
36699
|
+
} else {
|
|
36700
|
+
if (!check.inclusive) {
|
|
36701
|
+
res.exclusiveMinimum = true;
|
|
36702
|
+
}
|
|
36703
|
+
setResponseValueAndErrors(res, "minimum", check.value, check.message, refs);
|
|
36704
|
+
}
|
|
36705
|
+
break;
|
|
36706
|
+
case "max":
|
|
36707
|
+
if (refs.target === "jsonSchema7") {
|
|
36708
|
+
if (check.inclusive) {
|
|
36709
|
+
setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
|
|
36710
|
+
} else {
|
|
36711
|
+
setResponseValueAndErrors(res, "exclusiveMaximum", check.value, check.message, refs);
|
|
36712
|
+
}
|
|
36713
|
+
} else {
|
|
36714
|
+
if (!check.inclusive) {
|
|
36715
|
+
res.exclusiveMaximum = true;
|
|
36716
|
+
}
|
|
36717
|
+
setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
|
|
36718
|
+
}
|
|
36719
|
+
break;
|
|
36720
|
+
case "multipleOf":
|
|
36721
|
+
setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs);
|
|
36722
|
+
break;
|
|
36723
|
+
}
|
|
36724
|
+
}
|
|
36725
|
+
return res;
|
|
36726
|
+
}
|
|
36727
|
+
|
|
36728
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/object.js
|
|
36729
|
+
function parseObjectDef(def, refs) {
|
|
36730
|
+
const forceOptionalIntoNullable = refs.target === "openAi";
|
|
36731
|
+
const result = {
|
|
36732
|
+
type: "object",
|
|
36733
|
+
properties: {}
|
|
36734
|
+
};
|
|
36735
|
+
const required = [];
|
|
36736
|
+
const shape = def.shape();
|
|
36737
|
+
for (const propName in shape) {
|
|
36738
|
+
let propDef = shape[propName];
|
|
36739
|
+
if (propDef === void 0 || propDef._def === void 0) {
|
|
36740
|
+
continue;
|
|
36741
|
+
}
|
|
36742
|
+
let propOptional = safeIsOptional(propDef);
|
|
36743
|
+
if (propOptional && forceOptionalIntoNullable) {
|
|
36744
|
+
if (propDef._def.typeName === "ZodOptional") {
|
|
36745
|
+
propDef = propDef._def.innerType;
|
|
36746
|
+
}
|
|
36747
|
+
if (!propDef.isNullable()) {
|
|
36748
|
+
propDef = propDef.nullable();
|
|
36749
|
+
}
|
|
36750
|
+
propOptional = false;
|
|
36751
|
+
}
|
|
36752
|
+
const parsedDef = parseDef(propDef._def, {
|
|
36753
|
+
...refs,
|
|
36754
|
+
currentPath: [...refs.currentPath, "properties", propName],
|
|
36755
|
+
propertyPath: [...refs.currentPath, "properties", propName]
|
|
36756
|
+
});
|
|
36757
|
+
if (parsedDef === void 0) {
|
|
36758
|
+
continue;
|
|
36759
|
+
}
|
|
36760
|
+
result.properties[propName] = parsedDef;
|
|
36761
|
+
if (!propOptional) {
|
|
36762
|
+
required.push(propName);
|
|
36763
|
+
}
|
|
36764
|
+
}
|
|
36765
|
+
if (required.length) {
|
|
36766
|
+
result.required = required;
|
|
36767
|
+
}
|
|
36768
|
+
const additionalProperties = decideAdditionalProperties(def, refs);
|
|
36769
|
+
if (additionalProperties !== void 0) {
|
|
36770
|
+
result.additionalProperties = additionalProperties;
|
|
36771
|
+
}
|
|
36772
|
+
return result;
|
|
36773
|
+
}
|
|
36774
|
+
function decideAdditionalProperties(def, refs) {
|
|
36775
|
+
if (def.catchall._def.typeName !== "ZodNever") {
|
|
36776
|
+
return parseDef(def.catchall._def, {
|
|
36777
|
+
...refs,
|
|
36778
|
+
currentPath: [...refs.currentPath, "additionalProperties"]
|
|
36779
|
+
});
|
|
36780
|
+
}
|
|
36781
|
+
switch (def.unknownKeys) {
|
|
36782
|
+
case "passthrough":
|
|
36783
|
+
return refs.allowedAdditionalProperties;
|
|
36784
|
+
case "strict":
|
|
36785
|
+
return refs.rejectedAdditionalProperties;
|
|
36786
|
+
case "strip":
|
|
36787
|
+
return refs.removeAdditionalStrategy === "strict" ? refs.allowedAdditionalProperties : refs.rejectedAdditionalProperties;
|
|
36788
|
+
}
|
|
36789
|
+
}
|
|
36790
|
+
function safeIsOptional(schema) {
|
|
36791
|
+
try {
|
|
36792
|
+
return schema.isOptional();
|
|
36793
|
+
} catch {
|
|
36794
|
+
return true;
|
|
36795
|
+
}
|
|
36796
|
+
}
|
|
36797
|
+
|
|
36798
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/optional.js
|
|
36799
|
+
var parseOptionalDef = (def, refs) => {
|
|
36800
|
+
if (refs.currentPath.toString() === refs.propertyPath?.toString()) {
|
|
36801
|
+
return parseDef(def.innerType._def, refs);
|
|
36802
|
+
}
|
|
36803
|
+
const innerSchema = parseDef(def.innerType._def, {
|
|
36804
|
+
...refs,
|
|
36805
|
+
currentPath: [...refs.currentPath, "anyOf", "1"]
|
|
36806
|
+
});
|
|
36807
|
+
return innerSchema ? {
|
|
36808
|
+
anyOf: [
|
|
36809
|
+
{
|
|
36810
|
+
not: parseAnyDef(refs)
|
|
36811
|
+
},
|
|
36812
|
+
innerSchema
|
|
36813
|
+
]
|
|
36814
|
+
} : parseAnyDef(refs);
|
|
36815
|
+
};
|
|
36816
|
+
|
|
36817
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js
|
|
36818
|
+
var parsePipelineDef = (def, refs) => {
|
|
36819
|
+
if (refs.pipeStrategy === "input") {
|
|
36820
|
+
return parseDef(def.in._def, refs);
|
|
36821
|
+
} else if (refs.pipeStrategy === "output") {
|
|
36822
|
+
return parseDef(def.out._def, refs);
|
|
36823
|
+
}
|
|
36824
|
+
const a = parseDef(def.in._def, {
|
|
36825
|
+
...refs,
|
|
36826
|
+
currentPath: [...refs.currentPath, "allOf", "0"]
|
|
36827
|
+
});
|
|
36828
|
+
const b = parseDef(def.out._def, {
|
|
36829
|
+
...refs,
|
|
36830
|
+
currentPath: [...refs.currentPath, "allOf", a ? "1" : "0"]
|
|
36831
|
+
});
|
|
36832
|
+
return {
|
|
36833
|
+
allOf: [a, b].filter((x) => x !== void 0)
|
|
36834
|
+
};
|
|
36835
|
+
};
|
|
36836
|
+
|
|
36837
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/promise.js
|
|
36838
|
+
function parsePromiseDef(def, refs) {
|
|
36839
|
+
return parseDef(def.type._def, refs);
|
|
36840
|
+
}
|
|
36841
|
+
|
|
36842
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/set.js
|
|
36843
|
+
function parseSetDef(def, refs) {
|
|
36844
|
+
const items = parseDef(def.valueType._def, {
|
|
36845
|
+
...refs,
|
|
36846
|
+
currentPath: [...refs.currentPath, "items"]
|
|
36847
|
+
});
|
|
36848
|
+
const schema = {
|
|
36849
|
+
type: "array",
|
|
36850
|
+
uniqueItems: true,
|
|
36851
|
+
items
|
|
36852
|
+
};
|
|
36853
|
+
if (def.minSize) {
|
|
36854
|
+
setResponseValueAndErrors(schema, "minItems", def.minSize.value, def.minSize.message, refs);
|
|
36855
|
+
}
|
|
36856
|
+
if (def.maxSize) {
|
|
36857
|
+
setResponseValueAndErrors(schema, "maxItems", def.maxSize.value, def.maxSize.message, refs);
|
|
36858
|
+
}
|
|
36859
|
+
return schema;
|
|
36860
|
+
}
|
|
36861
|
+
|
|
36862
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js
|
|
36863
|
+
function parseTupleDef(def, refs) {
|
|
36864
|
+
if (def.rest) {
|
|
36865
|
+
return {
|
|
36866
|
+
type: "array",
|
|
36867
|
+
minItems: def.items.length,
|
|
36868
|
+
items: def.items.map((x, i) => parseDef(x._def, {
|
|
36869
|
+
...refs,
|
|
36870
|
+
currentPath: [...refs.currentPath, "items", `${i}`]
|
|
36871
|
+
})).reduce((acc, x) => x === void 0 ? acc : [...acc, x], []),
|
|
36872
|
+
additionalItems: parseDef(def.rest._def, {
|
|
36873
|
+
...refs,
|
|
36874
|
+
currentPath: [...refs.currentPath, "additionalItems"]
|
|
36875
|
+
})
|
|
36876
|
+
};
|
|
36877
|
+
} else {
|
|
36878
|
+
return {
|
|
36879
|
+
type: "array",
|
|
36880
|
+
minItems: def.items.length,
|
|
36881
|
+
maxItems: def.items.length,
|
|
36882
|
+
items: def.items.map((x, i) => parseDef(x._def, {
|
|
36883
|
+
...refs,
|
|
36884
|
+
currentPath: [...refs.currentPath, "items", `${i}`]
|
|
36885
|
+
})).reduce((acc, x) => x === void 0 ? acc : [...acc, x], [])
|
|
36886
|
+
};
|
|
36887
|
+
}
|
|
36888
|
+
}
|
|
36889
|
+
|
|
36890
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js
|
|
36891
|
+
function parseUndefinedDef(refs) {
|
|
36892
|
+
return {
|
|
36893
|
+
not: parseAnyDef(refs)
|
|
36894
|
+
};
|
|
36895
|
+
}
|
|
36896
|
+
|
|
36897
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js
|
|
36898
|
+
function parseUnknownDef(refs) {
|
|
36899
|
+
return parseAnyDef(refs);
|
|
36900
|
+
}
|
|
36901
|
+
|
|
36902
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js
|
|
36903
|
+
var parseReadonlyDef = (def, refs) => {
|
|
36904
|
+
return parseDef(def.innerType._def, refs);
|
|
36905
|
+
};
|
|
36906
|
+
|
|
36907
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/selectParser.js
|
|
36908
|
+
var selectParser = (def, typeName, refs) => {
|
|
36909
|
+
switch (typeName) {
|
|
36910
|
+
case ZodFirstPartyTypeKind3.ZodString:
|
|
36911
|
+
return parseStringDef(def, refs);
|
|
36912
|
+
case ZodFirstPartyTypeKind3.ZodNumber:
|
|
36913
|
+
return parseNumberDef(def, refs);
|
|
36914
|
+
case ZodFirstPartyTypeKind3.ZodObject:
|
|
36915
|
+
return parseObjectDef(def, refs);
|
|
36916
|
+
case ZodFirstPartyTypeKind3.ZodBigInt:
|
|
36917
|
+
return parseBigintDef(def, refs);
|
|
36918
|
+
case ZodFirstPartyTypeKind3.ZodBoolean:
|
|
36919
|
+
return parseBooleanDef();
|
|
36920
|
+
case ZodFirstPartyTypeKind3.ZodDate:
|
|
36921
|
+
return parseDateDef(def, refs);
|
|
36922
|
+
case ZodFirstPartyTypeKind3.ZodUndefined:
|
|
36923
|
+
return parseUndefinedDef(refs);
|
|
36924
|
+
case ZodFirstPartyTypeKind3.ZodNull:
|
|
36925
|
+
return parseNullDef(refs);
|
|
36926
|
+
case ZodFirstPartyTypeKind3.ZodArray:
|
|
36927
|
+
return parseArrayDef(def, refs);
|
|
36928
|
+
case ZodFirstPartyTypeKind3.ZodUnion:
|
|
36929
|
+
case ZodFirstPartyTypeKind3.ZodDiscriminatedUnion:
|
|
36930
|
+
return parseUnionDef(def, refs);
|
|
36931
|
+
case ZodFirstPartyTypeKind3.ZodIntersection:
|
|
36932
|
+
return parseIntersectionDef(def, refs);
|
|
36933
|
+
case ZodFirstPartyTypeKind3.ZodTuple:
|
|
36934
|
+
return parseTupleDef(def, refs);
|
|
36935
|
+
case ZodFirstPartyTypeKind3.ZodRecord:
|
|
36936
|
+
return parseRecordDef(def, refs);
|
|
36937
|
+
case ZodFirstPartyTypeKind3.ZodLiteral:
|
|
36938
|
+
return parseLiteralDef(def, refs);
|
|
36939
|
+
case ZodFirstPartyTypeKind3.ZodEnum:
|
|
36940
|
+
return parseEnumDef(def);
|
|
36941
|
+
case ZodFirstPartyTypeKind3.ZodNativeEnum:
|
|
36942
|
+
return parseNativeEnumDef(def);
|
|
36943
|
+
case ZodFirstPartyTypeKind3.ZodNullable:
|
|
36944
|
+
return parseNullableDef(def, refs);
|
|
36945
|
+
case ZodFirstPartyTypeKind3.ZodOptional:
|
|
36946
|
+
return parseOptionalDef(def, refs);
|
|
36947
|
+
case ZodFirstPartyTypeKind3.ZodMap:
|
|
36948
|
+
return parseMapDef(def, refs);
|
|
36949
|
+
case ZodFirstPartyTypeKind3.ZodSet:
|
|
36950
|
+
return parseSetDef(def, refs);
|
|
36951
|
+
case ZodFirstPartyTypeKind3.ZodLazy:
|
|
36952
|
+
return () => def.getter()._def;
|
|
36953
|
+
case ZodFirstPartyTypeKind3.ZodPromise:
|
|
36954
|
+
return parsePromiseDef(def, refs);
|
|
36955
|
+
case ZodFirstPartyTypeKind3.ZodNaN:
|
|
36956
|
+
case ZodFirstPartyTypeKind3.ZodNever:
|
|
36957
|
+
return parseNeverDef(refs);
|
|
36958
|
+
case ZodFirstPartyTypeKind3.ZodEffects:
|
|
36959
|
+
return parseEffectsDef(def, refs);
|
|
36960
|
+
case ZodFirstPartyTypeKind3.ZodAny:
|
|
36961
|
+
return parseAnyDef(refs);
|
|
36962
|
+
case ZodFirstPartyTypeKind3.ZodUnknown:
|
|
36963
|
+
return parseUnknownDef(refs);
|
|
36964
|
+
case ZodFirstPartyTypeKind3.ZodDefault:
|
|
36965
|
+
return parseDefaultDef(def, refs);
|
|
36966
|
+
case ZodFirstPartyTypeKind3.ZodBranded:
|
|
36967
|
+
return parseBrandedDef(def, refs);
|
|
36968
|
+
case ZodFirstPartyTypeKind3.ZodReadonly:
|
|
36969
|
+
return parseReadonlyDef(def, refs);
|
|
36970
|
+
case ZodFirstPartyTypeKind3.ZodCatch:
|
|
36971
|
+
return parseCatchDef(def, refs);
|
|
36972
|
+
case ZodFirstPartyTypeKind3.ZodPipeline:
|
|
36973
|
+
return parsePipelineDef(def, refs);
|
|
36974
|
+
case ZodFirstPartyTypeKind3.ZodFunction:
|
|
36975
|
+
case ZodFirstPartyTypeKind3.ZodVoid:
|
|
36976
|
+
case ZodFirstPartyTypeKind3.ZodSymbol:
|
|
36977
|
+
return void 0;
|
|
36978
|
+
default:
|
|
36979
|
+
return /* @__PURE__ */ ((_) => void 0)(typeName);
|
|
36980
|
+
}
|
|
36981
|
+
};
|
|
36982
|
+
|
|
36983
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parseDef.js
|
|
36984
|
+
function parseDef(def, refs, forceResolution = false) {
|
|
36985
|
+
const seenItem = refs.seen.get(def);
|
|
36986
|
+
if (refs.override) {
|
|
36987
|
+
const overrideResult = refs.override?.(def, refs, seenItem, forceResolution);
|
|
36988
|
+
if (overrideResult !== ignoreOverride) {
|
|
36989
|
+
return overrideResult;
|
|
36990
|
+
}
|
|
36991
|
+
}
|
|
36992
|
+
if (seenItem && !forceResolution) {
|
|
36993
|
+
const seenSchema = get$ref(seenItem, refs);
|
|
36994
|
+
if (seenSchema !== void 0) {
|
|
36995
|
+
return seenSchema;
|
|
36996
|
+
}
|
|
36997
|
+
}
|
|
36998
|
+
const newItem = { def, path: refs.currentPath, jsonSchema: void 0 };
|
|
36999
|
+
refs.seen.set(def, newItem);
|
|
37000
|
+
const jsonSchemaOrGetter = selectParser(def, def.typeName, refs);
|
|
37001
|
+
const jsonSchema = typeof jsonSchemaOrGetter === "function" ? parseDef(jsonSchemaOrGetter(), refs) : jsonSchemaOrGetter;
|
|
37002
|
+
if (jsonSchema) {
|
|
37003
|
+
addMeta(def, refs, jsonSchema);
|
|
37004
|
+
}
|
|
37005
|
+
if (refs.postProcess) {
|
|
37006
|
+
const postProcessResult = refs.postProcess(jsonSchema, def, refs);
|
|
37007
|
+
newItem.jsonSchema = jsonSchema;
|
|
37008
|
+
return postProcessResult;
|
|
37009
|
+
}
|
|
37010
|
+
newItem.jsonSchema = jsonSchema;
|
|
37011
|
+
return jsonSchema;
|
|
37012
|
+
}
|
|
37013
|
+
var get$ref = (item, refs) => {
|
|
37014
|
+
switch (refs.$refStrategy) {
|
|
37015
|
+
case "root":
|
|
37016
|
+
return { $ref: item.path.join("/") };
|
|
37017
|
+
case "relative":
|
|
37018
|
+
return { $ref: getRelativePath(refs.currentPath, item.path) };
|
|
37019
|
+
case "none":
|
|
37020
|
+
case "seen": {
|
|
37021
|
+
if (item.path.length < refs.currentPath.length && item.path.every((value, index) => refs.currentPath[index] === value)) {
|
|
37022
|
+
console.warn(`Recursive reference detected at ${refs.currentPath.join("/")}! Defaulting to any`);
|
|
37023
|
+
return parseAnyDef(refs);
|
|
37024
|
+
}
|
|
37025
|
+
return refs.$refStrategy === "seen" ? parseAnyDef(refs) : void 0;
|
|
37026
|
+
}
|
|
37027
|
+
}
|
|
37028
|
+
};
|
|
37029
|
+
var addMeta = (def, refs, jsonSchema) => {
|
|
37030
|
+
if (def.description) {
|
|
37031
|
+
jsonSchema.description = def.description;
|
|
37032
|
+
if (refs.markdownDescription) {
|
|
37033
|
+
jsonSchema.markdownDescription = def.description;
|
|
37034
|
+
}
|
|
37035
|
+
}
|
|
37036
|
+
return jsonSchema;
|
|
37037
|
+
};
|
|
37038
|
+
|
|
37039
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js
|
|
37040
|
+
var zodToJsonSchema = (schema, options) => {
|
|
37041
|
+
const refs = getRefs(options);
|
|
37042
|
+
let definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name2, schema2]) => ({
|
|
37043
|
+
...acc,
|
|
37044
|
+
[name2]: parseDef(schema2._def, {
|
|
37045
|
+
...refs,
|
|
37046
|
+
currentPath: [...refs.basePath, refs.definitionPath, name2]
|
|
37047
|
+
}, true) ?? parseAnyDef(refs)
|
|
37048
|
+
}), {}) : void 0;
|
|
37049
|
+
const name = typeof options === "string" ? options : options?.nameStrategy === "title" ? void 0 : options?.name;
|
|
37050
|
+
const main2 = parseDef(schema._def, name === void 0 ? refs : {
|
|
37051
|
+
...refs,
|
|
37052
|
+
currentPath: [...refs.basePath, refs.definitionPath, name]
|
|
37053
|
+
}, false) ?? parseAnyDef(refs);
|
|
37054
|
+
const title = typeof options === "object" && options.name !== void 0 && options.nameStrategy === "title" ? options.name : void 0;
|
|
37055
|
+
if (title !== void 0) {
|
|
37056
|
+
main2.title = title;
|
|
37057
|
+
}
|
|
37058
|
+
if (refs.flags.hasReferencedOpenAiAnyType) {
|
|
37059
|
+
if (!definitions) {
|
|
37060
|
+
definitions = {};
|
|
37061
|
+
}
|
|
37062
|
+
if (!definitions[refs.openAiAnyTypeName]) {
|
|
37063
|
+
definitions[refs.openAiAnyTypeName] = {
|
|
37064
|
+
// Skipping "object" as no properties can be defined and additionalProperties must be "false"
|
|
37065
|
+
type: ["string", "number", "integer", "boolean", "array", "null"],
|
|
37066
|
+
items: {
|
|
37067
|
+
$ref: refs.$refStrategy === "relative" ? "1" : [
|
|
37068
|
+
...refs.basePath,
|
|
37069
|
+
refs.definitionPath,
|
|
37070
|
+
refs.openAiAnyTypeName
|
|
37071
|
+
].join("/")
|
|
37072
|
+
}
|
|
37073
|
+
};
|
|
37074
|
+
}
|
|
37075
|
+
}
|
|
37076
|
+
const combined = name === void 0 ? definitions ? {
|
|
37077
|
+
...main2,
|
|
37078
|
+
[refs.definitionPath]: definitions
|
|
37079
|
+
} : main2 : {
|
|
37080
|
+
$ref: [
|
|
37081
|
+
...refs.$refStrategy === "relative" ? [] : refs.basePath,
|
|
37082
|
+
refs.definitionPath,
|
|
37083
|
+
name
|
|
37084
|
+
].join("/"),
|
|
37085
|
+
[refs.definitionPath]: {
|
|
37086
|
+
...definitions,
|
|
37087
|
+
[name]: main2
|
|
37088
|
+
}
|
|
37089
|
+
};
|
|
37090
|
+
if (refs.target === "jsonSchema7") {
|
|
37091
|
+
combined.$schema = "http://json-schema.org/draft-07/schema#";
|
|
37092
|
+
} else if (refs.target === "jsonSchema2019-09" || refs.target === "openAi") {
|
|
37093
|
+
combined.$schema = "https://json-schema.org/draft/2019-09/schema#";
|
|
37094
|
+
}
|
|
37095
|
+
if (refs.target === "openAi" && ("anyOf" in combined || "oneOf" in combined || "allOf" in combined || "type" in combined && Array.isArray(combined.type))) {
|
|
37096
|
+
console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property.");
|
|
37097
|
+
}
|
|
37098
|
+
return combined;
|
|
37099
|
+
};
|
|
37100
|
+
|
|
37101
|
+
// ../engine/dist/mcp/input-schema.js
|
|
37102
|
+
function inputSchemaOf(schema) {
|
|
37103
|
+
const convert = zodToJsonSchema;
|
|
37104
|
+
const json = convert(schema, { target: "jsonSchema7", $refStrategy: "none", effectStrategy: "input" });
|
|
37105
|
+
const { $schema: _s, definitions: _d, additionalProperties: _a, ...rest } = json;
|
|
37106
|
+
if (rest.type !== "object")
|
|
37107
|
+
throw new Error("inputSchemaOf needs a zod object");
|
|
37108
|
+
return rest;
|
|
37109
|
+
}
|
|
37110
|
+
|
|
37111
|
+
// ../engine/dist/mcp/tools.js
|
|
35809
37112
|
import { existsSync as existsSync23, readFileSync as readFileSync25, statSync as statSync23 } from "fs";
|
|
35810
37113
|
import { join as join32 } from "path";
|
|
35811
37114
|
|
|
@@ -36618,7 +37921,7 @@ var RecallTasksSchema = z.object({
|
|
|
36618
37921
|
});
|
|
36619
37922
|
var RecallTaskCreateSchema = z.object({
|
|
36620
37923
|
title: z.string().describe("Task title"),
|
|
36621
|
-
description: z.string().optional(),
|
|
37924
|
+
description: z.string().optional().describe("What the work actually is. The title is the label; this is where the detail a future reader needs belongs."),
|
|
36622
37925
|
project: z.string().optional().describe("project_id this task belongs to"),
|
|
36623
37926
|
assignee: z.string().optional().describe("Teammate user id (sub) to assign; omit to leave unassigned"),
|
|
36624
37927
|
due: z.number().optional().describe("Due date, epoch milliseconds. Set one when the work is time-bound; omit otherwise."),
|
|
@@ -36633,7 +37936,7 @@ var RecallTaskUpdateSchema = z.object({
|
|
|
36633
37936
|
files: z.array(z.string()).optional().describe("Files those commits changed. PASS THESE: without them the card cannot narrow the session's diff to this card, and shows no changes at all rather than another repository's."),
|
|
36634
37937
|
summary: z.string().optional().describe("One line on what changed (optional)."),
|
|
36635
37938
|
assignee: z.string().optional().describe("Reassign to this user id (sub); empty string unassigns"),
|
|
36636
|
-
title: z.string().optional(),
|
|
37939
|
+
title: z.string().optional().describe("Rename the card. Omit to leave the title alone."),
|
|
36637
37940
|
comment: z.string().optional().describe("Add a comment to the task"),
|
|
36638
37941
|
linked_session_id: z.string().nullable().optional().describe("Session id to attach to the task (null detaches). Pass YOUR OWN current session id when you start working on the task.")
|
|
36639
37942
|
});
|
|
@@ -36664,7 +37967,7 @@ var RecallTaskCommentSchema = z.object({
|
|
|
36664
37967
|
var RecallKGQuerySchema = z.object({
|
|
36665
37968
|
entity: z.string().describe('Entity name to query (e.g., "Alice", "chat-recall", "PostgreSQL")'),
|
|
36666
37969
|
as_of: z.string().optional().describe("Date filter \u2014 only facts valid at this date (YYYY-MM-DD)"),
|
|
36667
|
-
direction: z.enum(["outgoing", "incoming", "both"]).optional().default("both")
|
|
37970
|
+
direction: z.enum(["outgoing", "incoming", "both"]).optional().default("both").describe("Which edges to follow: facts where the entity is the subject (outgoing), the object (incoming), or both.")
|
|
36668
37971
|
});
|
|
36669
37972
|
var RecallKGAddSchema = z.object({
|
|
36670
37973
|
subject: z.string().describe("The entity doing/being something"),
|
|
@@ -36778,7 +38081,7 @@ var RecallDecisionsSchema = z.object({
|
|
|
36778
38081
|
area: z.string().optional().describe("Only this area"),
|
|
36779
38082
|
project: z.string().optional().describe("Resolve for this project"),
|
|
36780
38083
|
workspace: z.string().optional().describe('Folder group to resolve through, e.g. "personal". Resolved from the current directory when omitted.'),
|
|
36781
|
-
include_candidates: z.boolean().optional().default(false)
|
|
38084
|
+
include_candidates: z.boolean().optional().default(false).describe("Also return unconfirmed guesses the indexer extracted. These are NOT decisions \u2014 never treat one as settled.")
|
|
36782
38085
|
});
|
|
36783
38086
|
var RecallDecisionScanSchema = z.object({
|
|
36784
38087
|
path: z.string().optional().describe("Repository root to read. Defaults to the current directory."),
|
|
@@ -37102,19 +38405,7 @@ Three modes on one tool:
|
|
|
37102
38405
|
first prompt as the search text, excludes itself, groups hits by project).
|
|
37103
38406
|
- \`include_outcome: true\` \u2014 append a per-result outcome one-liner (shipped /
|
|
37104
38407
|
interrupted / abandoned + edit stats) to judge whether each hit is worth resuming.`,
|
|
37105
|
-
inputSchema:
|
|
37106
|
-
type: "object",
|
|
37107
|
-
properties: {
|
|
37108
|
-
query: { type: "string", description: `What you're looking for (e.g., "OAuth implementation"). Required unless like_session is set.` },
|
|
37109
|
-
like_session: { type: "string", description: "Find sessions similar to this session id instead of a free-text query." },
|
|
37110
|
-
include_outcome: { type: "boolean", default: false, description: "Append per-result outcome one-liners (status + edit stats)." },
|
|
37111
|
-
top_k: { type: "number", default: 5, description: "Number of results to return" },
|
|
37112
|
-
project_filter: { type: "string", description: "Optional filter by project path substring" },
|
|
37113
|
-
skip_ranking: { type: "boolean", default: false, description: "Skip Claude ranking for faster results" },
|
|
37114
|
-
provider: { type: "string", enum: ["ollama", "gemini"], default: "ollama", description: "Embedding provider" },
|
|
37115
|
-
scope: { type: "string", enum: ["local", "server"], default: "local", description: "Accepted for back-compat; search always runs against the synced server." }
|
|
37116
|
-
}
|
|
37117
|
-
}
|
|
38408
|
+
inputSchema: inputSchemaOf(RecallSearchSchema)
|
|
37118
38409
|
},
|
|
37119
38410
|
{
|
|
37120
38411
|
name: "recall_index",
|
|
@@ -37122,13 +38413,7 @@ Three modes on one tool:
|
|
|
37122
38413
|
|
|
37123
38414
|
Scans ~/.claude/projects/ and creates embeddings for all sessions.
|
|
37124
38415
|
By default, only indexes new or changed sessions.`,
|
|
37125
|
-
inputSchema:
|
|
37126
|
-
type: "object",
|
|
37127
|
-
properties: {
|
|
37128
|
-
force: { type: "boolean", default: false, description: "Force re-index all sessions" },
|
|
37129
|
-
provider: { type: "string", enum: ["ollama", "gemini"], default: "ollama", description: "Embedding provider" }
|
|
37130
|
-
}
|
|
37131
|
-
}
|
|
38416
|
+
inputSchema: inputSchemaOf(RecallIndexSchema)
|
|
37132
38417
|
},
|
|
37133
38418
|
{
|
|
37134
38419
|
name: "recall_status",
|
|
@@ -37154,18 +38439,7 @@ Four ways to reach a message:
|
|
|
37154
38439
|
Message text and commands come back in full. Tool calls come with their inputs
|
|
37155
38440
|
and results; a body over 2000 characters shows its first and last 100 and the
|
|
37156
38441
|
line to pass as \`expand_line\` to get it whole.`,
|
|
37157
|
-
inputSchema:
|
|
37158
|
-
type: "object",
|
|
37159
|
-
properties: {
|
|
37160
|
-
session_id: { type: "string", description: "Session ID from search results, or a plan id (filename without .md)" },
|
|
37161
|
-
around_line: { type: "number", description: "Transcript line to centre on. Returns max_messages messages around the message nearest to it." },
|
|
37162
|
-
max_messages: { type: "number", default: 10, description: "Messages to return with around_line or query, or from the start of the session. from_end sets its own count." },
|
|
37163
|
-
from_end: { type: "number", description: "Return the last N messages (alternative to around_line)." },
|
|
37164
|
-
expand_line: { type: "number", description: "Return only the message at this line, with every tool input and result whole." },
|
|
37165
|
-
query: { type: "string", description: "Return the messages that contain this text (case-insensitive), with their lines. Searches message text, tool inputs and tool results." }
|
|
37166
|
-
},
|
|
37167
|
-
required: ["session_id"]
|
|
37168
|
-
}
|
|
38442
|
+
inputSchema: inputSchemaOf(RecallShowSchema)
|
|
37169
38443
|
},
|
|
37170
38444
|
{
|
|
37171
38445
|
name: "recall_recent",
|
|
@@ -37179,15 +38453,7 @@ Pass \`since_hours: N\` to restrict to sessions modified in the last N hours.
|
|
|
37179
38453
|
It lists synced transcripts, which reach the server some time after they change. To find a
|
|
37180
38454
|
session that runs NOW, or to send one a message, use recall_session_status: it lists the live
|
|
37181
38455
|
sessions of every AI tool, with their ids and names.`,
|
|
37182
|
-
inputSchema:
|
|
37183
|
-
type: "object",
|
|
37184
|
-
properties: {
|
|
37185
|
-
project_filter: { type: "string", description: 'Filter by project name (e.g., "acme", "poly")' },
|
|
37186
|
-
limit: { type: "number", default: 10, description: "Number of recent sessions to show" },
|
|
37187
|
-
since_hours: { type: "number", description: "Only include sessions modified in the last N hours." },
|
|
37188
|
-
scope: { type: "string", enum: ["local", "server"], default: "local", description: "server = synced cross-device history (needs chat-recall login)." }
|
|
37189
|
-
}
|
|
37190
|
-
}
|
|
38456
|
+
inputSchema: inputSchemaOf(RecallRecentSchema)
|
|
37191
38457
|
},
|
|
37192
38458
|
{
|
|
37193
38459
|
name: "recall_forget",
|
|
@@ -37202,14 +38468,7 @@ tell them that, because it is usually what they mean to keep.
|
|
|
37202
38468
|
|
|
37203
38469
|
IRREVERSIBLE. There is no undo and no tool that restores it. Only pass \`confirm: true\` when the user
|
|
37204
38470
|
has actually asked for this; do not infer it from a complaint about a conversation.`,
|
|
37205
|
-
inputSchema:
|
|
37206
|
-
type: "object",
|
|
37207
|
-
properties: {
|
|
37208
|
-
session_id: { type: "string", description: "Session ID to delete (from recall_recent / recall_search)." },
|
|
37209
|
-
confirm: { type: "boolean", description: "Must be true. Only when the user actually asked to delete it." }
|
|
37210
|
-
},
|
|
37211
|
-
required: ["session_id", "confirm"]
|
|
37212
|
-
}
|
|
38471
|
+
inputSchema: inputSchemaOf(RecallForgetSchema)
|
|
37213
38472
|
},
|
|
37214
38473
|
{
|
|
37215
38474
|
name: "recall_exclude_path",
|
|
@@ -37224,14 +38483,7 @@ so, and offer recall_forget for the ones that matter.
|
|
|
37224
38483
|
|
|
37225
38484
|
There is deliberately no tool to REMOVE an exclusion: an agent may narrow what is synced, never widen it.
|
|
37226
38485
|
Undo it with \`chat-recall exclude remove <path>\` or in the dashboard.`,
|
|
37227
|
-
inputSchema:
|
|
37228
|
-
type: "object",
|
|
37229
|
-
properties: {
|
|
37230
|
-
path: { type: "string", description: "Absolute path (or a distinctive part of one) to stop syncing." },
|
|
37231
|
-
confirm: { type: "boolean", description: "Must be true. Only when the user actually asked to stop syncing it." }
|
|
37232
|
-
},
|
|
37233
|
-
required: ["path", "confirm"]
|
|
37234
|
-
}
|
|
38486
|
+
inputSchema: inputSchemaOf(RecallExcludePathSchema)
|
|
37235
38487
|
},
|
|
37236
38488
|
{
|
|
37237
38489
|
name: "recall_rename_session",
|
|
@@ -37242,14 +38494,7 @@ recall_recent and the web UI. Use it when the user says "name this conversation
|
|
|
37242
38494
|
or "rename this to Z". Pass an empty string to clear the name and revert to the auto title.
|
|
37243
38495
|
|
|
37244
38496
|
The name persists across re-syncs and summary regeneration (it's stored separately from the AI summary).`,
|
|
37245
|
-
inputSchema:
|
|
37246
|
-
type: "object",
|
|
37247
|
-
properties: {
|
|
37248
|
-
session_id: { type: "string", description: "Session ID to name (from recall_recent / recall_search)." },
|
|
37249
|
-
name: { type: "string", description: "The name to give this conversation. Empty string clears it." }
|
|
37250
|
-
},
|
|
37251
|
-
required: ["session_id", "name"]
|
|
37252
|
-
}
|
|
38497
|
+
inputSchema: inputSchemaOf(RecallRenameSchema)
|
|
37253
38498
|
},
|
|
37254
38499
|
{
|
|
37255
38500
|
name: "recall_edits_timeline",
|
|
@@ -37266,24 +38511,7 @@ two hours of edits across every session and every AI tool.
|
|
|
37266
38511
|
|
|
37267
38512
|
Pass \`group_by: "session"\` (with \`pattern\` + a wide \`since_hours\`, e.g. 720) to
|
|
37268
38513
|
aggregate per session instead \u2014 "which sessions edited auth.rs in the last month?".`,
|
|
37269
|
-
inputSchema:
|
|
37270
|
-
type: "object",
|
|
37271
|
-
properties: {
|
|
37272
|
-
since_hours: { type: "number", default: 24, description: "Time window in hours" },
|
|
37273
|
-
limit: { type: "number", default: 100, description: "Maximum edit rows to return" },
|
|
37274
|
-
pattern: { type: "string", description: "Optional substring filter on file path" },
|
|
37275
|
-
project_filter: { type: "string", description: "Filter by encoded project directory name" },
|
|
37276
|
-
include_reads: { type: "boolean", default: false, description: "Include Read tool_uses too" },
|
|
37277
|
-
tools: {
|
|
37278
|
-
type: "array",
|
|
37279
|
-
items: { type: "string", enum: ["claude", "opencode", "codex", "agy", "cursor", "hermes", "pi"] },
|
|
37280
|
-
description: "Restrict to specific AI tools. Default: every tool this machine has."
|
|
37281
|
-
},
|
|
37282
|
-
group_by_repo: { type: "boolean", default: false, description: "Group results by detected git repo root." },
|
|
37283
|
-
view: { type: "string", enum: ["timeline", "summary"], default: "timeline", description: "timeline = chronological edit rows; summary = aggregated rollup over the same window" },
|
|
37284
|
-
group_by: { type: "string", enum: ["session"], description: '"session" = aggregate edits per session (which sessions touched files matching pattern).' }
|
|
37285
|
-
}
|
|
37286
|
-
}
|
|
38514
|
+
inputSchema: inputSchemaOf(RecallEditsTimelineSchema)
|
|
37287
38515
|
},
|
|
37288
38516
|
{
|
|
37289
38517
|
name: "recall_context",
|
|
@@ -37297,13 +38525,7 @@ Returns:
|
|
|
37297
38525
|
- Summary if available
|
|
37298
38526
|
|
|
37299
38527
|
Use this to understand what happened in a session before resuming.`,
|
|
37300
|
-
inputSchema:
|
|
37301
|
-
type: "object",
|
|
37302
|
-
properties: {
|
|
37303
|
-
session_id: { type: "string", description: "Session ID to get context from" }
|
|
37304
|
-
},
|
|
37305
|
-
required: ["session_id"]
|
|
37306
|
-
}
|
|
38528
|
+
inputSchema: inputSchemaOf(RecallContextSchema)
|
|
37307
38529
|
},
|
|
37308
38530
|
{
|
|
37309
38531
|
name: "recall_summary",
|
|
@@ -37318,14 +38540,7 @@ markers, and the last assistant claim paired with the user's reaction to it
|
|
|
37318
38540
|
This is the triage call when scanning a session list \u2014 it answers the question
|
|
37319
38541
|
the AI summary doesn't: did this work actually land?
|
|
37320
38542
|
Pass \`rich: false\` to fall back to the legacy single-line AI summary only.`,
|
|
37321
|
-
inputSchema:
|
|
37322
|
-
type: "object",
|
|
37323
|
-
properties: {
|
|
37324
|
-
session_id: { type: "string", description: "Session ID to get summary for" },
|
|
37325
|
-
rich: { type: "boolean", default: true, description: "Include structured outcome alongside AI summary" }
|
|
37326
|
-
},
|
|
37327
|
-
required: ["session_id"]
|
|
37328
|
-
}
|
|
38543
|
+
inputSchema: inputSchemaOf(RecallSummarySchema)
|
|
37329
38544
|
},
|
|
37330
38545
|
{
|
|
37331
38546
|
name: "recall_diff",
|
|
@@ -37340,17 +38555,7 @@ Pass \`file\` to focus on a single absolute path. Pass \`context_only: true\` fo
|
|
|
37340
38555
|
just the per-file stats (lines added/removed) when you don't need the diff body.
|
|
37341
38556
|
Pass \`files_only: true\` for just the list of files the session touched (grouped
|
|
37342
38557
|
by extension, with tools used) \u2014 "which files did session X actually touch?".`,
|
|
37343
|
-
inputSchema:
|
|
37344
|
-
type: "object",
|
|
37345
|
-
properties: {
|
|
37346
|
-
session_id: { type: "string", description: "Session ID to replay" },
|
|
37347
|
-
file: { type: "string", description: "Absolute file path to focus on (optional)" },
|
|
37348
|
-
context_only: { type: "boolean", default: false, description: "Skip diff bodies, return stats only" },
|
|
37349
|
-
files_only: { type: "boolean", default: false, description: "Return just the file list (no diffs/stats)" },
|
|
37350
|
-
max_diff_chars: { type: "number", default: 4e3, description: "Truncate each per-file unified diff" }
|
|
37351
|
-
},
|
|
37352
|
-
required: ["session_id"]
|
|
37353
|
-
}
|
|
38558
|
+
inputSchema: inputSchemaOf(RecallDiffSchema)
|
|
37354
38559
|
},
|
|
37355
38560
|
{
|
|
37356
38561
|
name: "recall_commits",
|
|
@@ -37362,14 +38567,7 @@ between commit-files and session-touched-files.
|
|
|
37362
38567
|
|
|
37363
38568
|
Use this to verify "shipped" claims \u2014 if the session edited 18 files but no
|
|
37364
38569
|
matching commit exists, work probably stayed local.`,
|
|
37365
|
-
inputSchema:
|
|
37366
|
-
type: "object",
|
|
37367
|
-
properties: {
|
|
37368
|
-
session_id: { type: "string", description: "Session ID to look up commits for" },
|
|
37369
|
-
buffer_minutes: { type: "number", default: 30, description: "Window padding on each side" }
|
|
37370
|
-
},
|
|
37371
|
-
required: ["session_id"]
|
|
37372
|
-
}
|
|
38570
|
+
inputSchema: inputSchemaOf(RecallCommitsSchema)
|
|
37373
38571
|
},
|
|
37374
38572
|
{
|
|
37375
38573
|
name: "recall_markers",
|
|
@@ -37385,14 +38583,7 @@ matching commit exists, work probably stayed local.`,
|
|
|
37385
38583
|
|
|
37386
38584
|
Returns per-prompt markers + a session-level summary count. Use this to spot
|
|
37387
38585
|
sessions where things went sideways before reading the whole transcript.`,
|
|
37388
|
-
inputSchema:
|
|
37389
|
-
type: "object",
|
|
37390
|
-
properties: {
|
|
37391
|
-
session_id: { type: "string", description: "Session ID to mark prompts in" },
|
|
37392
|
-
limit: { type: "number", default: 200, description: "Maximum prompts to return" }
|
|
37393
|
-
},
|
|
37394
|
-
required: ["session_id"]
|
|
37395
|
-
}
|
|
38586
|
+
inputSchema: inputSchemaOf(RecallMarkersSchema)
|
|
37396
38587
|
},
|
|
37397
38588
|
{
|
|
37398
38589
|
name: "recall_memory_search",
|
|
@@ -37401,23 +38592,7 @@ sessions where things went sideways before reading the whole transcript.`,
|
|
|
37401
38592
|
Returns results from any memory source, ranked by relevance. Use source_types to filter.
|
|
37402
38593
|
Plans and tasks are found here (source_types: ['plan', 'task']); read a full plan
|
|
37403
38594
|
with recall_show (pass the plan id).`,
|
|
37404
|
-
inputSchema:
|
|
37405
|
-
type: "object",
|
|
37406
|
-
properties: {
|
|
37407
|
-
query: { type: "string", description: "What you're looking for across all memory types" },
|
|
37408
|
-
top_k: { type: "number", default: 10, description: "Number of results" },
|
|
37409
|
-
source_types: {
|
|
37410
|
-
type: "array",
|
|
37411
|
-
items: { type: "string", enum: ["session", "plan", "task", "claude_md", "paste", "history", "diary"] },
|
|
37412
|
-
description: "Filter by source types (default: all)"
|
|
37413
|
-
},
|
|
37414
|
-
project_filter: { type: "string", description: "Filter by project path" },
|
|
37415
|
-
provider: { type: "string", enum: ["ollama", "gemini"], default: "ollama", description: "Embedding provider, when the server has vector search configured. Ignored on a keyword-only server." },
|
|
37416
|
-
scope: { type: "string", enum: ["local", "server"], default: "local", description: "server = synced cross-device history (needs chat-recall login)." },
|
|
37417
|
-
semantic: { type: "boolean", default: false, description: "Reserved and currently ignored: the semantic tier is switched off server-side, so every search runs keyword FTS." }
|
|
37418
|
-
},
|
|
37419
|
-
required: ["query"]
|
|
37420
|
-
}
|
|
38595
|
+
inputSchema: inputSchemaOf(RecallMemorySearchSchema)
|
|
37421
38596
|
},
|
|
37422
38597
|
{
|
|
37423
38598
|
name: "recall_smart_resume",
|
|
@@ -37441,14 +38616,7 @@ A bare call takes the globally newest sessions, which may belong to different
|
|
|
37441
38616
|
projects \u2014 the output says so when they do. Pass project_filter to scope it.
|
|
37442
38617
|
|
|
37443
38618
|
Use this instead of recall_context for a more actionable summary when resuming work.`,
|
|
37444
|
-
inputSchema:
|
|
37445
|
-
type: "object",
|
|
37446
|
-
properties: {
|
|
37447
|
-
session_id: { type: "string", description: "Session to resume. OMIT to resume the most recent session." },
|
|
37448
|
-
project_filter: { type: "string", description: "With session_id omitted, resume the latest sessions from this project." },
|
|
37449
|
-
depth: { type: "number", default: 3, minimum: 1, maximum: 5, description: "How many recent sessions to cover: the newest in full, the rest as digests. Ignored when session_id is set." }
|
|
37450
|
-
}
|
|
37451
|
-
}
|
|
38619
|
+
inputSchema: inputSchemaOf(RecallSmartResumeSchema)
|
|
37452
38620
|
},
|
|
37453
38621
|
{
|
|
37454
38622
|
name: "recall_project_context",
|
|
@@ -37467,16 +38635,7 @@ Accepts EITHER a project path / name substring (e.g. "api", "example-app",
|
|
|
37467
38635
|
- "user:<custom>" (declared in ~/.chat-recall/projects.json)
|
|
37468
38636
|
|
|
37469
38637
|
Use at the START of a new session to understand what's been happening in a project.`,
|
|
37470
|
-
inputSchema:
|
|
37471
|
-
type: "object",
|
|
37472
|
-
properties: {
|
|
37473
|
-
project_path: { type: "string", description: "Project path, name substring, or project_id (git:/ws:/git-local:/user:)" },
|
|
37474
|
-
limit: { type: "number", default: 5, description: "Number of recent sessions to include" },
|
|
37475
|
-
tasks: { type: "number", default: 20, description: "Max open tasks to list" },
|
|
37476
|
-
plans: { type: "number", default: 20, description: "Max plans to list" }
|
|
37477
|
-
},
|
|
37478
|
-
required: ["project_path"]
|
|
37479
|
-
}
|
|
38638
|
+
inputSchema: inputSchemaOf(RecallProjectContextSchema)
|
|
37480
38639
|
},
|
|
37481
38640
|
{
|
|
37482
38641
|
name: "recall_weekly_digest",
|
|
@@ -37490,12 +38649,7 @@ Returns:
|
|
|
37490
38649
|
- Git activity summary
|
|
37491
38650
|
|
|
37492
38651
|
Use to understand overall productivity and spending.`,
|
|
37493
|
-
inputSchema:
|
|
37494
|
-
type: "object",
|
|
37495
|
-
properties: {
|
|
37496
|
-
weeks_back: { type: "number", default: 0, description: "0 = current week, 1 = last week" }
|
|
37497
|
-
}
|
|
37498
|
-
}
|
|
38652
|
+
inputSchema: inputSchemaOf(RecallWeeklyDigestSchema)
|
|
37499
38653
|
},
|
|
37500
38654
|
{
|
|
37501
38655
|
name: "recall_team_activity",
|
|
@@ -37507,14 +38661,7 @@ work on projects they've shared into the team (private projects never appear).
|
|
|
37507
38661
|
|
|
37508
38662
|
Use for "what has the team been working on", "what did <teammate> do on <project>",
|
|
37509
38663
|
or standup/status. Filter by project, by member, or by recency (since_days).`,
|
|
37510
|
-
inputSchema:
|
|
37511
|
-
type: "object",
|
|
37512
|
-
properties: {
|
|
37513
|
-
project: { type: "string", description: "Filter to one project_id" },
|
|
37514
|
-
member: { type: "string", description: "Filter to one teammate (user id / sub)" },
|
|
37515
|
-
since_days: { type: "number", description: "Only activity in the last N days" }
|
|
37516
|
-
}
|
|
37517
|
-
}
|
|
38664
|
+
inputSchema: inputSchemaOf(RecallTeamActivitySchema)
|
|
37518
38665
|
},
|
|
37519
38666
|
{
|
|
37520
38667
|
name: "recall_tasks",
|
|
@@ -37530,18 +38677,7 @@ work rather than report on it.
|
|
|
37530
38677
|
|
|
37531
38678
|
Closing is earned: 'done' is refused without a linked session. Rejecting is the
|
|
37532
38679
|
user's call, never yours.`,
|
|
37533
|
-
inputSchema:
|
|
37534
|
-
type: "object",
|
|
37535
|
-
properties: {
|
|
37536
|
-
mine: { type: "boolean", description: "Only tasks assigned to me" },
|
|
37537
|
-
project: { type: "string", description: "Filter to one project_id" },
|
|
37538
|
-
status: { type: "string", enum: [...TASK_STATUS_FILTER], description: "Filter by status" },
|
|
37539
|
-
detail: {
|
|
37540
|
-
type: "boolean",
|
|
37541
|
-
description: "Return the full brief per task \u2014 the fix, the file locations and the agent prompt \u2014 plus how to claim and close one. Use this when you intend to DO the tasks, not just list them."
|
|
37542
|
-
}
|
|
37543
|
-
}
|
|
37544
|
-
}
|
|
38680
|
+
inputSchema: inputSchemaOf(RecallTasksSchema)
|
|
37545
38681
|
},
|
|
37546
38682
|
{
|
|
37547
38683
|
name: "recall_task_create",
|
|
@@ -37551,18 +38687,7 @@ attach it to a project. Returns the new task id.
|
|
|
37551
38687
|
When you then START working on a task, use recall_task_update to set status
|
|
37552
38688
|
'in_progress' and link your current session (linked_session_id) \u2014 that is what
|
|
37553
38689
|
lets the board verify the work actually shipped.`,
|
|
37554
|
-
inputSchema:
|
|
37555
|
-
type: "object",
|
|
37556
|
-
properties: {
|
|
37557
|
-
title: { type: "string", description: "Task title" },
|
|
37558
|
-
description: { type: "string", description: "What the work actually is. The title is the label; this is where the detail a future reader needs belongs." },
|
|
37559
|
-
project: { type: "string", description: "project_id this task belongs to" },
|
|
37560
|
-
assignee: { type: "string", description: "Teammate user id (sub) to assign" },
|
|
37561
|
-
due: { type: "number", description: "Due date, epoch milliseconds. Set one when the work is time-bound; omit otherwise." },
|
|
37562
|
-
linked_finding_id: { type: "string", description: "The code finding this task comes from (ca_\u2026). Setting it lets the card close itself when a re-index stops reporting the finding, and dedupes against an existing card for the same finding." }
|
|
37563
|
-
},
|
|
37564
|
-
required: ["title"]
|
|
37565
|
-
}
|
|
38690
|
+
inputSchema: inputSchemaOf(RecallTaskCreateSchema)
|
|
37566
38691
|
},
|
|
37567
38692
|
{
|
|
37568
38693
|
name: "recall_task_update",
|
|
@@ -37603,37 +38728,14 @@ THE THREE ENDINGS ARE NOT THE SAME:
|
|
|
37603
38728
|
Closing a card you did not fix, as 'done', is the one thing that makes this board
|
|
37604
38729
|
worthless: two thirds of one real board's Done column turned out to be work
|
|
37605
38730
|
nobody had done.`,
|
|
37606
|
-
inputSchema:
|
|
37607
|
-
type: "object",
|
|
37608
|
-
properties: {
|
|
37609
|
-
id: { type: "string", description: "Task id (t_\u2026)" },
|
|
37610
|
-
status: { type: "string", enum: [...TASK_STATUS_SETTABLE], description: "Set the card's state. 'done' needs linked_session_id; 'closed' needs closed_reason. There is no 'rejected' here on purpose: rejecting is the user's verdict, not yours." },
|
|
37611
|
-
closed_reason: { type: "string", description: "Why the card no longer applies. REQUIRED with status 'closed'." },
|
|
37612
|
-
diff: { type: "string", description: "THE CHANGE YOU MADE for this card, as a unified diff. REQUIRED with status 'done' unless you pass commits \u2014 the board cannot reconstruct shell-driven edits, so this is the only reliable record." },
|
|
37613
|
-
commits: { type: "array", items: { type: "string" }, description: "Commit sha(s) carrying that change, if you committed it." },
|
|
37614
|
-
files: { type: "array", items: { type: "string" }, description: "Files those commits changed. PASS THESE: the card scopes the session's diff by them, and without them it can show no changes rather than risk showing another repository's." },
|
|
37615
|
-
summary: { type: "string", description: "One line on what changed (optional)." },
|
|
37616
|
-
assignee: { type: "string", description: "Reassign to this user id (sub)" },
|
|
37617
|
-
title: { type: "string", description: "Rename the card. Omit to leave the title alone." },
|
|
37618
|
-
comment: { type: "string", description: "Add a comment" },
|
|
37619
|
-
linked_session_id: { type: "string", description: "Session id to attach \u2014 pass YOUR OWN current session id when you start working on this task, so the board can check whether the work shipped. Null detaches." }
|
|
37620
|
-
},
|
|
37621
|
-
required: ["id"]
|
|
37622
|
-
}
|
|
38731
|
+
inputSchema: inputSchemaOf(RecallTaskUpdateSchema)
|
|
37623
38732
|
},
|
|
37624
38733
|
{
|
|
37625
38734
|
name: "recall_task_comment",
|
|
37626
38735
|
description: `Leave a progress note on a team task \u2014 a comment visible to everyone on the
|
|
37627
38736
|
board. Use it to record what you did, what is blocked, or why a status changed,
|
|
37628
38737
|
without editing the task itself. Pass the task id (t_\u2026) from recall_tasks.`,
|
|
37629
|
-
inputSchema:
|
|
37630
|
-
type: "object",
|
|
37631
|
-
properties: {
|
|
37632
|
-
task_id: { type: "string", description: "Task id (t_\u2026) from recall_tasks" },
|
|
37633
|
-
body: { type: "string", description: "The comment text" }
|
|
37634
|
-
},
|
|
37635
|
-
required: ["task_id", "body"]
|
|
37636
|
-
}
|
|
38738
|
+
inputSchema: inputSchemaOf(RecallTaskCommentSchema)
|
|
37637
38739
|
},
|
|
37638
38740
|
{
|
|
37639
38741
|
name: "recall_task_policy",
|
|
@@ -37653,20 +38755,7 @@ without editing the task itself. Pass the task id (t_\u2026) from recall_tasks.`
|
|
|
37653
38755
|
Use this when the user says what they want worked on \u2014 "only security", "high and
|
|
37654
38756
|
critical for now", "stop filing hotspots", "let more in". Reading it first also
|
|
37655
38757
|
explains a quiet board: at the ceiling, filing pauses until cards close.`,
|
|
37656
|
-
inputSchema:
|
|
37657
|
-
type: "object",
|
|
37658
|
-
properties: {
|
|
37659
|
-
enabled: { type: "boolean", description: "Turn auto-filing on or off." },
|
|
37660
|
-
max_pri: { type: "number", description: "Severity floor: 0 critical, 1 high, 2 medium, 3 low." },
|
|
37661
|
-
ceiling: { type: "number", description: "How many auto-filed cards may be OPEN at once." },
|
|
37662
|
-
max_per_run: { type: "number", description: "Cap on NEW cards per run." },
|
|
37663
|
-
categories: { type: "array", items: { type: "string" }, description: "Only file these categories; [] means all." },
|
|
37664
|
-
project: { type: "string", description: "Apply max_pri/categories to THIS project only, leaving other repos on the global setting." },
|
|
37665
|
-
excluded_projects: { type: "array", items: { type: "string" }, description: "Replace the never-file list." },
|
|
37666
|
-
exclude_project: { type: "string", description: "Add ONE project to the never-file list." },
|
|
37667
|
-
include_project: { type: "string", description: "Remove ONE project from the never-file list." }
|
|
37668
|
-
}
|
|
37669
|
-
}
|
|
38758
|
+
inputSchema: inputSchemaOf(RecallTaskPolicySchema)
|
|
37670
38759
|
},
|
|
37671
38760
|
// ── Knowledge Graph Tools ──────────────────────────────────
|
|
37672
38761
|
{
|
|
@@ -37676,57 +38765,24 @@ explains a quiet board: at the ceiling, filing pauses until cards close.`,
|
|
|
37676
38765
|
Returns typed facts with temporal validity. E.g. "example-app" \u2192 uses TypeScript, deploys to Kubernetes.
|
|
37677
38766
|
Filter by date with as_of to see what was true at a specific point in time.
|
|
37678
38767
|
Use this to VERIFY facts before asserting them.`,
|
|
37679
|
-
inputSchema:
|
|
37680
|
-
type: "object",
|
|
37681
|
-
properties: {
|
|
37682
|
-
entity: { type: "string", description: 'Entity to query (e.g., "Alice", "chat-recall")' },
|
|
37683
|
-
as_of: { type: "string", description: "Date filter (YYYY-MM-DD, optional)" },
|
|
37684
|
-
direction: { type: "string", enum: ["outgoing", "incoming", "both"], default: "both", description: "Which edges to follow: facts where the entity is the subject (outgoing), the object (incoming), or both." }
|
|
37685
|
-
},
|
|
37686
|
-
required: ["entity"]
|
|
37687
|
-
}
|
|
38768
|
+
inputSchema: inputSchemaOf(RecallKGQuerySchema)
|
|
37688
38769
|
},
|
|
37689
38770
|
{
|
|
37690
38771
|
name: "recall_kg_add",
|
|
37691
38772
|
description: `Add a fact to the knowledge graph. Subject \u2192 predicate \u2192 object with optional time window.
|
|
37692
38773
|
|
|
37693
38774
|
E.g. ("example-app", "uses", "Postgres", valid_from="2026-01-15")`,
|
|
37694
|
-
inputSchema:
|
|
37695
|
-
type: "object",
|
|
37696
|
-
properties: {
|
|
37697
|
-
subject: { type: "string", description: "The entity doing/being something" },
|
|
37698
|
-
predicate: { type: "string", description: 'Relationship type (e.g., "uses", "works_on", "prefers")' },
|
|
37699
|
-
object: { type: "string", description: "The entity being connected to" },
|
|
37700
|
-
valid_from: { type: "string", description: "When this became true (YYYY-MM-DD, optional)" },
|
|
37701
|
-
source_session: { type: "string", description: "Session ID where this was learned (optional)" }
|
|
37702
|
-
},
|
|
37703
|
-
required: ["subject", "predicate", "object"]
|
|
37704
|
-
}
|
|
38775
|
+
inputSchema: inputSchemaOf(RecallKGAddSchema)
|
|
37705
38776
|
},
|
|
37706
38777
|
{
|
|
37707
38778
|
name: "recall_kg_invalidate",
|
|
37708
38779
|
description: `Mark a fact as no longer true. Use when things change \u2014 tools replaced, decisions reversed, people leave.`,
|
|
37709
|
-
inputSchema:
|
|
37710
|
-
type: "object",
|
|
37711
|
-
properties: {
|
|
37712
|
-
subject: { type: "string", description: "Entity" },
|
|
37713
|
-
predicate: { type: "string", description: "Relationship" },
|
|
37714
|
-
object: { type: "string", description: "Connected entity" },
|
|
37715
|
-
ended: { type: "string", description: "When it stopped being true (YYYY-MM-DD, default: today)" }
|
|
37716
|
-
},
|
|
37717
|
-
required: ["subject", "predicate", "object"]
|
|
37718
|
-
}
|
|
38780
|
+
inputSchema: inputSchemaOf(RecallKGInvalidateSchema)
|
|
37719
38781
|
},
|
|
37720
38782
|
{
|
|
37721
38783
|
name: "recall_kg_timeline",
|
|
37722
38784
|
description: `Get chronological timeline of facts. Shows the story of an entity (or everything) in order.`,
|
|
37723
|
-
inputSchema:
|
|
37724
|
-
type: "object",
|
|
37725
|
-
properties: {
|
|
37726
|
-
entity: { type: "string", description: "Entity to get timeline for (optional)" },
|
|
37727
|
-
limit: { type: "number", default: 50 }
|
|
37728
|
-
}
|
|
37729
|
-
}
|
|
38785
|
+
inputSchema: inputSchemaOf(RecallKGTimelineSchema)
|
|
37730
38786
|
},
|
|
37731
38787
|
{
|
|
37732
38788
|
name: "recall_kg_stats",
|
|
@@ -37743,29 +38799,12 @@ E.g. ("example-app", "uses", "Postgres", valid_from="2026-01-15")`,
|
|
|
37743
38799
|
|
|
37744
38800
|
Each agent gets their own persistent diary across sessions. Use this at the end of sessions
|
|
37745
38801
|
or when you learn something important that should persist.`,
|
|
37746
|
-
inputSchema:
|
|
37747
|
-
type: "object",
|
|
37748
|
-
properties: {
|
|
37749
|
-
agent_name: { type: "string", description: "Your name \u2014 each agent gets their own diary" },
|
|
37750
|
-
entry: { type: "string", description: "What happened, what you learned, what matters" },
|
|
37751
|
-
topic: { type: "string", default: "general", description: "Topic tag" },
|
|
37752
|
-
session_id: { type: "string", description: "Current session ID (for linking)" },
|
|
37753
|
-
project_path: { type: "string", description: "Project path (for context)" }
|
|
37754
|
-
},
|
|
37755
|
-
required: ["agent_name", "entry"]
|
|
37756
|
-
}
|
|
38802
|
+
inputSchema: inputSchemaOf(RecallDiaryWriteSchema)
|
|
37757
38803
|
},
|
|
37758
38804
|
{
|
|
37759
38805
|
name: "recall_diary_read",
|
|
37760
38806
|
description: `Read your recent diary entries. See what past versions of yourself recorded across sessions.`,
|
|
37761
|
-
inputSchema:
|
|
37762
|
-
type: "object",
|
|
37763
|
-
properties: {
|
|
37764
|
-
agent_name: { type: "string", description: "Agent name to read diary for" },
|
|
37765
|
-
last_n: { type: "number", default: 10, description: "Number of recent entries" }
|
|
37766
|
-
},
|
|
37767
|
-
required: ["agent_name"]
|
|
37768
|
-
}
|
|
38807
|
+
inputSchema: inputSchemaOf(RecallDiaryReadSchema)
|
|
37769
38808
|
},
|
|
37770
38809
|
// ── Code intelligence (codeindex companion) ──
|
|
37771
38810
|
// Registered ONLY when the codeindex binary is on PATH: recall_code_index
|
|
@@ -37775,42 +38814,22 @@ or when you learn something important that should persist.`,
|
|
|
37775
38814
|
{
|
|
37776
38815
|
name: "recall_code_index",
|
|
37777
38816
|
description: `Index a code repository with codeindex and sync its findings/hotspots/actions to your chat-recall server. Runs the codeindex analyzer LOCALLY (needs the repo files + git history), then ships the result. Use before recall_code_findings/actions if a repo hasn't been indexed yet.`,
|
|
37778
|
-
inputSchema:
|
|
37779
|
-
type: "object",
|
|
37780
|
-
properties: { path: { type: "string", description: "Repo path (default: cwd)" } }
|
|
37781
|
-
}
|
|
38817
|
+
inputSchema: inputSchemaOf(RecallCodeIndexSchema)
|
|
37782
38818
|
},
|
|
37783
38819
|
{
|
|
37784
38820
|
name: "recall_code_projects",
|
|
37785
38821
|
description: `List code-indexed projects on your server with health score, finding count, and label (poc/production/engineering).`,
|
|
37786
|
-
inputSchema:
|
|
38822
|
+
inputSchema: inputSchemaOf(RecallCodeProjectsSchema)
|
|
37787
38823
|
},
|
|
37788
38824
|
{
|
|
37789
38825
|
name: "recall_code_findings",
|
|
37790
38826
|
description: `List code findings (security / hardcoded literals / copy-paste clones / reinvention / dead code / coupling / cycles). Each finding carries a concrete, ready-to-run agent prompt that references codeindex tools. Filter by project/severity/category.`,
|
|
37791
|
-
inputSchema:
|
|
37792
|
-
type: "object",
|
|
37793
|
-
properties: {
|
|
37794
|
-
project: { type: "string", description: "Project id (omit for all)" },
|
|
37795
|
-
severity: { type: "string", enum: ["critical", "high", "medium", "low", "info"] },
|
|
37796
|
-
category: { type: "string", description: "security|literal|clone|duplication|dead_code|coupling|cycle" },
|
|
37797
|
-
limit: { type: "number", default: 50 },
|
|
37798
|
-
view: { type: "string", enum: ["findings", "summary", "hotspots", "file-sessions"], default: "findings", description: "findings = the list; summary = counts by severity/category; hotspots = churn-ranked files; file-sessions = which sessions touched `file`" },
|
|
37799
|
-
file: { type: "string", description: "view=file-sessions only: repo-relative path" }
|
|
37800
|
-
}
|
|
37801
|
-
}
|
|
38827
|
+
inputSchema: inputSchemaOf(RecallCodeFindingsSchema)
|
|
37802
38828
|
},
|
|
37803
38829
|
{
|
|
37804
38830
|
name: "recall_code_actions",
|
|
37805
38831
|
description: `The ranked, actionable plan for a codebase \u2014 prioritised tasks synthesised from the findings, each with a ready agent prompt. This is the "what should I fix next" list. Filter by project/status.`,
|
|
37806
|
-
inputSchema:
|
|
37807
|
-
type: "object",
|
|
37808
|
-
properties: {
|
|
37809
|
-
project: { type: "string", description: "Project id (omit for all)" },
|
|
37810
|
-
status: { type: "string", enum: ["suggested", "queued", "done", "dismissed"] },
|
|
37811
|
-
limit: { type: "number", default: 30 }
|
|
37812
|
-
}
|
|
37813
|
-
}
|
|
38832
|
+
inputSchema: inputSchemaOf(RecallCodeActionsSchema)
|
|
37814
38833
|
}
|
|
37815
38834
|
] : [],
|
|
37816
38835
|
{
|
|
@@ -37825,13 +38844,7 @@ or when you learn something important that should persist.`,
|
|
|
37825
38844
|
a skill, set a project label, or reset a POC db. Reasons over BOTH the code
|
|
37826
38845
|
findings and how sessions in this project went (failed/abandoned, recurring
|
|
37827
38846
|
corrections). Each has rationale + evidence + an apply-action.`,
|
|
37828
|
-
inputSchema:
|
|
37829
|
-
type: "object",
|
|
37830
|
-
properties: {
|
|
37831
|
-
scope: { type: "string", enum: ["account", "project"], default: "account", description: "account = your chat-recall data; project = one code-indexed project" },
|
|
37832
|
-
project: { type: "string", description: 'Project id (from recall_code_projects). Required when scope is "project".' }
|
|
37833
|
-
}
|
|
37834
|
-
}
|
|
38847
|
+
inputSchema: inputSchemaOf(RecallRecommendationsSchema)
|
|
37835
38848
|
},
|
|
37836
38849
|
// ── Aggregated views over the recommendation engines ──
|
|
37837
38850
|
// Registered UNGATED, unlike the recall_code_* family: they read findings
|
|
@@ -37851,14 +38864,7 @@ paste.
|
|
|
37851
38864
|
This is the read side. To apply one, use the apply rail the recommendation
|
|
37852
38865
|
already names (recall_recommendations documents it) \u2014 this tool never edits a
|
|
37853
38866
|
CLAUDE.md itself.`,
|
|
37854
|
-
inputSchema:
|
|
37855
|
-
type: "object",
|
|
37856
|
-
properties: {
|
|
37857
|
-
project: { type: "string", description: "Limit to one code-indexed project id (from recall_code_projects)" },
|
|
37858
|
-
include_projects: { type: "boolean", default: true, description: "Also fan out over code-indexed projects. false = account scope only." },
|
|
37859
|
-
kind: { type: "string", enum: [...INSTRUCTION_KINDS], description: "rule = a CLAUDE.md line; skill = a skill to install. Omit for both." }
|
|
37860
|
-
}
|
|
37861
|
-
}
|
|
38867
|
+
inputSchema: inputSchemaOf(RecallClaudeSuggestionsSchema)
|
|
37862
38868
|
},
|
|
37863
38869
|
{
|
|
37864
38870
|
name: "recall_improvements",
|
|
@@ -37873,16 +38879,7 @@ severity; both are mapped onto one scale so a single ordered list is honest.
|
|
|
37873
38879
|
Set \`create_tasks: true\` to open one task per improvement on the shared team
|
|
37874
38880
|
board (recall_tasks). It is off by default \u2014 this reads unless you ask it to
|
|
37875
38881
|
write.`,
|
|
37876
|
-
inputSchema:
|
|
37877
|
-
type: "object",
|
|
37878
|
-
properties: {
|
|
37879
|
-
project: { type: "string", description: "Limit to one code-indexed project id" },
|
|
37880
|
-
min_severity: { type: "string", enum: [...SEVERITIES], default: "low", description: "Drop anything below this severity" },
|
|
37881
|
-
limit: { type: "number", default: 30, description: "Maximum improvements to return, after ranking" },
|
|
37882
|
-
create_tasks: { type: "boolean", default: false, description: "Create one team task per returned improvement" },
|
|
37883
|
-
assignee: { type: "string", description: "create_tasks only: teammate user id (sub) to assign each task to" }
|
|
37884
|
-
}
|
|
37885
|
-
}
|
|
38882
|
+
inputSchema: inputSchemaOf(RecallImprovementsSchema)
|
|
37886
38883
|
},
|
|
37887
38884
|
// ── User-prompts / decision-record ──
|
|
37888
38885
|
{
|
|
@@ -37892,15 +38889,7 @@ Tool results and system banners are stripped \u2014 you get only what the user a
|
|
|
37892
38889
|
"what was I asking yesterday?" or "what did I tell the agent in this session?". Pass \`query\` for
|
|
37893
38890
|
"did I say X?": it keeps only the prompts that contain that text. Each prompt prints whole up to 2000
|
|
37894
38891
|
characters; a longer one prints its start and end and the recall_show expand_line call for the rest.`,
|
|
37895
|
-
inputSchema:
|
|
37896
|
-
type: "object",
|
|
37897
|
-
properties: {
|
|
37898
|
-
session_id: { type: "string", description: "If set, only that session's prompts" },
|
|
37899
|
-
since_days: { type: "number", default: 7, description: "How far back to look, in days." },
|
|
37900
|
-
limit: { type: "number", default: 50, description: "Maximum prompts to return, newest first." },
|
|
37901
|
-
query: { type: "string", description: "Keep only the prompts that contain this text. Case and runs of whitespace are ignored." }
|
|
37902
|
-
}
|
|
37903
|
-
}
|
|
38892
|
+
inputSchema: inputSchemaOf(RecallUserPromptsSchema)
|
|
37904
38893
|
},
|
|
37905
38894
|
{
|
|
37906
38895
|
name: "recall_decision_record",
|
|
@@ -37911,20 +38900,7 @@ something non-obvious that future sessions should remember.
|
|
|
37911
38900
|
PASS \`area\`. It is the key a reversal supersedes on: recording a new \`auth\` decision closes the
|
|
37912
38901
|
previous \`auth\` one and leaves every other area alone. Without it the decision is stored but
|
|
37913
38902
|
nothing it contradicts is closed, and both answers stay live forever.`,
|
|
37914
|
-
inputSchema:
|
|
37915
|
-
type: "object",
|
|
37916
|
-
properties: {
|
|
37917
|
-
subject: { type: "string", description: "What the decision is about" },
|
|
37918
|
-
decision: { type: "string", description: "The decision itself" },
|
|
37919
|
-
reason: { type: "string", description: "Why this was decided" },
|
|
37920
|
-
area: { type: "string", description: `The area this decides, so a later decision on the same area supersedes it. Standard areas: ${DECISION_AREAS.join(", ")}. Any short slug works for an area not listed.` },
|
|
37921
|
-
project: { type: "string", description: "Project this applies to. Omit for an account-wide decision that applies everywhere." },
|
|
37922
|
-
importance: { type: "number", minimum: 1, maximum: 5, default: 4, description: "1-5. Only 4 and 5 surface in the wake-up bundle, so reserve those for decisions a future session must not miss." },
|
|
37923
|
-
session_id: { type: "string", description: "Session this decision came out of. Pass your own current session id so the decision can be traced back to the conversation that made it." },
|
|
37924
|
-
agent_name: { type: "string", default: "agent", description: "Which agent is recording this, so diary entries stay separable per agent." }
|
|
37925
|
-
},
|
|
37926
|
-
required: ["subject", "decision"]
|
|
37927
|
-
}
|
|
38903
|
+
inputSchema: inputSchemaOf(RecallDecisionRecordSchema)
|
|
37928
38904
|
},
|
|
37929
38905
|
{
|
|
37930
38906
|
name: "recall_decisions",
|
|
@@ -37936,14 +38912,7 @@ Returns one effective value per area with the cascade already resolved (project
|
|
|
37936
38912
|
personal preferences fill gaps and never override a team decision), what each value replaced and
|
|
37937
38913
|
when, and the session it came from. Also returns \`gaps\` \u2014 areas nobody has decided, where you are
|
|
37938
38914
|
free to choose, and where recording the choice afterwards is worth doing.`,
|
|
37939
|
-
inputSchema:
|
|
37940
|
-
type: "object",
|
|
37941
|
-
properties: {
|
|
37942
|
-
area: { type: "string", description: `Only this area. Standard areas: ${DECISION_AREAS.join(", ")}.` },
|
|
37943
|
-
project: { type: "string", description: "Resolve for this project, so its overrides win over account-wide decisions. Omit for the account-wide view." },
|
|
37944
|
-
include_candidates: { type: "boolean", default: false, description: "Also return unconfirmed guesses the indexer extracted. These are NOT decisions \u2014 never treat one as settled." }
|
|
37945
|
-
}
|
|
37946
|
-
}
|
|
38915
|
+
inputSchema: inputSchemaOf(RecallDecisionsSchema)
|
|
37947
38916
|
},
|
|
37948
38917
|
{
|
|
37949
38918
|
name: "recall_decision_scan",
|
|
@@ -37960,16 +38929,7 @@ read. That is EVIDENCE, not a decision: it says what is there, never what was ru
|
|
|
37960
38929
|
|
|
37961
38930
|
\`record: true\` writes the areas the manifests answer, at project scope, with the file and line as
|
|
37962
38931
|
the reason. Areas the manifests do not answer are never written \u2014 ask the user instead.`,
|
|
37963
|
-
inputSchema:
|
|
37964
|
-
type: "object",
|
|
37965
|
-
properties: {
|
|
37966
|
-
path: { type: "string", description: "Repository root to read. Defaults to the current directory." },
|
|
37967
|
-
project: { type: "string", description: "Project the decisions belong to. Defaults to the repository folder name." },
|
|
37968
|
-
area: { type: "string", description: `Only this area. Standard areas: ${DECISION_AREAS.join(", ")}.` },
|
|
37969
|
-
record: { type: "boolean", default: false, description: "Record what the manifests answer, at project scope, citing the file and line. Leave false to look first." },
|
|
37970
|
-
session_id: { type: "string", description: "Your current session id, so each write traces back to this conversation." }
|
|
37971
|
-
}
|
|
37972
|
-
}
|
|
38932
|
+
inputSchema: inputSchemaOf(RecallDecisionScanSchema)
|
|
37973
38933
|
},
|
|
37974
38934
|
{
|
|
37975
38935
|
name: "recall_analytics_summary",
|
|
@@ -37979,12 +38939,7 @@ weekly delta, top tools/projects/models, and how many sessions had unknown prici
|
|
|
37979
38939
|
can answer "how much have I spent this week" without you opening the UI.
|
|
37980
38940
|
|
|
37981
38941
|
\`view: "patterns"\` returns behavioural patterns across sessions instead of the spend rollup.`,
|
|
37982
|
-
inputSchema:
|
|
37983
|
-
type: "object",
|
|
37984
|
-
properties: {
|
|
37985
|
-
view: { type: "string", enum: ["summary", "patterns"], default: "summary", description: "summary = spend/activity rollup; patterns = behavioural patterns across sessions" }
|
|
37986
|
-
}
|
|
37987
|
-
}
|
|
38942
|
+
inputSchema: inputSchemaOf(RecallAnalyticsSummarySchema)
|
|
37988
38943
|
},
|
|
37989
38944
|
{
|
|
37990
38945
|
name: "recall_wake_up",
|
|
@@ -37992,16 +38947,7 @@ can answer "how much have I spent this week" without you opening the UI.
|
|
|
37992
38947
|
classifier-flagged facts (decisions/preferences/milestones at importance >=4) +
|
|
37993
38948
|
current knowledge-graph facts. Replaces a manual context dump. Call this once at
|
|
37994
38949
|
the start of a session to "remember who you are and what's true right now".`,
|
|
37995
|
-
inputSchema:
|
|
37996
|
-
type: "object",
|
|
37997
|
-
properties: {
|
|
37998
|
-
max_facts: { type: "number", default: 10, description: "How many high-importance classifier facts to include." },
|
|
37999
|
-
max_kg_facts: { type: "number", default: 15, description: "How many current knowledge-graph facts to include." },
|
|
38000
|
-
identity: { type: "string", description: "Override the identity line at the top of the bundle. Defaults to ~/.chat-recall/identity.txt when present." },
|
|
38001
|
-
project_filter: { type: "string", description: "Scope facts, KG entities and the task count to a project (substring match). Without it, facts are global." },
|
|
38002
|
-
project: { type: "string", description: "Alias for project_filter \u2014 the name every sibling tool uses." }
|
|
38003
|
-
}
|
|
38004
|
-
}
|
|
38950
|
+
inputSchema: inputSchemaOf(RecallWakeUpSchema)
|
|
38005
38951
|
},
|
|
38006
38952
|
{
|
|
38007
38953
|
name: "recall_set",
|
|
@@ -38009,15 +38955,7 @@ the start of a session to "remember who you are and what's true right now".`,
|
|
|
38009
38955
|
state that doesn't fit the diary (narrative) or knowledge graph (entity-relationship facts) \u2014
|
|
38010
38956
|
things like "current PR url", "branch I'm working on", "user's preferred test runner".
|
|
38011
38957
|
Scope namespaces keys so per-project state doesn't collide.`,
|
|
38012
|
-
inputSchema:
|
|
38013
|
-
type: "object",
|
|
38014
|
-
properties: {
|
|
38015
|
-
key: { type: "string", description: "Key name" },
|
|
38016
|
-
value: { type: "string", description: "Value to store. JSON-encode if structured." },
|
|
38017
|
-
scope: { type: "string", default: "default", description: "Namespace" }
|
|
38018
|
-
},
|
|
38019
|
-
required: ["key", "value"]
|
|
38020
|
-
}
|
|
38958
|
+
inputSchema: inputSchemaOf(RecallSetSchema)
|
|
38021
38959
|
},
|
|
38022
38960
|
{
|
|
38023
38961
|
name: "recall_get",
|
|
@@ -38025,14 +38963,7 @@ Scope namespaces keys so per-project state doesn't collide.`,
|
|
|
38025
38963
|
omitted, LIST the recorded keys (in one scope, or across all scopes when \`scope\` is
|
|
38026
38964
|
also omitted). Use the list mode to discover what state has been recorded without
|
|
38027
38965
|
remembering specific keys.`,
|
|
38028
|
-
inputSchema:
|
|
38029
|
-
type: "object",
|
|
38030
|
-
properties: {
|
|
38031
|
-
key: { type: "string", description: "Key name. Omit to list keys instead." },
|
|
38032
|
-
scope: { type: "string", description: 'Namespace (default "default" when reading; omit to list across all scopes)' },
|
|
38033
|
-
limit: { type: "number", default: 50, description: "Max entries in list mode" }
|
|
38034
|
-
}
|
|
38035
|
-
}
|
|
38966
|
+
inputSchema: inputSchemaOf(RecallGetSchema)
|
|
38036
38967
|
},
|
|
38037
38968
|
// ── Messages between sessions ────────────────────────────────
|
|
38038
38969
|
{
|
|
@@ -38050,17 +38981,7 @@ the parent and every running child \u2014 use it to announce a decision to the w
|
|
|
38050
38981
|
than one is refused instead of guessed. When the folder is known, pass it in both \`to\` and
|
|
38051
38982
|
\`expect_cwd\`; a recipient that is in another folder is refused and nothing is sent. An opencode TUI
|
|
38052
38983
|
that has no session yet appears as its folder, and the message becomes its first prompt.`,
|
|
38053
|
-
inputSchema:
|
|
38054
|
-
type: "object",
|
|
38055
|
-
properties: {
|
|
38056
|
-
from: { type: "string", description: "The sending session id, so the recipient can answer." },
|
|
38057
|
-
to: { type: "string", description: 'A session id, the start of one, a session name, an absolute folder, "parent", "children" or "group".' },
|
|
38058
|
-
body: { type: "string", description: "The message. Secrets are redacted before it is sent." },
|
|
38059
|
-
reply_to: { type: "string", description: "The id of the message this answers." },
|
|
38060
|
-
expect_cwd: { type: "string", description: "The folder the recipient must be in; the send is refused when it is elsewhere." }
|
|
38061
|
-
},
|
|
38062
|
-
required: ["to", "body"]
|
|
38063
|
-
}
|
|
38984
|
+
inputSchema: inputSchemaOf(RecallMessageSendSchema)
|
|
38064
38985
|
},
|
|
38065
38986
|
{
|
|
38066
38987
|
name: "recall_inbox",
|
|
@@ -38068,15 +38989,7 @@ that has no session yet appears as its folder, and the message becomes its first
|
|
|
38068
38989
|
With wait_secs, wait for a message to arrive, for example the answer from a child session.
|
|
38069
38990
|
Claude Code sessions with the message hook receive messages without this tool; use it to wait,
|
|
38070
38991
|
or in a tool without the hook.`,
|
|
38071
|
-
inputSchema:
|
|
38072
|
-
type: "object",
|
|
38073
|
-
properties: {
|
|
38074
|
-
session: { type: "string", description: "The receiving session id, usually this one." },
|
|
38075
|
-
wait_secs: { type: "number", default: 0, description: "Poll for up to this many seconds (max 600) when nothing waits." },
|
|
38076
|
-
limit: { type: "number", default: 50 }
|
|
38077
|
-
},
|
|
38078
|
-
required: ["session"]
|
|
38079
|
-
}
|
|
38992
|
+
inputSchema: inputSchemaOf(RecallInboxSchema)
|
|
38080
38993
|
},
|
|
38081
38994
|
{
|
|
38082
38995
|
name: "recall_session_spawn",
|
|
@@ -38088,20 +39001,7 @@ take over any child with \`claude attach <id>\`.
|
|
|
38088
39001
|
|
|
38089
39002
|
Without \`permission_mode\`, a tool call that needs approval stops the child until a person attaches;
|
|
38090
39003
|
recall_session_status shows that. Pass a permission mode only when the user chose it.`,
|
|
38091
|
-
inputSchema:
|
|
38092
|
-
type: "object",
|
|
38093
|
-
properties: {
|
|
38094
|
-
from: { type: "string", description: "This session id (the parent)." },
|
|
38095
|
-
prompt: { type: "string", description: "The task, as the first prompt. Say what done means and what to report." },
|
|
38096
|
-
name: { type: "string", description: 'A name to send to, e.g. "worker-a".' },
|
|
38097
|
-
doing: { type: "string", description: "One line on what the child works on." },
|
|
38098
|
-
cwd: { type: "string", description: "Working directory. Defaults to the parent's." },
|
|
38099
|
-
model: { type: "string", description: "Model alias or id. Defaults to the user's setting." },
|
|
38100
|
-
permission_mode: { type: "string", enum: [...PERMISSION_MODES], description: "Only when the user chose it." },
|
|
38101
|
-
resume: { type: "string", description: "Continue this ended child (session id) with the prompt." }
|
|
38102
|
-
},
|
|
38103
|
-
required: ["from", "prompt"]
|
|
38104
|
-
}
|
|
39004
|
+
inputSchema: inputSchemaOf(RecallSessionSpawnSchema)
|
|
38105
39005
|
},
|
|
38106
39006
|
{
|
|
38107
39007
|
name: "recall_session_status",
|
|
@@ -38114,15 +39014,7 @@ unread messages. An opencode TUI that has no session yet is listed by its folder
|
|
|
38114
39014
|
opencode or claude process with no session (Linux). With \`parent\`, list the children of one session \u2014
|
|
38115
39015
|
the check a coordinating session runs on the sessions it started. With \`session\`, show one session and
|
|
38116
39016
|
its message thread. To read what a session did, follow up with recall_show and from_end.`,
|
|
38117
|
-
inputSchema:
|
|
38118
|
-
type: "object",
|
|
38119
|
-
properties: {
|
|
38120
|
-
parent: { type: "string", description: "List only the children of this session (id, start of id, or name)." },
|
|
38121
|
-
session: { type: "string", description: "Show one session and its messages." },
|
|
38122
|
-
include_ended: { type: "boolean", default: false },
|
|
38123
|
-
messages: { type: "number", default: 10, description: "Messages to show with `session`." }
|
|
38124
|
-
}
|
|
38125
|
-
}
|
|
39017
|
+
inputSchema: inputSchemaOf(RecallSessionStatusSchema)
|
|
38126
39018
|
},
|
|
38127
39019
|
{
|
|
38128
39020
|
name: "recall_session_register",
|
|
@@ -38130,16 +39022,7 @@ its message thread. To read what a session did, follow up with recall_show and f
|
|
|
38130
39022
|
what it works on. A child calls this once with its own id and the parent's id or name, so the parent can
|
|
38131
39023
|
list it with recall_session_status and reach it with to: "children". Set \`doing\` when you start a task
|
|
38132
39024
|
and when it changes, so every other session can see who works on what.`,
|
|
38133
|
-
inputSchema:
|
|
38134
|
-
type: "object",
|
|
38135
|
-
properties: {
|
|
38136
|
-
session: { type: "string", description: "The session to change, usually this one." },
|
|
38137
|
-
name: { type: "string", description: 'A name, e.g. "backend-worker". Empty string removes it.' },
|
|
38138
|
-
parent: { type: "string", description: "The parent: id, start of id, or name. Empty string removes the link." },
|
|
38139
|
-
doing: { type: "string", description: "One line: the project, issue or task this session works on. Empty string clears it." }
|
|
38140
|
-
},
|
|
38141
|
-
required: ["session"]
|
|
38142
|
-
}
|
|
39025
|
+
inputSchema: inputSchemaOf(RecallSessionRegisterSchema)
|
|
38143
39026
|
},
|
|
38144
39027
|
// ── Security / Secret Findings Tools ─────────────────────────
|
|
38145
39028
|
{
|
|
@@ -38151,16 +39034,7 @@ preview), plus per-detector totals and top rules. Use this when the user asks
|
|
|
38151
39034
|
"do we have any leaked secrets?" or "security findings" or "what should I rotate".
|
|
38152
39035
|
|
|
38153
39036
|
Call this first; then call recall_security_session for specific sessions.`,
|
|
38154
|
-
inputSchema:
|
|
38155
|
-
type: "object",
|
|
38156
|
-
properties: {
|
|
38157
|
-
include_dismissed: { type: "boolean", default: false, description: "Show previously dismissed findings" },
|
|
38158
|
-
top_k: { type: "number", default: 20, description: "Max distinct secrets to list" },
|
|
38159
|
-
group_by: { type: "string", enum: ["detector", "rule", "project", "trend", "sessions"], default: "detector", description: "detector = action-required view; rule/project = grouped counts; trend = daily counts; sessions = one row per session with findings" },
|
|
38160
|
-
days: { type: "number", default: 30, description: "group_by=trend only: window in days (1-365)" },
|
|
38161
|
-
min_detectors: { type: "number", description: "group_by=sessions only: require N detectors agreeing" }
|
|
38162
|
-
}
|
|
38163
|
-
}
|
|
39037
|
+
inputSchema: inputSchemaOf(RecallSecuritySummarySchema)
|
|
38164
39038
|
},
|
|
38165
39039
|
{
|
|
38166
39040
|
name: "recall_security_session",
|
|
@@ -38168,13 +39042,7 @@ Call this first; then call recall_security_session for specific sessions.`,
|
|
|
38168
39042
|
|
|
38169
39043
|
Use after recall_search or recall_security_summary to show exactly which lines
|
|
38170
39044
|
in a session matched which detector.`,
|
|
38171
|
-
inputSchema:
|
|
38172
|
-
type: "object",
|
|
38173
|
-
properties: {
|
|
38174
|
-
session_id: { type: "string", description: "Session ID from search results" }
|
|
38175
|
-
},
|
|
38176
|
-
required: ["session_id"]
|
|
38177
|
-
}
|
|
39045
|
+
inputSchema: inputSchemaOf(RecallSecuritySessionSchema)
|
|
38178
39046
|
},
|
|
38179
39047
|
{
|
|
38180
39048
|
name: "recall_recommendation_apply",
|
|
@@ -38188,14 +39056,7 @@ allowed to do destructively.
|
|
|
38188
39056
|
A CLAUDE.md edit is queued for the machine that has the repo and lands within
|
|
38189
39057
|
about 45 seconds; only that machine has the file. A label applies immediately.
|
|
38190
39058
|
Applying twice is harmless.`,
|
|
38191
|
-
inputSchema:
|
|
38192
|
-
type: "object",
|
|
38193
|
-
properties: {
|
|
38194
|
-
id: { type: "string", description: "Recommendation id from recall_recommendations" },
|
|
38195
|
-
project: { type: "string", description: "Project id the recommendation belongs to" }
|
|
38196
|
-
},
|
|
38197
|
-
required: ["id", "project"]
|
|
38198
|
-
}
|
|
39059
|
+
inputSchema: inputSchemaOf(RecallRecommendationApplySchema)
|
|
38199
39060
|
},
|
|
38200
39061
|
{
|
|
38201
39062
|
name: "recall_recommendation_dismiss",
|
|
@@ -38208,16 +39069,7 @@ recommendations stop being offered for that project and no other.
|
|
|
38208
39069
|
TELL THE USER what you dismissed and why. This changes how future sessions treat
|
|
38209
39070
|
their codebase, and a reason nobody sees is a decision nobody can review. Pass
|
|
38210
39071
|
undo: true to put one back.`,
|
|
38211
|
-
inputSchema:
|
|
38212
|
-
type: "object",
|
|
38213
|
-
properties: {
|
|
38214
|
-
id: { type: "string", description: "Recommendation id from recall_recommendations" },
|
|
38215
|
-
project: { type: "string", description: "Project id the recommendation belongs to" },
|
|
38216
|
-
reason: { type: "string", description: "Why it does not apply here. Required." },
|
|
38217
|
-
undo: { type: "boolean", description: "Restore a previously dismissed recommendation." }
|
|
38218
|
-
},
|
|
38219
|
-
required: ["id", "project", "reason"]
|
|
38220
|
-
}
|
|
39072
|
+
inputSchema: inputSchemaOf(RecallRecommendationDismissSchema)
|
|
38221
39073
|
},
|
|
38222
39074
|
{
|
|
38223
39075
|
name: "recall_project_label",
|
|
@@ -38230,14 +39082,7 @@ higher bar on tests and review (engineering).
|
|
|
38230
39082
|
|
|
38231
39083
|
ASK THE USER before setting 'production' or clearing a label. Both change what
|
|
38232
39084
|
other agents will consider permitted, and that is not yours to decide alone.`,
|
|
38233
|
-
inputSchema:
|
|
38234
|
-
type: "object",
|
|
38235
|
-
properties: {
|
|
38236
|
-
project: { type: "string", description: "Project id from recall_code_projects" },
|
|
38237
|
-
label: { type: "string", enum: ["poc", "production", "engineering", "none"], description: "none clears it" }
|
|
38238
|
-
},
|
|
38239
|
-
required: ["project", "label"]
|
|
38240
|
-
}
|
|
39085
|
+
inputSchema: inputSchemaOf(RecallProjectLabelSchema)
|
|
38241
39086
|
},
|
|
38242
39087
|
{
|
|
38243
39088
|
name: "recall_security_dismiss",
|
|
@@ -38245,15 +39090,7 @@ other agents will consider permitted, and that is not yours to decide alone.`,
|
|
|
38245
39090
|
|
|
38246
39091
|
Use when the user confirms a key was rotated or that the match is not a real
|
|
38247
39092
|
secret. The dismissal syncs across devices.`,
|
|
38248
|
-
inputSchema:
|
|
38249
|
-
type: "object",
|
|
38250
|
-
properties: {
|
|
38251
|
-
preview: { type: "string", description: "Masked secret preview from the security dashboard" },
|
|
38252
|
-
status: { type: "string", enum: ["rotated", "false_positive", "dismissed", "undismissed"], description: "Resolution status, or `undismissed` to put the finding back on the action-required list" },
|
|
38253
|
-
reason: { type: "string", description: "Optional note" }
|
|
38254
|
-
},
|
|
38255
|
-
required: ["preview", "status"]
|
|
38256
|
-
}
|
|
39093
|
+
inputSchema: inputSchemaOf(RecallSecurityDismissSchema)
|
|
38257
39094
|
},
|
|
38258
39095
|
{
|
|
38259
39096
|
name: "recall_toolkit_status",
|
|
@@ -38266,12 +39103,7 @@ uploaded them, so you can tell "my laptop has it" from "my desktop has it".
|
|
|
38266
39103
|
NOTE: the server holds an INVENTORY. MCP registrations carry enough to rebuild
|
|
38267
39104
|
elsewhere; skills and agents do not (their file content is not uploaded), and
|
|
38268
39105
|
this tool says which is which.`,
|
|
38269
|
-
inputSchema:
|
|
38270
|
-
type: "object",
|
|
38271
|
-
properties: {
|
|
38272
|
-
type: { type: "string", enum: [...TOOLKIT_TYPES], description: "Restrict to one artifact type. Omit for every type." }
|
|
38273
|
-
}
|
|
38274
|
-
}
|
|
39106
|
+
inputSchema: inputSchemaOf(RecallToolkitStatusSchema)
|
|
38275
39107
|
},
|
|
38276
39108
|
{
|
|
38277
39109
|
name: "recall_toolkit_sync",
|
|
@@ -38298,15 +39130,7 @@ The work is QUEUED, not done inline: the target device performs it on its next
|
|
|
38298
39130
|
drain (the watch daemon polls, or run \`chat-recall toolkit drain\`). Only that
|
|
38299
39131
|
device can write its own config files, so nothing else could do it. Read the
|
|
38300
39132
|
outcome back with recall_toolkit_status.`,
|
|
38301
|
-
inputSchema:
|
|
38302
|
-
type: "object",
|
|
38303
|
-
properties: {
|
|
38304
|
-
types: { type: "array", items: { type: "string", enum: [...TOOLKIT_TYPES] }, description: "Artifact types to install. Omit for all." },
|
|
38305
|
-
name: { type: "string", description: "Install ONE named artifact. Requires exactly one entry in types." },
|
|
38306
|
-
device: { type: "string", description: "Hostname of the target machine. Omit to target every device on the account." },
|
|
38307
|
-
scope: { type: "string", enum: ["pull", "fan_out"], default: "pull", description: "pull = install from the server (cross-device). fan_out = copy between one machine's own tools." }
|
|
38308
|
-
}
|
|
38309
|
-
}
|
|
39133
|
+
inputSchema: inputSchemaOf(RecallToolkitSyncSchema)
|
|
38310
39134
|
},
|
|
38311
39135
|
{
|
|
38312
39136
|
name: "recall_security_rules",
|
|
@@ -38314,105 +39138,55 @@ outcome back with recall_toolkit_status.`,
|
|
|
38314
39138
|
|
|
38315
39139
|
Tenant rules are configured in the chat-recall dashboard; this tool exposes them
|
|
38316
39140
|
to the agent and lets you test new regexes without persisting them.`,
|
|
38317
|
-
inputSchema:
|
|
38318
|
-
type: "object",
|
|
38319
|
-
properties: {
|
|
38320
|
-
action: { type: "string", enum: ["list", "test"], default: "list", description: "list = existing rules; test = regex sandbox" },
|
|
38321
|
-
name: { type: "string", description: "For test: rule name" },
|
|
38322
|
-
regex: { type: "string", description: "For test: regex to evaluate" },
|
|
38323
|
-
sample: { type: "string", description: "For test: text to match against" }
|
|
38324
|
-
}
|
|
38325
|
-
}
|
|
39141
|
+
inputSchema: inputSchemaOf(RecallSecurityRulesSchema)
|
|
38326
39142
|
},
|
|
38327
39143
|
{
|
|
38328
39144
|
name: "recall_subagent_search",
|
|
38329
39145
|
description: `Search inside SUBAGENT transcripts \u2014 the explore/compact/aside sub-tasks that run within a session and whose work never appears in the main conversation.
|
|
38330
39146
|
|
|
38331
39147
|
Use when a session's own turns don't contain what you remember: the finding may have come from a subagent. Indexed server-side, so it works across devices.`,
|
|
38332
|
-
inputSchema:
|
|
38333
|
-
type: "object",
|
|
38334
|
-
properties: {
|
|
38335
|
-
query: { type: "string", description: "Text to find inside subagent transcripts" },
|
|
38336
|
-
session_id: { type: "string", description: "Restrict to one session" },
|
|
38337
|
-
kind: { type: "string", description: "Restrict to one subagent kind" },
|
|
38338
|
-
limit: { type: "number", default: 20 }
|
|
38339
|
-
},
|
|
38340
|
-
required: ["query"]
|
|
38341
|
-
}
|
|
39148
|
+
inputSchema: inputSchemaOf(RecallSubagentSearchSchema)
|
|
38342
39149
|
},
|
|
38343
39150
|
{
|
|
38344
39151
|
name: "recall_redundant_files",
|
|
38345
39152
|
description: `Before creating a file, check whether you have written one like it before. Scores the filename against every file touched in your synced history.
|
|
38346
39153
|
|
|
38347
39154
|
Answers "have I built this already?" \u2014 the reinvention check.`,
|
|
38348
|
-
inputSchema:
|
|
38349
|
-
type: "object",
|
|
38350
|
-
properties: {
|
|
38351
|
-
filename: { type: "string", description: "Filename you are about to create" },
|
|
38352
|
-
project: { type: "string", description: "Restrict to one project" },
|
|
38353
|
-
limit: { type: "number", default: 20 }
|
|
38354
|
-
},
|
|
38355
|
-
required: ["filename"]
|
|
38356
|
-
}
|
|
39155
|
+
inputSchema: inputSchemaOf(RecallRedundantFilesSchema)
|
|
38357
39156
|
},
|
|
38358
39157
|
{
|
|
38359
39158
|
name: "recall_heal_audit",
|
|
38360
39159
|
description: `Report how many of your sessions are DAMAGED \u2014 the rendered conversation is thinner than the shrink-protected raw archive, which happens when an upstream tool truncates a transcript in place (a resume/compaction rewrite, or a script mirroring a shorter file over a longer one).
|
|
38361
39160
|
|
|
38362
39161
|
This is the authoritative "0 remaining" check. Read-only by default; apply=true heals, and healing only ever makes a conversation FULLER.`,
|
|
38363
|
-
inputSchema:
|
|
38364
|
-
type: "object",
|
|
38365
|
-
properties: {
|
|
38366
|
-
since_hours: { type: "number", description: "Bound the scan to the last N hours. Default 168 (7 days). The scan is capped at 500 sessions so it returns within the request timeout; the reply reports what it did not cover." },
|
|
38367
|
-
apply: { type: "boolean", default: false, description: "false = audit only; true = heal now" }
|
|
38368
|
-
}
|
|
38369
|
-
}
|
|
39162
|
+
inputSchema: inputSchemaOf(RecallHealAuditSchema)
|
|
38370
39163
|
},
|
|
38371
39164
|
{
|
|
38372
39165
|
name: "recall_memory_item",
|
|
38373
39166
|
description: `Fetch ONE memory item, its full text, or its links \u2014 or browse a whole source type.
|
|
38374
39167
|
|
|
38375
39168
|
Complements recall_memory_search: search finds candidates, this reads the specific item. mode=browse lists a type (e.g. every skill, every plan) without a query.`,
|
|
38376
|
-
inputSchema:
|
|
38377
|
-
type: "object",
|
|
38378
|
-
properties: {
|
|
38379
|
-
source_type: { type: "string", enum: ["session", "plan", "task", "claude_md", "paste", "history", "diary"] },
|
|
38380
|
-
id: { type: "string", description: "Item id. Omit with mode=browse." },
|
|
38381
|
-
mode: { type: "string", enum: ["item", "content", "links", "browse"], default: "item", description: "item = metadata, content = full text, links = related items, browse = list the type" },
|
|
38382
|
-
limit: { type: "number", default: 50, description: "browse mode only" }
|
|
38383
|
-
},
|
|
38384
|
-
required: ["source_type"]
|
|
38385
|
-
}
|
|
39169
|
+
inputSchema: inputSchemaOf(RecallMemoryItemSchema)
|
|
38386
39170
|
},
|
|
38387
39171
|
{
|
|
38388
39172
|
name: "recall_regenerate_summary",
|
|
38389
39173
|
description: "Force a fresh AI summary for one session \u2014 use when its stored summary is missing, stale, or plainly wrong.",
|
|
38390
|
-
inputSchema:
|
|
38391
|
-
type: "object",
|
|
38392
|
-
properties: { session_id: { type: "string" } },
|
|
38393
|
-
required: ["session_id"]
|
|
38394
|
-
}
|
|
39174
|
+
inputSchema: inputSchemaOf(RecallRegenerateSummarySchema)
|
|
38395
39175
|
},
|
|
38396
39176
|
{
|
|
38397
39177
|
name: "recall_outcome_summary",
|
|
38398
39178
|
description: 'Aggregate session outcomes (shipped / interrupted / abandoned / in_progress) over the last N days \u2014 "how much of my work actually landed?".',
|
|
38399
|
-
inputSchema:
|
|
38400
|
-
type: "object",
|
|
38401
|
-
properties: { days: { type: "number", default: 7, description: "1-90" } }
|
|
38402
|
-
}
|
|
39179
|
+
inputSchema: inputSchemaOf(RecallOutcomeSummarySchema)
|
|
38403
39180
|
},
|
|
38404
39181
|
{
|
|
38405
39182
|
name: "recall_shares",
|
|
38406
39183
|
description: "Which projects are shared into your team. scope=mine for your own shares, scope=all for every share visible to you. Private by default \u2014 nothing is visible to teammates until shared.",
|
|
38407
|
-
inputSchema:
|
|
38408
|
-
type: "object",
|
|
38409
|
-
properties: { scope: { type: "string", enum: ["mine", "all"], default: "mine" } }
|
|
38410
|
-
}
|
|
39184
|
+
inputSchema: inputSchemaOf(RecallSharesSchema)
|
|
38411
39185
|
},
|
|
38412
39186
|
{
|
|
38413
39187
|
name: "recall_reclassify",
|
|
38414
39188
|
description: "Re-run the memory classifier over already-indexed chunks so classifier improvements reach old data. Idempotent \u2014 only rewrites tags that actually changed.",
|
|
38415
|
-
inputSchema:
|
|
39189
|
+
inputSchema: inputSchemaOf(RecallReclassifySchema)
|
|
38416
39190
|
}
|
|
38417
39191
|
];
|
|
38418
39192
|
const localOnly = /* @__PURE__ */ new Set(["recall_index", "recall_code_index"]);
|
|
@@ -41168,6 +41942,16 @@ function parentOf(pid) {
|
|
|
41168
41942
|
const stat3 = readFileSync50(`/proc/${pid}/stat`, "utf-8");
|
|
41169
41943
|
const ppid = Number(stat3.slice(stat3.lastIndexOf(")") + 2).split(" ")[1]);
|
|
41170
41944
|
return ppid > 1 ? ppid : null;
|
|
41945
|
+
} catch {
|
|
41946
|
+
}
|
|
41947
|
+
if (process.platform === "win32") return null;
|
|
41948
|
+
try {
|
|
41949
|
+
const ppid = Number(execFileSync4("ps", ["-o", "ppid=", "-p", String(pid)], {
|
|
41950
|
+
encoding: "utf8",
|
|
41951
|
+
timeout: 2e3,
|
|
41952
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
41953
|
+
}).trim());
|
|
41954
|
+
return Number.isInteger(ppid) && ppid > 1 ? ppid : null;
|
|
41171
41955
|
} catch {
|
|
41172
41956
|
return null;
|
|
41173
41957
|
}
|
|
@@ -41201,6 +41985,7 @@ function channelDecision(env = process.env, args = process.argv.slice(2), ancest
|
|
|
41201
41985
|
|
|
41202
41986
|
// src/channel-state.ts
|
|
41203
41987
|
init_data_dir();
|
|
41988
|
+
import { execFileSync as execFileSync5 } from "node:child_process";
|
|
41204
41989
|
import { mkdirSync as mkdirSync15, readFileSync as readFileSync51, readdirSync as readdirSync35, statSync as statSync47, unlinkSync as unlinkSync4, writeFileSync as writeFileSync13 } from "node:fs";
|
|
41205
41990
|
import { join as join58 } from "node:path";
|
|
41206
41991
|
function channelStateDir() {
|
|
@@ -41224,7 +42009,18 @@ function startTimeOf(pid) {
|
|
|
41224
42009
|
const stat3 = readFileSync51(`/proc/${pid}/stat`, "utf-8");
|
|
41225
42010
|
const rest = stat3.slice(stat3.lastIndexOf(")") + 2).split(" ");
|
|
41226
42011
|
const started = rest[19];
|
|
41227
|
-
|
|
42012
|
+
if (started && /^\d+$/.test(started)) return started;
|
|
42013
|
+
} catch {
|
|
42014
|
+
}
|
|
42015
|
+
if (process.platform === "win32") return null;
|
|
42016
|
+
try {
|
|
42017
|
+
const out = execFileSync5("ps", ["-o", "lstart=", "-p", String(pid)], {
|
|
42018
|
+
encoding: "utf8",
|
|
42019
|
+
timeout: 2e3,
|
|
42020
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
42021
|
+
}).trim();
|
|
42022
|
+
const ms = out ? Date.parse(out) : NaN;
|
|
42023
|
+
return Number.isFinite(ms) ? String(ms) : null;
|
|
41228
42024
|
} catch {
|
|
41229
42025
|
return null;
|
|
41230
42026
|
}
|
|
@@ -41559,7 +42355,7 @@ function installCrashGuards() {
|
|
|
41559
42355
|
reportClientEvent2("mcp_crash", { message: err.stack || err.message });
|
|
41560
42356
|
});
|
|
41561
42357
|
}
|
|
41562
|
-
var RELAY_VERSION = true ? "0.7.
|
|
42358
|
+
var RELAY_VERSION = true ? "0.7.37" : "0.0.0";
|
|
41563
42359
|
function daemonIdleSecs() {
|
|
41564
42360
|
const raw = process.env.CHAT_RECALL_DAEMON_IDLE_SECS;
|
|
41565
42361
|
if (raw === void 0) return 900;
|