@xerg/schemas 0.1.0 → 0.3.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.
- package/README.md +7 -2
- package/dist/index.d.ts +14 -1
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @xerg/schemas
|
|
2
2
|
|
|
3
|
-
Versioned TypeScript wire types for Xerg audit payloads, findings, comparisons, and recommendations.
|
|
3
|
+
Versioned TypeScript wire types for Xerg audit payloads, daily rollups, findings, comparisons, and recommendations.
|
|
4
4
|
|
|
5
5
|
## What it is
|
|
6
6
|
|
|
@@ -9,6 +9,7 @@ Versioned TypeScript wire types for Xerg audit payloads, findings, comparisons,
|
|
|
9
9
|
It is intentionally small and stable:
|
|
10
10
|
|
|
11
11
|
- TypeScript-first types for Xerg wire payloads
|
|
12
|
+
- Daily spend and waste rollups for hosted dashboards and ingestion pipelines
|
|
12
13
|
- A runtime `AUDIT_PUSH_PAYLOAD_VERSION` constant for compatibility checks
|
|
13
14
|
- A dependency-light package surface for backends, ingestion services, and internal tooling
|
|
14
15
|
|
|
@@ -35,7 +36,7 @@ export function acceptAuditPayload(payload: AuditPushPayload) {
|
|
|
35
36
|
throw new Error(`Unsupported payload version: ${payload.version}`);
|
|
36
37
|
}
|
|
37
38
|
|
|
38
|
-
return payload.summary.
|
|
39
|
+
return payload.summary.spendByDay;
|
|
39
40
|
}
|
|
40
41
|
```
|
|
41
42
|
|
|
@@ -55,11 +56,15 @@ import { AUDIT_PUSH_PAYLOAD_VERSION } from '@xerg/schemas';
|
|
|
55
56
|
AUDIT_PUSH_PAYLOAD_VERSION; // 1
|
|
56
57
|
```
|
|
57
58
|
|
|
59
|
+
Daily series such as `spendByDay` and `wasteByDay` were added without bumping the payload version because they are additive fields that older consumers can ignore safely.
|
|
60
|
+
|
|
58
61
|
## Exports
|
|
59
62
|
|
|
60
63
|
Primary exports include:
|
|
61
64
|
|
|
62
65
|
- `AuditPushPayload`
|
|
66
|
+
- `DailySpendBreakdown`
|
|
67
|
+
- `DailyWasteBreakdown`
|
|
63
68
|
- `WireFinding`
|
|
64
69
|
- `WireComparison`
|
|
65
70
|
- `XergRecommendation`
|
package/dist/index.d.ts
CHANGED
|
@@ -40,6 +40,17 @@ interface SpendBreakdown {
|
|
|
40
40
|
callCount: number;
|
|
41
41
|
observedShare: number;
|
|
42
42
|
}
|
|
43
|
+
interface DailySpendBreakdown {
|
|
44
|
+
date: string;
|
|
45
|
+
spendUsd: number;
|
|
46
|
+
observedSpendUsd: number;
|
|
47
|
+
estimatedSpendUsd: number;
|
|
48
|
+
callCount: number;
|
|
49
|
+
}
|
|
50
|
+
interface DailyWasteBreakdown {
|
|
51
|
+
date: string;
|
|
52
|
+
wasteUsd: number;
|
|
53
|
+
}
|
|
43
54
|
interface AuditPushPayload {
|
|
44
55
|
version: AuditPushPayloadVersion;
|
|
45
56
|
summary: {
|
|
@@ -58,6 +69,8 @@ interface AuditPushPayload {
|
|
|
58
69
|
opportunityByKind: FindingTaxonomyBucket[];
|
|
59
70
|
spendByWorkflow: SpendBreakdown[];
|
|
60
71
|
spendByModel: SpendBreakdown[];
|
|
72
|
+
spendByDay: DailySpendBreakdown[];
|
|
73
|
+
wasteByDay: DailyWasteBreakdown[];
|
|
61
74
|
findings: WireFinding[];
|
|
62
75
|
notes: string[];
|
|
63
76
|
comparison?: WireComparison | null;
|
|
@@ -83,4 +96,4 @@ interface XergRecommendation {
|
|
|
83
96
|
suggestedChange?: Record<string, unknown>;
|
|
84
97
|
}
|
|
85
98
|
|
|
86
|
-
export { AUDIT_PUSH_PAYLOAD_VERSION, type AuditPushPayload, type AuditPushPayloadVersion, type FindingTaxonomyBucket, type PushEnvironment, type SpendBreakdown, type WireComparison, type WireFinding, type WireFindingScope, type XergRecommendation };
|
|
99
|
+
export { AUDIT_PUSH_PAYLOAD_VERSION, type AuditPushPayload, type AuditPushPayloadVersion, type DailySpendBreakdown, type DailyWasteBreakdown, type FindingTaxonomyBucket, type PushEnvironment, type SpendBreakdown, type WireComparison, type WireFinding, type WireFindingScope, type XergRecommendation };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xerg/schemas",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Versioned TypeScript wire types for Xerg audit payloads, findings, comparisons, and recommendations.",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Versioned TypeScript wire types for Xerg audit payloads, daily rollups, findings, comparisons, and recommendations.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"xerg",
|
|
7
7
|
"schemas",
|
|
@@ -9,9 +9,12 @@
|
|
|
9
9
|
"types",
|
|
10
10
|
"wire-types",
|
|
11
11
|
"api",
|
|
12
|
+
"timeseries",
|
|
12
13
|
"contracts",
|
|
13
14
|
"audit",
|
|
14
15
|
"openclaw",
|
|
16
|
+
"hermes",
|
|
17
|
+
"cursor",
|
|
15
18
|
"finops",
|
|
16
19
|
"llm"
|
|
17
20
|
],
|