trucontext 0.11.0 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trucontext",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "TruContext CLI — contextual memory for AI applications",
5
5
  "type": "module",
6
6
  "bin": {
@@ -21,7 +21,15 @@ export async function recallCommand(query, options) {
21
21
  };
22
22
 
23
23
  if (options.context) body.context_id = options.context;
24
- if (options.intent) body.intent = options.intent.toUpperCase();
24
+ if (options.intent) {
25
+ const validIntents = ['TEMPORAL', 'CAUSAL', 'ENTITY', 'COMPARATIVE', 'EXPLORATORY'];
26
+ const intent = options.intent.toUpperCase();
27
+ if (!validIntents.includes(intent)) {
28
+ console.error(chalk.red(`Invalid intent: ${options.intent}. Must be one of: ${validIntents.join(', ')}`));
29
+ process.exit(1);
30
+ }
31
+ body.intent = intent;
32
+ }
25
33
 
26
34
  const res = await dataPlane('POST', `/v1/recall`, body);
27
35
  const data = res.data;