@cossistant/types 0.0.32 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,119 @@
1
+ //#region src/skill-file-format.ts
2
+ const FRONTMATTER_DELIMITER = "---";
3
+ const MARKDOWN_EXTENSION_REGEX = /\.md$/i;
4
+ const DEFAULT_DESCRIPTION = "Skill instructions";
5
+ function normalizeNewlines(value) {
6
+ return value.replace(/\r\n/g, "\n");
7
+ }
8
+ function trimYamlScalar(value) {
9
+ const trimmed = value.trim();
10
+ if (trimmed.startsWith("\"") && trimmed.endsWith("\"") || trimmed.startsWith("'") && trimmed.endsWith("'")) return trimmed.slice(1, -1).trim();
11
+ return trimmed;
12
+ }
13
+ function normalizeSkillDescription(value) {
14
+ return value.replace(/\s+/g, " ").trim();
15
+ }
16
+ function splitFrontmatter(content) {
17
+ if (!content.startsWith(`${FRONTMATTER_DELIMITER}\n`)) return {
18
+ frontmatterLines: [],
19
+ body: content,
20
+ hasFrontmatter: false
21
+ };
22
+ const lines = content.split("\n");
23
+ if (lines[0]?.trim() !== FRONTMATTER_DELIMITER) return {
24
+ frontmatterLines: [],
25
+ body: content,
26
+ hasFrontmatter: false
27
+ };
28
+ let closingDelimiterIndex = -1;
29
+ for (let index = 1; index < lines.length; index += 1) if (lines[index]?.trim() === FRONTMATTER_DELIMITER) {
30
+ closingDelimiterIndex = index;
31
+ break;
32
+ }
33
+ if (closingDelimiterIndex === -1) return {
34
+ frontmatterLines: [],
35
+ body: content,
36
+ hasFrontmatter: false
37
+ };
38
+ return {
39
+ frontmatterLines: lines.slice(1, closingDelimiterIndex),
40
+ body: lines.slice(closingDelimiterIndex + 1).join("\n"),
41
+ hasFrontmatter: true
42
+ };
43
+ }
44
+ function parseFrontmatterLines(frontmatterLines) {
45
+ let name;
46
+ let description;
47
+ for (const line of frontmatterLines) {
48
+ const trimmed = line.trim();
49
+ if (!trimmed || trimmed.startsWith("#")) continue;
50
+ const separatorIndex = trimmed.indexOf(":");
51
+ if (separatorIndex === -1) return null;
52
+ const key = trimmed.slice(0, separatorIndex).trim();
53
+ const value = trimYamlScalar(trimmed.slice(separatorIndex + 1));
54
+ if (key === "name") name = value;
55
+ if (key === "description") description = value;
56
+ }
57
+ return {
58
+ name,
59
+ description
60
+ };
61
+ }
62
+ function stripSkillMarkdownExtension(value) {
63
+ return value.trim().replace(MARKDOWN_EXTENSION_REGEX, "");
64
+ }
65
+ function deriveSkillDescriptionFromBody(body) {
66
+ const firstLine = normalizeNewlines(body).split("\n").map((line) => line.trim()).filter(Boolean).find((line) => line !== FRONTMATTER_DELIMITER && !/^(name|description)\s*:/i.test(line)) ?? "";
67
+ if (!firstLine) return "";
68
+ const normalized = firstLine.replace(/^#{1,6}\s+/, "").replace(/^[-*+]\s+/, "").replace(/^\d+\.\s+/, "").replace(/\s+/g, " ").trim();
69
+ if (!normalized) return "";
70
+ if (normalized.length <= 160) return normalized;
71
+ return `${normalized.slice(0, 157)}...`;
72
+ }
73
+ function parseSkillFileContent(input) {
74
+ const canonicalName = stripSkillMarkdownExtension(input.canonicalFileName);
75
+ const normalizedContent = normalizeNewlines(input.content);
76
+ const splitResult = splitFrontmatter(normalizedContent);
77
+ if (splitResult.hasFrontmatter) {
78
+ const parsedFrontmatter = parseFrontmatterLines(splitResult.frontmatterLines);
79
+ if (parsedFrontmatter) {
80
+ const body = splitResult.body.replace(/^\n+/, "");
81
+ const description = normalizeSkillDescription(parsedFrontmatter.description ?? "") || normalizeSkillDescription(input.fallbackDescription ?? "") || normalizeSkillDescription(deriveSkillDescriptionFromBody(body)) || DEFAULT_DESCRIPTION;
82
+ return {
83
+ name: stripSkillMarkdownExtension(parsedFrontmatter.name ?? canonicalName),
84
+ description,
85
+ body,
86
+ hasFrontmatter: true
87
+ };
88
+ }
89
+ }
90
+ return {
91
+ name: canonicalName,
92
+ description: normalizeSkillDescription(input.fallbackDescription ?? "") || normalizeSkillDescription(deriveSkillDescriptionFromBody(normalizedContent)) || DEFAULT_DESCRIPTION,
93
+ body: normalizedContent,
94
+ hasFrontmatter: false
95
+ };
96
+ }
97
+ function serializeSkillFileContent(input) {
98
+ const name = stripSkillMarkdownExtension(input.name);
99
+ const description = normalizeSkillDescription(input.description) || DEFAULT_DESCRIPTION;
100
+ const body = normalizeNewlines(input.body).replace(/^\n+/, "").trimEnd();
101
+ if (!body) return [
102
+ FRONTMATTER_DELIMITER,
103
+ `name: ${name}`,
104
+ `description: ${description}`,
105
+ FRONTMATTER_DELIMITER
106
+ ].join("\n");
107
+ return [
108
+ FRONTMATTER_DELIMITER,
109
+ `name: ${name}`,
110
+ `description: ${description}`,
111
+ FRONTMATTER_DELIMITER,
112
+ "",
113
+ body
114
+ ].join("\n");
115
+ }
116
+
117
+ //#endregion
118
+ export { deriveSkillDescriptionFromBody, parseSkillFileContent, serializeSkillFileContent, stripSkillMarkdownExtension };
119
+ //# sourceMappingURL=skill-file-format.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-file-format.js","names":["name: string | undefined","description: string | undefined"],"sources":["../src/skill-file-format.ts"],"sourcesContent":["const FRONTMATTER_DELIMITER = \"---\";\nconst MARKDOWN_EXTENSION_REGEX = /\\.md$/i;\nconst DEFAULT_DESCRIPTION = \"Skill instructions\";\n\nexport type ParseSkillFileContentInput = {\n\tcontent: string;\n\tcanonicalFileName: string;\n\tfallbackDescription?: string;\n};\n\nexport type ParsedSkillFileContent = {\n\tname: string;\n\tdescription: string;\n\tbody: string;\n\thasFrontmatter: boolean;\n};\n\nexport type SerializeSkillFileContentInput = {\n\tname: string;\n\tdescription: string;\n\tbody: string;\n};\n\nfunction normalizeNewlines(value: string): string {\n\treturn value.replace(/\\r\\n/g, \"\\n\");\n}\n\nfunction trimYamlScalar(value: string): string {\n\tconst trimmed = value.trim();\n\n\tif (\n\t\t(trimmed.startsWith('\"') && trimmed.endsWith('\"')) ||\n\t\t(trimmed.startsWith(\"'\") && trimmed.endsWith(\"'\"))\n\t) {\n\t\treturn trimmed.slice(1, -1).trim();\n\t}\n\n\treturn trimmed;\n}\n\nfunction normalizeSkillDescription(value: string): string {\n\treturn value.replace(/\\s+/g, \" \").trim();\n}\n\nfunction splitFrontmatter(content: string): {\n\tfrontmatterLines: string[];\n\tbody: string;\n\thasFrontmatter: boolean;\n} {\n\tif (!content.startsWith(`${FRONTMATTER_DELIMITER}\\n`)) {\n\t\treturn { frontmatterLines: [], body: content, hasFrontmatter: false };\n\t}\n\n\tconst lines = content.split(\"\\n\");\n\tif (lines[0]?.trim() !== FRONTMATTER_DELIMITER) {\n\t\treturn { frontmatterLines: [], body: content, hasFrontmatter: false };\n\t}\n\n\tlet closingDelimiterIndex = -1;\n\tfor (let index = 1; index < lines.length; index += 1) {\n\t\tif (lines[index]?.trim() === FRONTMATTER_DELIMITER) {\n\t\t\tclosingDelimiterIndex = index;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (closingDelimiterIndex === -1) {\n\t\treturn { frontmatterLines: [], body: content, hasFrontmatter: false };\n\t}\n\n\tconst frontmatterLines = lines.slice(1, closingDelimiterIndex);\n\tconst body = lines.slice(closingDelimiterIndex + 1).join(\"\\n\");\n\n\treturn { frontmatterLines, body, hasFrontmatter: true };\n}\n\nfunction parseFrontmatterLines(frontmatterLines: string[]): {\n\tname?: string;\n\tdescription?: string;\n} | null {\n\tlet name: string | undefined;\n\tlet description: string | undefined;\n\n\tfor (const line of frontmatterLines) {\n\t\tconst trimmed = line.trim();\n\t\tif (!trimmed || trimmed.startsWith(\"#\")) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst separatorIndex = trimmed.indexOf(\":\");\n\t\tif (separatorIndex === -1) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst key = trimmed.slice(0, separatorIndex).trim();\n\t\tconst value = trimYamlScalar(trimmed.slice(separatorIndex + 1));\n\n\t\tif (key === \"name\") {\n\t\t\tname = value;\n\t\t}\n\n\t\tif (key === \"description\") {\n\t\t\tdescription = value;\n\t\t}\n\t}\n\n\treturn { name, description };\n}\n\nexport function stripSkillMarkdownExtension(value: string): string {\n\treturn value.trim().replace(MARKDOWN_EXTENSION_REGEX, \"\");\n}\n\nexport function deriveSkillDescriptionFromBody(body: string): string {\n\tconst lines = normalizeNewlines(body)\n\t\t.split(\"\\n\")\n\t\t.map((line) => line.trim())\n\t\t.filter(Boolean);\n\n\tconst firstLine =\n\t\tlines.find(\n\t\t\t(line) =>\n\t\t\t\tline !== FRONTMATTER_DELIMITER && !/^(name|description)\\s*:/i.test(line)\n\t\t) ?? \"\";\n\tif (!firstLine) {\n\t\treturn \"\";\n\t}\n\n\tconst normalized = firstLine\n\t\t.replace(/^#{1,6}\\s+/, \"\")\n\t\t.replace(/^[-*+]\\s+/, \"\")\n\t\t.replace(/^\\d+\\.\\s+/, \"\")\n\t\t.replace(/\\s+/g, \" \")\n\t\t.trim();\n\n\tif (!normalized) {\n\t\treturn \"\";\n\t}\n\n\tif (normalized.length <= 160) {\n\t\treturn normalized;\n\t}\n\n\treturn `${normalized.slice(0, 157)}...`;\n}\n\nexport function parseSkillFileContent(\n\tinput: ParseSkillFileContentInput\n): ParsedSkillFileContent {\n\tconst canonicalName = stripSkillMarkdownExtension(input.canonicalFileName);\n\tconst normalizedContent = normalizeNewlines(input.content);\n\tconst splitResult = splitFrontmatter(normalizedContent);\n\n\tif (splitResult.hasFrontmatter) {\n\t\tconst parsedFrontmatter = parseFrontmatterLines(\n\t\t\tsplitResult.frontmatterLines\n\t\t);\n\t\tif (parsedFrontmatter) {\n\t\t\tconst body = splitResult.body.replace(/^\\n+/, \"\");\n\t\t\tconst description =\n\t\t\t\tnormalizeSkillDescription(parsedFrontmatter.description ?? \"\") ||\n\t\t\t\tnormalizeSkillDescription(input.fallbackDescription ?? \"\") ||\n\t\t\t\tnormalizeSkillDescription(deriveSkillDescriptionFromBody(body)) ||\n\t\t\t\tDEFAULT_DESCRIPTION;\n\n\t\t\treturn {\n\t\t\t\tname: stripSkillMarkdownExtension(\n\t\t\t\t\tparsedFrontmatter.name ?? canonicalName\n\t\t\t\t),\n\t\t\t\tdescription,\n\t\t\t\tbody,\n\t\t\t\thasFrontmatter: true,\n\t\t\t};\n\t\t}\n\t}\n\n\tconst description =\n\t\tnormalizeSkillDescription(input.fallbackDescription ?? \"\") ||\n\t\tnormalizeSkillDescription(\n\t\t\tderiveSkillDescriptionFromBody(normalizedContent)\n\t\t) ||\n\t\tDEFAULT_DESCRIPTION;\n\n\treturn {\n\t\tname: canonicalName,\n\t\tdescription,\n\t\tbody: normalizedContent,\n\t\thasFrontmatter: false,\n\t};\n}\n\nexport function serializeSkillFileContent(\n\tinput: SerializeSkillFileContentInput\n): string {\n\tconst name = stripSkillMarkdownExtension(input.name);\n\tconst description =\n\t\tnormalizeSkillDescription(input.description) || DEFAULT_DESCRIPTION;\n\tconst body = normalizeNewlines(input.body).replace(/^\\n+/, \"\").trimEnd();\n\n\tif (!body) {\n\t\treturn [\n\t\t\tFRONTMATTER_DELIMITER,\n\t\t\t`name: ${name}`,\n\t\t\t`description: ${description}`,\n\t\t\tFRONTMATTER_DELIMITER,\n\t\t].join(\"\\n\");\n\t}\n\n\treturn [\n\t\tFRONTMATTER_DELIMITER,\n\t\t`name: ${name}`,\n\t\t`description: ${description}`,\n\t\tFRONTMATTER_DELIMITER,\n\t\t\"\",\n\t\tbody,\n\t].join(\"\\n\");\n}\n"],"mappings":";AAAA,MAAM,wBAAwB;AAC9B,MAAM,2BAA2B;AACjC,MAAM,sBAAsB;AAqB5B,SAAS,kBAAkB,OAAuB;AACjD,QAAO,MAAM,QAAQ,SAAS,KAAK;;AAGpC,SAAS,eAAe,OAAuB;CAC9C,MAAM,UAAU,MAAM,MAAM;AAE5B,KACE,QAAQ,WAAW,KAAI,IAAI,QAAQ,SAAS,KAAI,IAChD,QAAQ,WAAW,IAAI,IAAI,QAAQ,SAAS,IAAI,CAEjD,QAAO,QAAQ,MAAM,GAAG,GAAG,CAAC,MAAM;AAGnC,QAAO;;AAGR,SAAS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AM,YAAY,IAAI;CACjD,MAAM,OAAO,kBAAkB,MAAM,KAAK,CAAC,QAAQ,QAAQ,GAAG,CAAC,SAAS;AAExE,KAAI,CAAC,KACJ,QAAO;EACN;EACA,SAAS;EACT,gBAAgB;EAChB;EACA,CAAC,KAAK,KAAK;AAGb,QAAO;EACN;EACA,SAAS;EACT,gBAAgB;EAChB;EACA;EACA;EACA,CAAC,KAAK,KAAK"}
@@ -0,0 +1,13 @@
1
+ //#region src/tool-timeline-policy.d.ts
2
+ declare const TOOL_TIMELINE_LOG_TYPE: {
3
+ readonly CUSTOMER_FACING: "customer_facing";
4
+ readonly LOG: "log";
5
+ readonly DECISION: "decision";
6
+ };
7
+ type ToolTimelineLogType = (typeof TOOL_TIMELINE_LOG_TYPE)[keyof typeof TOOL_TIMELINE_LOG_TYPE];
8
+ declare const TOOL_TIMELINE_CONVERSATION_ALLOWLIST: readonly ["searchKnowledgeBase", "updateConversationTitle", "updateSentiment"];
9
+ declare function isConversationVisibleTool(toolName: string): boolean;
10
+ declare function getToolLogType(toolName: string): ToolTimelineLogType;
11
+ //#endregion
12
+ export { TOOL_TIMELINE_CONVERSATION_ALLOWLIST, TOOL_TIMELINE_LOG_TYPE, ToolTimelineLogType, getToolLogType, isConversationVisibleTool };
13
+ //# sourceMappingURL=tool-timeline-policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-timeline-policy.d.ts","names":[],"sources":["../src/tool-timeline-policy.ts"],"sourcesContent":[],"mappings":";cAAa;EAAA,SAAA,eAAA,EAIH,iBAAA;EAEE,SAAA,GAAA,EAAA,KAAA;EAGC,SAAA,QAAA,EAAA,UAAA;AAUb,CAAA;AAIgB,KAjBJ,mBAAA,GAiBsC,CAAA,OAhBzC,sBAgB4D,CAAA,CAAA,MAAA,OAhBvB,sBAgBuB,CAAA;cAdxD;iBAUG,yBAAA;iBAIA,cAAA,oBAAkC"}
@@ -0,0 +1,24 @@
1
+ //#region src/tool-timeline-policy.ts
2
+ const TOOL_TIMELINE_LOG_TYPE = {
3
+ CUSTOMER_FACING: "customer_facing",
4
+ LOG: "log",
5
+ DECISION: "decision"
6
+ };
7
+ const TOOL_TIMELINE_CONVERSATION_ALLOWLIST = [
8
+ "searchKnowledgeBase",
9
+ "updateConversationTitle",
10
+ "updateSentiment"
11
+ ];
12
+ const CONVERSATION_VISIBLE_TOOLS = new Set(TOOL_TIMELINE_CONVERSATION_ALLOWLIST);
13
+ function isConversationVisibleTool(toolName) {
14
+ return CONVERSATION_VISIBLE_TOOLS.has(toolName);
15
+ }
16
+ function getToolLogType(toolName) {
17
+ if (toolName === "aiDecision") return TOOL_TIMELINE_LOG_TYPE.DECISION;
18
+ if (isConversationVisibleTool(toolName)) return TOOL_TIMELINE_LOG_TYPE.CUSTOMER_FACING;
19
+ return TOOL_TIMELINE_LOG_TYPE.LOG;
20
+ }
21
+
22
+ //#endregion
23
+ export { TOOL_TIMELINE_CONVERSATION_ALLOWLIST, TOOL_TIMELINE_LOG_TYPE, getToolLogType, isConversationVisibleTool };
24
+ //# sourceMappingURL=tool-timeline-policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-timeline-policy.js","names":[],"sources":["../src/tool-timeline-policy.ts"],"sourcesContent":["export const TOOL_TIMELINE_LOG_TYPE = {\n\tCUSTOMER_FACING: \"customer_facing\",\n\tLOG: \"log\",\n\tDECISION: \"decision\",\n} as const;\n\nexport type ToolTimelineLogType =\n\t(typeof TOOL_TIMELINE_LOG_TYPE)[keyof typeof TOOL_TIMELINE_LOG_TYPE];\n\nexport const TOOL_TIMELINE_CONVERSATION_ALLOWLIST = [\n\t\"searchKnowledgeBase\",\n\t\"updateConversationTitle\",\n\t\"updateSentiment\",\n] as const;\n\nconst CONVERSATION_VISIBLE_TOOLS = new Set<string>(\n\tTOOL_TIMELINE_CONVERSATION_ALLOWLIST\n);\n\nexport function isConversationVisibleTool(toolName: string): boolean {\n\treturn CONVERSATION_VISIBLE_TOOLS.has(toolName);\n}\n\nexport function getToolLogType(toolName: string): ToolTimelineLogType {\n\tif (toolName === \"aiDecision\") {\n\t\treturn TOOL_TIMELINE_LOG_TYPE.DECISION;\n\t}\n\n\tif (isConversationVisibleTool(toolName)) {\n\t\treturn TOOL_TIMELINE_LOG_TYPE.CUSTOMER_FACING;\n\t}\n\n\treturn TOOL_TIMELINE_LOG_TYPE.LOG;\n}\n"],"mappings":";AAAA,MAAa,yBAAyB;CACrC,iBAAiB;CACjB,KAAK;CACL,UAAU;CACV;AAKD,MAAa,uCAAuC;CACnD;CACA;CACA;CACA;AAED,MAAM,6BAA6B,IAAI,IACtC,qCACA;AAED,SAAgB,0BAA0B,UAA2B;AACpE,QAAO,2BAA2B,IAAI,SAAS;;AAGhD,SAAgB,eAAe,UAAuC;AACrE,KAAI,aAAa,aAChB,QAAO,uBAAuB;AAG/B,KAAI,0BAA0B,SAAS,CACtC,QAAO,uBAAuB;AAG/B,QAAO,uBAAuB"}