@vertesia/common 1.0.0-dev.20260128.144200 → 1.0.0-dev.20260225.024852Z

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.
Files changed (126) hide show
  1. package/lib/cjs/apikey.js +1 -0
  2. package/lib/cjs/apikey.js.map +1 -1
  3. package/lib/cjs/apps.js.map +1 -1
  4. package/lib/cjs/audit-trail.js +3 -0
  5. package/lib/cjs/audit-trail.js.map +1 -0
  6. package/lib/cjs/index.js +1 -0
  7. package/lib/cjs/index.js.map +1 -1
  8. package/lib/cjs/integrations.js +2 -0
  9. package/lib/cjs/integrations.js.map +1 -1
  10. package/lib/cjs/interaction.js.map +1 -1
  11. package/lib/cjs/project.js +37 -1
  12. package/lib/cjs/project.js.map +1 -1
  13. package/lib/cjs/prompt.js.map +1 -1
  14. package/lib/cjs/store/dsl-workflow.js.map +1 -1
  15. package/lib/cjs/store/hive-memory.js +3 -0
  16. package/lib/cjs/store/hive-memory.js.map +1 -0
  17. package/lib/cjs/store/index.js +2 -0
  18. package/lib/cjs/store/index.js.map +1 -1
  19. package/lib/cjs/store/rendering.js +22 -0
  20. package/lib/cjs/store/rendering.js.map +1 -0
  21. package/lib/cjs/store/schedule.js.map +1 -1
  22. package/lib/cjs/store/store.js +15 -2
  23. package/lib/cjs/store/store.js.map +1 -1
  24. package/lib/cjs/store/workflow.js +44 -1
  25. package/lib/cjs/store/workflow.js.map +1 -1
  26. package/lib/cjs/user.js.map +1 -1
  27. package/lib/cjs/utils/schemas.js +26 -2
  28. package/lib/cjs/utils/schemas.js.map +1 -1
  29. package/lib/cjs/versions.js +1 -0
  30. package/lib/cjs/versions.js.map +1 -1
  31. package/lib/esm/apikey.js +1 -0
  32. package/lib/esm/apikey.js.map +1 -1
  33. package/lib/esm/apps.js.map +1 -1
  34. package/lib/esm/audit-trail.js +2 -0
  35. package/lib/esm/audit-trail.js.map +1 -0
  36. package/lib/esm/index.js +1 -0
  37. package/lib/esm/index.js.map +1 -1
  38. package/lib/esm/integrations.js +2 -0
  39. package/lib/esm/integrations.js.map +1 -1
  40. package/lib/esm/interaction.js.map +1 -1
  41. package/lib/esm/project.js +36 -0
  42. package/lib/esm/project.js.map +1 -1
  43. package/lib/esm/prompt.js.map +1 -1
  44. package/lib/esm/store/dsl-workflow.js.map +1 -1
  45. package/lib/esm/store/hive-memory.js +2 -0
  46. package/lib/esm/store/hive-memory.js.map +1 -0
  47. package/lib/esm/store/index.js +2 -0
  48. package/lib/esm/store/index.js.map +1 -1
  49. package/lib/esm/store/rendering.js +18 -0
  50. package/lib/esm/store/rendering.js.map +1 -0
  51. package/lib/esm/store/schedule.js.map +1 -1
  52. package/lib/esm/store/store.js +13 -2
  53. package/lib/esm/store/store.js.map +1 -1
  54. package/lib/esm/store/workflow.js +39 -1
  55. package/lib/esm/store/workflow.js.map +1 -1
  56. package/lib/esm/user.js.map +1 -1
  57. package/lib/esm/utils/schemas.js +24 -2
  58. package/lib/esm/utils/schemas.js.map +1 -1
  59. package/lib/esm/versions.js +1 -0
  60. package/lib/esm/versions.js.map +1 -1
  61. package/lib/tsconfig.tsbuildinfo +1 -1
  62. package/lib/types/apikey.d.ts +2 -1
  63. package/lib/types/apikey.d.ts.map +1 -1
  64. package/lib/types/apps.d.ts +220 -1
  65. package/lib/types/apps.d.ts.map +1 -1
  66. package/lib/types/audit-trail.d.ts +49 -0
  67. package/lib/types/audit-trail.d.ts.map +1 -0
  68. package/lib/types/index.d.ts +1 -0
  69. package/lib/types/index.d.ts.map +1 -1
  70. package/lib/types/integrations.d.ts +8 -0
  71. package/lib/types/integrations.d.ts.map +1 -1
  72. package/lib/types/interaction.d.ts +10 -11
  73. package/lib/types/interaction.d.ts.map +1 -1
  74. package/lib/types/project.d.ts +256 -1
  75. package/lib/types/project.d.ts.map +1 -1
  76. package/lib/types/prompt.d.ts +3 -4
  77. package/lib/types/prompt.d.ts.map +1 -1
  78. package/lib/types/skill.d.ts.map +1 -1
  79. package/lib/types/store/conversation-state.d.ts +7 -0
  80. package/lib/types/store/conversation-state.d.ts.map +1 -1
  81. package/lib/types/store/doc-analyzer.d.ts +1 -1
  82. package/lib/types/store/doc-analyzer.d.ts.map +1 -1
  83. package/lib/types/store/dsl-workflow.d.ts +28 -0
  84. package/lib/types/store/dsl-workflow.d.ts.map +1 -1
  85. package/lib/types/store/hive-memory.d.ts +116 -0
  86. package/lib/types/store/hive-memory.d.ts.map +1 -0
  87. package/lib/types/store/index.d.ts +2 -0
  88. package/lib/types/store/index.d.ts.map +1 -1
  89. package/lib/types/store/rendering.d.ts +193 -0
  90. package/lib/types/store/rendering.d.ts.map +1 -0
  91. package/lib/types/store/schedule.d.ts +2 -0
  92. package/lib/types/store/schedule.d.ts.map +1 -1
  93. package/lib/types/store/store.d.ts +31 -2
  94. package/lib/types/store/store.d.ts.map +1 -1
  95. package/lib/types/store/workflow.d.ts +145 -7
  96. package/lib/types/store/workflow.d.ts.map +1 -1
  97. package/lib/types/user.d.ts +9 -0
  98. package/lib/types/user.d.ts.map +1 -1
  99. package/lib/types/utils/schemas.d.ts +13 -4
  100. package/lib/types/utils/schemas.d.ts.map +1 -1
  101. package/lib/types/versions.d.ts +2 -1
  102. package/lib/types/versions.d.ts.map +1 -1
  103. package/lib/vertesia-common.js +1 -1
  104. package/lib/vertesia-common.js.map +1 -1
  105. package/package.json +2 -4
  106. package/src/apikey.ts +1 -0
  107. package/src/apps.ts +249 -1
  108. package/src/audit-trail.ts +61 -0
  109. package/src/index.ts +1 -0
  110. package/src/integrations.ts +10 -0
  111. package/src/interaction.ts +11 -12
  112. package/src/project.ts +309 -1
  113. package/src/prompt.ts +3 -4
  114. package/src/skill.ts +1 -0
  115. package/src/store/conversation-state.ts +9 -0
  116. package/src/store/doc-analyzer.ts +1 -1
  117. package/src/store/dsl-workflow.ts +26 -0
  118. package/src/store/hive-memory.ts +167 -0
  119. package/src/store/index.ts +2 -0
  120. package/src/store/rendering.ts +233 -0
  121. package/src/store/schedule.ts +3 -0
  122. package/src/store/store.ts +40 -4
  123. package/src/store/workflow.ts +191 -7
  124. package/src/user.ts +11 -0
  125. package/src/utils/schemas.ts +33 -11
  126. package/src/versions.ts +1 -0
@@ -1,9 +1,28 @@
1
- import type { JSONSchema } from "@llumiverse/common";
1
+ import type { JSONSchema, ToolDefinition } from "@llumiverse/common";
2
2
  import { PromptRole } from "@llumiverse/common";
3
- import type { JSONSchema4 } from "json-schema";
4
3
  import { InCodePrompt, InteractionRefWithSchema, PopulatedInteraction } from "../interaction.js";
5
4
  import { ExecutablePromptSegmentDef, PromptSegmentDefType } from "../prompt.js";
6
5
 
6
+ /**
7
+ * Sanitize a tool definition to only include fields expected by LLM APIs.
8
+ * Removes extra fields like 'category', 'default', 'related_tools' that are
9
+ * used internally but should not be sent to the LLM.
10
+ */
11
+ export function sanitizeToolDefinition(tool: ToolDefinition): ToolDefinition {
12
+ return {
13
+ name: tool.name,
14
+ description: tool.description,
15
+ input_schema: tool.input_schema,
16
+ };
17
+ }
18
+
19
+ /**
20
+ * Sanitize an array of tool definitions.
21
+ */
22
+ export function sanitizeToolDefinitions(tools: ToolDefinition[] | undefined): ToolDefinition[] | undefined {
23
+ if (!tools) return tools;
24
+ return tools.map(sanitizeToolDefinition);
25
+ }
7
26
 
8
27
  // Remove custom properties from the JSON before sending further down execution pipeline
9
28
  export function removeExtraProperties<T>(schema: T): T {
@@ -28,7 +47,7 @@ export function removeExtraProperties<T>(schema: T): T {
28
47
  }
29
48
 
30
49
  export function mergeJSONSchemas(schemas: JSONSchema[]) {
31
- const props: Record<string, JSONSchema4> = {};
50
+ const props: Record<string, JSONSchema> = {};
32
51
  let required: string[] = [];
33
52
  for (const schema of schemas) {
34
53
  if (schema.properties) {
@@ -40,13 +59,13 @@ export function mergeJSONSchemas(schemas: JSONSchema[]) {
40
59
  Object.assign(props, schema.properties);
41
60
  }
42
61
  }
43
- const schema = Object.keys(props).length > 0 ? { properties: props, required, type: 'object' } as JSONSchema : null;
62
+ const schema: JSONSchema | null = Object.keys(props).length > 0 ? { properties: props, required, type: 'object' } : null;
44
63
  return schema;
45
64
  }
46
65
 
47
66
  export function _mergePromptsSchema(prompts: ExecutablePromptSegmentDef[]) {
48
- const props: Record<string, JSONSchema4> = {};
49
- let required = new Set<String>();
67
+ const props: Record<string, JSONSchema> = {};
68
+ let required = new Set<string>();
50
69
  for (const prompt of prompts) {
51
70
  if (prompt.template?.inputSchema?.properties) {
52
71
  const schema = prompt.template?.inputSchema;
@@ -76,10 +95,12 @@ export function _mergePromptsSchema(prompts: ExecutablePromptSegmentDef[]) {
76
95
  required.add('chat');
77
96
  }
78
97
  }
79
- return Object.keys(props).length > 0 ? {
98
+
99
+ const schema: JSONSchema | null = Object.keys(props).length > 0 ? {
80
100
  properties: props,
81
101
  required: Array.from(required)
82
- } as JSONSchema4 : null;
102
+ } : null;
103
+ return schema;
83
104
  }
84
105
 
85
106
  export function mergePromptsSchema(interaction: InteractionRefWithSchema | PopulatedInteraction) {
@@ -89,7 +110,7 @@ export function mergePromptsSchema(interaction: InteractionRefWithSchema | Popul
89
110
 
90
111
  export function mergeInCodePromptSchemas(prompts: InCodePrompt[]) {
91
112
  const props: Record<string, JSONSchema> = {};
92
- let required = new Set<String>();
113
+ let required = new Set<string>();
93
114
  for (const prompt of prompts) {
94
115
  if (prompt.schema?.properties) {
95
116
  const schema = prompt.schema;
@@ -101,8 +122,9 @@ export function mergeInCodePromptSchemas(prompts: InCodePrompt[]) {
101
122
  Object.assign(props, schema.properties);
102
123
  }
103
124
  }
104
- return Object.keys(props).length > 0 ? {
125
+ const schema: JSONSchema | null = Object.keys(props).length > 0 ? {
105
126
  properties: props,
106
127
  required: Array.from(required)
107
- } as JSONSchema : null;
128
+ } : null;
129
+ return schema;
108
130
  }
package/src/versions.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export enum ApiVersions {
2
2
  COMPLETION_RESULT_V1 = 20250925,
3
+ DOWNLOAD_URL_NO_MIME_TYPE_V1 = 20260210,
3
4
  }