@terreno/ai 58.0.6 → 58.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.
- package/CHANGELOG.md +52 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +6 -2
- package/dist/models/gptHistory.js +4 -0
- package/dist/observability/feedback.d.ts +31 -0
- package/dist/observability/feedback.js +218 -0
- package/dist/observability/local/datasetStore.d.ts +7 -0
- package/dist/observability/local/datasetStore.js +48 -2
- package/dist/observability/local/models/obsReviewItem.js +6 -0
- package/dist/observability/local/models/obsScore.js +12 -1
- package/dist/observability/local/promptStore.d.ts +1 -0
- package/dist/observability/local/promptStore.js +1 -0
- package/dist/observability/local/reviewStore.d.ts +5 -0
- package/dist/observability/local/reviewStore.js +17 -0
- package/dist/observability/local/traceStore.d.ts +23 -0
- package/dist/observability/local/traceStore.js +121 -10
- package/dist/observability/observabilityApp.d.ts +1 -0
- package/dist/observability/observabilityApp.js +2 -0
- package/dist/observability/observabilityAppRegistry.d.ts +1 -0
- package/dist/observability/routes/traces.js +72 -0
- package/dist/observability/types.d.ts +8 -1
- package/dist/routes/gpt.js +42 -2
- package/dist/routes/gptHistories.js +42 -2
- package/dist/service/aiService.d.ts +4 -1
- package/dist/service/aiService.js +17 -2
- package/dist/service/chatTurn.js +10 -1
- package/dist/types/index.d.ts +4 -0
- package/dist/types/observability.d.ts +1 -1
- package/package.json +8 -8
- package/src/index.ts +8 -1
- package/src/models/gptHistory.ts +5 -0
- package/src/observability/feedback.test.ts +688 -0
- package/src/observability/feedback.ts +263 -0
- package/src/observability/local/datasetStore.ts +57 -2
- package/src/observability/local/models/obsReviewItem.ts +9 -0
- package/src/observability/local/models/obsScore.ts +18 -1
- package/src/observability/local/obsModels.test.ts +10 -2
- package/src/observability/local/promptStore.test.ts +2 -0
- package/src/observability/local/promptStore.ts +2 -0
- package/src/observability/local/reviewStore.test.ts +55 -0
- package/src/observability/local/reviewStore.ts +21 -0
- package/src/observability/local/traceStore.test.ts +239 -1
- package/src/observability/local/traceStore.ts +140 -9
- package/src/observability/observabilityApp.ts +2 -0
- package/src/observability/observabilityAppRegistry.ts +1 -0
- package/src/observability/routes/datasets.test.ts +253 -0
- package/src/observability/routes/prompts.test.ts +1 -0
- package/src/observability/routes/traces.test.ts +581 -3
- package/src/observability/routes/traces.ts +87 -1
- package/src/observability/types.ts +6 -1
- package/src/routes/gpt.test.ts +263 -1
- package/src/routes/gpt.ts +43 -2
- package/src/routes/gptHistories.ts +55 -2
- package/src/service/aiService.observability.test.ts +244 -0
- package/src/service/aiService.ts +15 -2
- package/src/service/chatTurn.ts +11 -2
- package/src/types/index.ts +4 -0
- package/src/types/observability.ts +1 -1
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@ai-sdk/mcp": "^1.0.21",
|
|
8
8
|
"@google-cloud/storage": "^7.15.0",
|
|
9
|
-
"@terreno/blocks": "58.0
|
|
9
|
+
"@terreno/blocks": "58.1.0",
|
|
10
10
|
"ai": "^6.0.97",
|
|
11
11
|
"ajv": "8.20.0",
|
|
12
12
|
"csv-parse": "^7.0.3",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@ai-sdk/google-vertex": "^4.0.199",
|
|
21
21
|
"@biomejs/biome": "2.5.13",
|
|
22
|
-
"@terreno/admin-backend": "58.0
|
|
23
|
-
"@terreno/api": "58.0
|
|
24
|
-
"@terreno/jobs": "58.0
|
|
25
|
-
"@terreno/test": "58.0
|
|
22
|
+
"@terreno/admin-backend": "58.1.0",
|
|
23
|
+
"@terreno/api": "58.1.0",
|
|
24
|
+
"@terreno/jobs": "58.1.0",
|
|
25
|
+
"@terreno/test": "58.1.0",
|
|
26
26
|
"@types/bun": "^1.4.0",
|
|
27
27
|
"@types/express": "^5.0.6",
|
|
28
28
|
"@types/luxon": "^3.7.1",
|
|
@@ -121,8 +121,8 @@
|
|
|
121
121
|
"name": "@terreno/ai",
|
|
122
122
|
"peerDependencies": {
|
|
123
123
|
"@ai-sdk/google-vertex": "^4.0.199",
|
|
124
|
-
"@terreno/api": "58.0
|
|
125
|
-
"@terreno/jobs": "58.0
|
|
124
|
+
"@terreno/api": "58.1.0",
|
|
125
|
+
"@terreno/jobs": "58.1.0",
|
|
126
126
|
"mongoose": "^8.0.0 || ^9.0.0"
|
|
127
127
|
},
|
|
128
128
|
"peerDependenciesMeta": {
|
|
@@ -155,5 +155,5 @@
|
|
|
155
155
|
"typecheck": "tsc -p tsconfig.typecheck.json"
|
|
156
156
|
},
|
|
157
157
|
"types": "dist/index.d.ts",
|
|
158
|
-
"version": "58.0
|
|
158
|
+
"version": "58.1.0"
|
|
159
159
|
}
|
package/src/index.ts
CHANGED
|
@@ -18,6 +18,13 @@ export {FileAttachment} from "./models/fileAttachment";
|
|
|
18
18
|
export {GptHistory} from "./models/gptHistory";
|
|
19
19
|
export {getProjectModel, Project} from "./models/project";
|
|
20
20
|
export {AI_OBSERVABILITY_GROUP, observabilityAdminScreens} from "./observability/adminScreens";
|
|
21
|
+
export {
|
|
22
|
+
FEEDBACK_SIGNALS,
|
|
23
|
+
type FeedbackSignal,
|
|
24
|
+
recordTraceFeedback,
|
|
25
|
+
type TraceFeedbackInput,
|
|
26
|
+
type TraceFeedbackResult,
|
|
27
|
+
} from "./observability/feedback";
|
|
21
28
|
export {
|
|
22
29
|
answersAgree,
|
|
23
30
|
computeJudgeAgreement,
|
|
@@ -103,7 +110,7 @@ export {addProjectRoutes} from "./routes/projects";
|
|
|
103
110
|
export {findAgentBlock} from "./service/agentBlocks";
|
|
104
111
|
export type {RegisteredDataset} from "./service/aiDatasets";
|
|
105
112
|
export {configureAiDatasets, registerAiDataset} from "./service/aiDatasets";
|
|
106
|
-
export {AIService, TemperaturePresets} from "./service/aiService";
|
|
113
|
+
export {AIService, createTraceId, TemperaturePresets} from "./service/aiService";
|
|
107
114
|
export {createAskTools} from "./service/asks";
|
|
108
115
|
export {runBufferedChatTurn} from "./service/chatTurn";
|
|
109
116
|
export {FileStorageService} from "./service/fileStorage";
|
package/src/models/gptHistory.ts
CHANGED
|
@@ -147,6 +147,11 @@ const gptHistoryPromptSchema = new mongoose.Schema(
|
|
|
147
147
|
type: String,
|
|
148
148
|
},
|
|
149
149
|
toolName: {description: "Name of the tool that was invoked", type: String},
|
|
150
|
+
traceId: {
|
|
151
|
+
description:
|
|
152
|
+
"Observability trace id of this assistant reply; feedback on the reply is recorded against it",
|
|
153
|
+
type: String,
|
|
154
|
+
},
|
|
150
155
|
type: {
|
|
151
156
|
description: "Role of this message in the conversation",
|
|
152
157
|
enum: ["user", "assistant", "system", "tool-call", "tool-result"],
|