@vertesia/common 1.1.0-dev.20260327.125707Z → 1.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.
Files changed (146) hide show
  1. package/lib/cjs/access-control.js +2 -0
  2. package/lib/cjs/access-control.js.map +1 -1
  3. package/lib/cjs/apikey.js.map +1 -1
  4. package/lib/cjs/apps.js +35 -0
  5. package/lib/cjs/apps.js.map +1 -1
  6. package/lib/cjs/audit-trail.js +7 -0
  7. package/lib/cjs/audit-trail.js.map +1 -1
  8. package/lib/cjs/cost-analytics.js +13 -0
  9. package/lib/cjs/cost-analytics.js.map +1 -0
  10. package/lib/cjs/group.js +2 -1
  11. package/lib/cjs/group.js.map +1 -1
  12. package/lib/cjs/index.js +3 -1
  13. package/lib/cjs/index.js.map +1 -1
  14. package/lib/cjs/integrations.js.map +1 -1
  15. package/lib/cjs/interaction.js +2 -0
  16. package/lib/cjs/interaction.js.map +1 -1
  17. package/lib/cjs/oauth-server.js +3 -0
  18. package/lib/cjs/oauth-server.js.map +1 -0
  19. package/lib/cjs/oauth.js +1 -1
  20. package/lib/cjs/project.js.map +1 -1
  21. package/lib/cjs/store/conversation-state.js.map +1 -1
  22. package/lib/cjs/store/rendering.js +4 -0
  23. package/lib/cjs/store/rendering.js.map +1 -1
  24. package/lib/cjs/store/schedule.js.map +1 -1
  25. package/lib/cjs/store/store.js +4 -1
  26. package/lib/cjs/store/store.js.map +1 -1
  27. package/lib/cjs/store/workflow.js.map +1 -1
  28. package/lib/cjs/user.js +1 -0
  29. package/lib/cjs/user.js.map +1 -1
  30. package/lib/esm/access-control.js +2 -0
  31. package/lib/esm/access-control.js.map +1 -1
  32. package/lib/esm/apikey.js.map +1 -1
  33. package/lib/esm/apps.js +30 -0
  34. package/lib/esm/apps.js.map +1 -1
  35. package/lib/esm/audit-trail.js +6 -1
  36. package/lib/esm/audit-trail.js.map +1 -1
  37. package/lib/esm/cost-analytics.js +10 -0
  38. package/lib/esm/cost-analytics.js.map +1 -0
  39. package/lib/esm/group.js +1 -0
  40. package/lib/esm/group.js.map +1 -1
  41. package/lib/esm/index.js +3 -1
  42. package/lib/esm/index.js.map +1 -1
  43. package/lib/esm/integrations.js.map +1 -1
  44. package/lib/esm/interaction.js +2 -0
  45. package/lib/esm/interaction.js.map +1 -1
  46. package/lib/esm/oauth-server.js +2 -0
  47. package/lib/esm/oauth-server.js.map +1 -0
  48. package/lib/esm/oauth.js +1 -1
  49. package/lib/esm/project.js.map +1 -1
  50. package/lib/esm/store/conversation-state.js.map +1 -1
  51. package/lib/esm/store/rendering.js +3 -0
  52. package/lib/esm/store/rendering.js.map +1 -1
  53. package/lib/esm/store/schedule.js.map +1 -1
  54. package/lib/esm/store/store.js +3 -0
  55. package/lib/esm/store/store.js.map +1 -1
  56. package/lib/esm/store/workflow.js.map +1 -1
  57. package/lib/esm/user.js +1 -0
  58. package/lib/esm/user.js.map +1 -1
  59. package/lib/tsconfig.tsbuildinfo +1 -1
  60. package/lib/types/access-control.d.ts +2 -0
  61. package/lib/types/access-control.d.ts.map +1 -1
  62. package/lib/types/analytics.d.ts +12 -6
  63. package/lib/types/analytics.d.ts.map +1 -1
  64. package/lib/types/apikey.d.ts +1 -0
  65. package/lib/types/apikey.d.ts.map +1 -1
  66. package/lib/types/apps.d.ts +351 -40
  67. package/lib/types/apps.d.ts.map +1 -1
  68. package/lib/types/ask-user.d.ts +0 -4
  69. package/lib/types/ask-user.d.ts.map +1 -1
  70. package/lib/types/audit-trail.d.ts +32 -5
  71. package/lib/types/audit-trail.d.ts.map +1 -1
  72. package/lib/types/cost-analytics.d.ts +160 -0
  73. package/lib/types/cost-analytics.d.ts.map +1 -0
  74. package/lib/types/group.d.ts +1 -0
  75. package/lib/types/group.d.ts.map +1 -1
  76. package/lib/types/index.d.ts +3 -1
  77. package/lib/types/index.d.ts.map +1 -1
  78. package/lib/types/integrations.d.ts +20 -6
  79. package/lib/types/integrations.d.ts.map +1 -1
  80. package/lib/types/interaction.d.ts +33 -4
  81. package/lib/types/interaction.d.ts.map +1 -1
  82. package/lib/types/oauth-server.d.ts +233 -0
  83. package/lib/types/oauth-server.d.ts.map +1 -0
  84. package/lib/types/oauth.d.ts +29 -18
  85. package/lib/types/oauth.d.ts.map +1 -1
  86. package/lib/types/project.d.ts +98 -19
  87. package/lib/types/project.d.ts.map +1 -1
  88. package/lib/types/query.d.ts +7 -0
  89. package/lib/types/query.d.ts.map +1 -1
  90. package/lib/types/refs.d.ts +4 -0
  91. package/lib/types/refs.d.ts.map +1 -1
  92. package/lib/types/runs.d.ts +14 -0
  93. package/lib/types/runs.d.ts.map +1 -1
  94. package/lib/types/store/agent-run.d.ts +160 -2
  95. package/lib/types/store/agent-run.d.ts.map +1 -1
  96. package/lib/types/store/conversation-state.d.ts +21 -2
  97. package/lib/types/store/conversation-state.d.ts.map +1 -1
  98. package/lib/types/store/doc-analyzer.d.ts +10 -0
  99. package/lib/types/store/doc-analyzer.d.ts.map +1 -1
  100. package/lib/types/store/rendering.d.ts +6 -0
  101. package/lib/types/store/rendering.d.ts.map +1 -1
  102. package/lib/types/store/schedule.d.ts +2 -5
  103. package/lib/types/store/schedule.d.ts.map +1 -1
  104. package/lib/types/store/store.d.ts +9 -0
  105. package/lib/types/store/store.d.ts.map +1 -1
  106. package/lib/types/store/workflow.d.ts +2 -2
  107. package/lib/types/store/workflow.d.ts.map +1 -1
  108. package/lib/types/tool-execution.d.ts +4 -0
  109. package/lib/types/tool-execution.d.ts.map +1 -1
  110. package/lib/types/transient-tokens.d.ts +1 -1
  111. package/lib/types/transient-tokens.d.ts.map +1 -1
  112. package/lib/types/user.d.ts +1 -0
  113. package/lib/types/user.d.ts.map +1 -1
  114. package/lib/types/workflow-analytics.d.ts +12 -0
  115. package/lib/types/workflow-analytics.d.ts.map +1 -1
  116. package/lib/vertesia-common.js +1 -1
  117. package/lib/vertesia-common.js.map +1 -1
  118. package/package.json +4 -4
  119. package/src/access-control.ts +2 -0
  120. package/src/analytics.ts +13 -6
  121. package/src/apikey.ts +1 -0
  122. package/src/apps.ts +401 -40
  123. package/src/ask-user.ts +0 -4
  124. package/src/audit-trail.ts +44 -5
  125. package/src/cost-analytics.ts +171 -0
  126. package/src/group.ts +3 -1
  127. package/src/index.ts +3 -2
  128. package/src/integrations.ts +21 -7
  129. package/src/interaction.ts +37 -3
  130. package/src/oauth-server.ts +258 -0
  131. package/src/oauth.ts +30 -18
  132. package/src/project.ts +105 -21
  133. package/src/query.ts +7 -0
  134. package/src/refs.ts +4 -0
  135. package/src/runs.ts +15 -0
  136. package/src/store/agent-run.ts +186 -2
  137. package/src/store/conversation-state.ts +24 -2
  138. package/src/store/doc-analyzer.ts +12 -0
  139. package/src/store/rendering.ts +10 -0
  140. package/src/store/schedule.ts +2 -6
  141. package/src/store/store.ts +11 -0
  142. package/src/store/workflow.ts +3 -2
  143. package/src/tool-execution.ts +4 -0
  144. package/src/transient-tokens.ts +1 -1
  145. package/src/user.ts +1 -0
  146. package/src/workflow-analytics.ts +12 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertesia/common",
3
- "version": "1.1.0-dev.20260327.125707Z",
3
+ "version": "1.1.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "types": "./lib/types/index.d.ts",
@@ -17,16 +17,16 @@
17
17
  "devDependencies": {
18
18
  "@rollup/plugin-commonjs": "^28.0.3",
19
19
  "@rollup/plugin-node-resolve": "^16.0.1",
20
+ "@rollup/plugin-terser": "^0.4.4",
20
21
  "@rollup/plugin-typescript": "^12.1.2",
21
22
  "rollup": "^4.59.0",
22
- "@rollup/plugin-terser": "^0.4.4",
23
23
  "ts-dual-module": "^0.6.3",
24
- "typescript": "^5.9.3",
24
+ "typescript": "^6.0.2",
25
25
  "vitest": "^4.0.16"
26
26
  },
27
27
  "dependencies": {
28
28
  "ajv": "^8.17.1",
29
- "@llumiverse/common": "1.0.0-dev.20260327.110720Z"
29
+ "@llumiverse/common": "1.1.0"
30
30
  },
31
31
  "repository": {
32
32
  "type": "git",
@@ -30,6 +30,8 @@ export enum Permission {
30
30
  account_write = "account:write",
31
31
  account_admin = "account:admin",
32
32
  manage_billing = "account:billing",
33
+ /** View cost and usage analytics */
34
+ billing_read = "billing:read",
33
35
  account_member = "account:member",
34
36
 
35
37
 
package/src/analytics.ts CHANGED
@@ -51,10 +51,15 @@ export interface RunAnalyticsResult {
51
51
  },
52
52
  }
53
53
 
54
- /** Entity with status breakdown (requires compound index for covered queries) */
54
+ /** Entity with status breakdown */
55
55
  export interface EntityStatusCounts {
56
56
  id: string;
57
- name: string;
57
+ /* Optional human-readable name for the entity, if available */
58
+ name?: string;
59
+ /** For interactions: the published version number */
60
+ version?: number;
61
+ /** For interactions: the lifecycle status (draft, published, archived) */
62
+ status?: string;
58
63
  /** Total count, or null if query failed */
59
64
  total: number | null;
60
65
  /** Counts by status, values are null if individual status query failed */
@@ -63,16 +68,18 @@ export interface EntityStatusCounts {
63
68
  hasErrors?: boolean;
64
69
  }
65
70
 
66
- /** Lightweight analytics summary using covered queries - scalable to 1M+ documents */
71
+ /** Scalable analytics summary */
67
72
  export interface RunsAnalyticsSummary {
68
73
  /** Total count of runs (from estimatedDocumentCount), null if failed */
69
74
  total: number | null;
70
75
  /** Counts by status, values are null if individual query failed */
71
76
  byStatus: Record<string, number | null>;
72
- /** Counts by environment with status breakdown (uses { environment: 1, status: 1 } compound index) */
77
+ /** Counts by environment with status breakdown */
73
78
  byEnvironment: EntityStatusCounts[];
74
- /** Counts by interaction with status breakdown (uses { interaction: 1, status: 1 } compound index) */
79
+ /** Counts by interaction with status breakdown */
75
80
  byInteraction: EntityStatusCounts[];
81
+ /** Counts by code-based interaction with status breakdown */
82
+ byCodeInteraction?: EntityStatusCounts[];
76
83
  /** Number of queries that failed out of total */
77
84
  queryStats: {
78
85
  total: number;
@@ -80,7 +87,7 @@ export interface RunsAnalyticsSummary {
80
87
  };
81
88
  }
82
89
 
83
- /** Date range filter for analytics queries (uses created_at field) */
90
+ /** Date range filter for analytics queries */
84
91
  export interface DateRangeQuery {
85
92
  /** Start date in ISO format, optional (unbounded if omitted) */
86
93
  start?: string;
package/src/apikey.ts CHANGED
@@ -11,6 +11,7 @@ export interface ApiKey {
11
11
  type: ApiKeyTypes;
12
12
  role: ProjectRoles;
13
13
  maskedValue?: string; //masked value
14
+ can_retrieve_value?: boolean;
14
15
  account: string; // the account id
15
16
  project: ProjectRef; // the project id if any
16
17
  enabled: boolean;