@camstack/types 1.1.42 → 1.1.44

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 (41) hide show
  1. package/dist/addon.js +1 -1
  2. package/dist/addon.mjs +1 -1
  3. package/dist/capabilities/advanced-notifier.cap.d.ts +8 -4
  4. package/dist/capabilities/cap-router-predicates.d.ts +17 -0
  5. package/dist/capabilities/capability-definition.d.ts +1 -1
  6. package/dist/capabilities/custom-model-registry.cap.d.ts +20 -0
  7. package/dist/capabilities/index.d.ts +14 -7
  8. package/dist/capabilities/llm-runtime.cap.d.ts +286 -0
  9. package/dist/capabilities/llm-shared.d.ts +104 -0
  10. package/dist/capabilities/llm.cap.d.ts +596 -0
  11. package/dist/capabilities/login-method.cap.d.ts +53 -7
  12. package/dist/capabilities/model-convert.cap.d.ts +11 -0
  13. package/dist/capabilities/model-distributor.cap.d.ts +22 -0
  14. package/dist/capabilities/pipeline-analytics.cap.d.ts +101 -25
  15. package/dist/capabilities/pipeline-executor.cap.d.ts +26 -0
  16. package/dist/capabilities/pipeline-orchestrator.cap.d.ts +16 -0
  17. package/dist/capabilities/pipeline-runner.cap.d.ts +107 -0
  18. package/dist/capabilities/plate-gallery.cap.d.ts +114 -0
  19. package/dist/capabilities/platform-probe.cap.d.ts +1 -0
  20. package/dist/capabilities/scene-monitor.cap.d.ts +483 -0
  21. package/dist/enums/event-category.d.ts +33 -0
  22. package/dist/generated/addon-api.d.ts +3305 -1081
  23. package/dist/generated/cap-status-types.d.ts +3 -1
  24. package/dist/generated/capability-router-map.d.ts +13 -4
  25. package/dist/generated/device-local-state.d.ts +3 -0
  26. package/dist/generated/device-proxy.d.ts +4 -1
  27. package/dist/generated/method-access-map.d.ts +1 -1
  28. package/dist/generated/provider-kind-map.d.ts +1 -1
  29. package/dist/generated/system-proxy.d.ts +3 -1
  30. package/dist/index.js +1201 -48
  31. package/dist/index.mjs +1169 -49
  32. package/dist/interfaces/advanced-notifier.d.ts +2 -0
  33. package/dist/interfaces/event-bus.d.ts +111 -2
  34. package/dist/interfaces/pipeline-executor-capability.d.ts +9 -0
  35. package/dist/interfaces/pipeline-runner-capability.d.ts +8 -0
  36. package/dist/{sleep-BC9Yqte7.mjs → sleep-DkhOVOjW.mjs} +49 -1
  37. package/dist/{sleep-ByctZsHo.js → sleep-k6I1e98_.js} +49 -1
  38. package/dist/types/detection.d.ts +12 -0
  39. package/dist/types/models.d.ts +33 -1
  40. package/dist/types/pipeline-step.d.ts +31 -0
  41. package/package.json +1 -1
@@ -0,0 +1,104 @@
1
+ /**
2
+ * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
3
+ * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
4
+ * caps stay wire-compatible without a circular cap→cap import.
5
+ *
6
+ * Errors are a discriminated-union RESULT, never thrown: the shape survives
7
+ * every transport tier structurally, and failed calls still write usage rows.
8
+ * Token counts only in v1 — no costUsd (operator decision, 2026-07-15).
9
+ */
10
+ import { z } from 'zod';
11
+ export declare const LlmUsageSchema: z.ZodObject<{
12
+ inputTokens: z.ZodNumber;
13
+ outputTokens: z.ZodNumber;
14
+ }, z.core.$strip>;
15
+ export type LlmUsage = z.infer<typeof LlmUsageSchema>;
16
+ export declare const LlmErrorCodeSchema: z.ZodEnum<{
17
+ auth: "auth";
18
+ timeout: "timeout";
19
+ "rate-limited": "rate-limited";
20
+ refusal: "refusal";
21
+ "bad-request": "bad-request";
22
+ unavailable: "unavailable";
23
+ "no-profile": "no-profile";
24
+ "budget-exceeded": "budget-exceeded";
25
+ "adapter-error": "adapter-error";
26
+ }>;
27
+ export type LlmErrorCode = z.infer<typeof LlmErrorCodeSchema>;
28
+ export declare const LlmGenerateOkSchema: z.ZodObject<{
29
+ ok: z.ZodLiteral<true>;
30
+ text: z.ZodString;
31
+ model: z.ZodString;
32
+ usage: z.ZodObject<{
33
+ inputTokens: z.ZodNumber;
34
+ outputTokens: z.ZodNumber;
35
+ }, z.core.$strip>;
36
+ truncated: z.ZodBoolean;
37
+ latencyMs: z.ZodNumber;
38
+ }, z.core.$strip>;
39
+ export declare const LlmGenerateErrSchema: z.ZodObject<{
40
+ ok: z.ZodLiteral<false>;
41
+ code: z.ZodEnum<{
42
+ auth: "auth";
43
+ timeout: "timeout";
44
+ "rate-limited": "rate-limited";
45
+ refusal: "refusal";
46
+ "bad-request": "bad-request";
47
+ unavailable: "unavailable";
48
+ "no-profile": "no-profile";
49
+ "budget-exceeded": "budget-exceeded";
50
+ "adapter-error": "adapter-error";
51
+ }>;
52
+ message: z.ZodString;
53
+ retryAfterMs: z.ZodOptional<z.ZodNumber>;
54
+ }, z.core.$strip>;
55
+ export declare const LlmGenerateResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
56
+ ok: z.ZodLiteral<true>;
57
+ text: z.ZodString;
58
+ model: z.ZodString;
59
+ usage: z.ZodObject<{
60
+ inputTokens: z.ZodNumber;
61
+ outputTokens: z.ZodNumber;
62
+ }, z.core.$strip>;
63
+ truncated: z.ZodBoolean;
64
+ latencyMs: z.ZodNumber;
65
+ }, z.core.$strip>, z.ZodObject<{
66
+ ok: z.ZodLiteral<false>;
67
+ code: z.ZodEnum<{
68
+ auth: "auth";
69
+ timeout: "timeout";
70
+ "rate-limited": "rate-limited";
71
+ refusal: "refusal";
72
+ "bad-request": "bad-request";
73
+ unavailable: "unavailable";
74
+ "no-profile": "no-profile";
75
+ "budget-exceeded": "budget-exceeded";
76
+ "adapter-error": "adapter-error";
77
+ }>;
78
+ message: z.ZodString;
79
+ retryAfterMs: z.ZodOptional<z.ZodNumber>;
80
+ }, z.core.$strip>], "ok">;
81
+ export type LlmGenerateOk = z.infer<typeof LlmGenerateOkSchema>;
82
+ export type LlmGenerateErr = z.infer<typeof LlmGenerateErrSchema>;
83
+ export type LlmGenerateResult = z.infer<typeof LlmGenerateResultSchema>;
84
+ /**
85
+ * `Uint8Array` is the sanctioned binary convention — superjson + the UDS
86
+ * MsgPack channel round-trip typed arrays (embedding-encoder.cap.ts:29,
87
+ * notification-output.cap.ts:27-31 precedents).
88
+ */
89
+ export declare const LlmImageSchema: z.ZodObject<{
90
+ bytes: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
91
+ mimeType: z.ZodString;
92
+ }, z.core.$strip>;
93
+ export type LlmImage = z.infer<typeof LlmImageSchema>;
94
+ export declare const LlmGenerateBaseInputSchema: z.ZodObject<{
95
+ addonId: z.ZodOptional<z.ZodString>;
96
+ profileId: z.ZodOptional<z.ZodString>;
97
+ consumer: z.ZodString;
98
+ system: z.ZodOptional<z.ZodString>;
99
+ prompt: z.ZodString;
100
+ jsonSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
101
+ maxTokens: z.ZodOptional<z.ZodNumber>;
102
+ temperature: z.ZodOptional<z.ZodNumber>;
103
+ }, z.core.$strip>;
104
+ export type LlmGenerateBaseInput = z.infer<typeof LlmGenerateBaseInputSchema>;