@squidcloud/client 1.0.455 → 1.0.457
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/dist/cjs/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/internal-common/src/public-types/ai-agent.public-types.d.ts +6 -0
- package/dist/internal-common/src/public-types/metric.public-types.d.ts +19 -1
- package/dist/internal-common/src/types/observability.types.d.ts +8 -0
- package/dist/typescript-client/src/observability-client.d.ts +2 -11
- package/dist/typescript-client/src/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -402,6 +402,12 @@ export interface BaseAiChatOptions {
|
|
|
402
402
|
memoryOptions?: AiAgentMemoryOptions;
|
|
403
403
|
/** Whether to disable the whole context for the request. Default to false. */
|
|
404
404
|
disableContext?: boolean;
|
|
405
|
+
/**
|
|
406
|
+
* Whether to use the legacy knowledge base context mode, where KB results are fetched upfront
|
|
407
|
+
* and appended directly to the prompt. When false (default), the KB is exposed as a callable
|
|
408
|
+
* tool that the LLM can invoke on demand.
|
|
409
|
+
*/
|
|
410
|
+
legacyKnowledgeBaseContext?: boolean;
|
|
405
411
|
/** Rewrite prompt for RAG - defaults to false */
|
|
406
412
|
enablePromptRewriteForRag?: boolean;
|
|
407
413
|
/** Whether to include references from the source context in the response. Default to false. */
|
|
@@ -19,6 +19,10 @@ export type MetricDomain = (typeof METRIC_DOMAIN)[number];
|
|
|
19
19
|
export declare const METRIC_INTERVAL_ALIGNMENT: readonly ["align-by-start-time", "align-by-end-time"];
|
|
20
20
|
/** Indicates how to align per-point periods in metric queries. */
|
|
21
21
|
export type MetricIntervalAlignment = (typeof METRIC_INTERVAL_ALIGNMENT)[number];
|
|
22
|
+
/** Behavior when no data is available for a metric query. */
|
|
23
|
+
export declare const METRIC_NO_DATA_BEHAVIOR: readonly ["return-no-result-groups", "return-result-group-with-default-values"];
|
|
24
|
+
/** Indicates behavior when no data is available. */
|
|
25
|
+
export type MetricNoDataBehavior = (typeof METRIC_NO_DATA_BEHAVIOR)[number];
|
|
22
26
|
/** Common parameters shared by all metric query requests. */
|
|
23
27
|
export interface QueryMetricsRequestCommon {
|
|
24
28
|
/** Kind of the metrics (domain) to query. */
|
|
@@ -84,7 +88,7 @@ export interface QueryMetricsRequestCommon {
|
|
|
84
88
|
*
|
|
85
89
|
* Default: 'return-no-result-groups'
|
|
86
90
|
*/
|
|
87
|
-
noDataBehavior?:
|
|
91
|
+
noDataBehavior?: MetricNoDataBehavior;
|
|
88
92
|
}
|
|
89
93
|
/**
|
|
90
94
|
* Request structure for querying user-defined metrics.
|
|
@@ -152,3 +156,17 @@ export interface QuerySquidMetricsResponse<NameType extends SquidMetricName> ext
|
|
|
152
156
|
}
|
|
153
157
|
/** Final normalized response for a metrics query, required fields guaranteed. */
|
|
154
158
|
export type QueryMetricsResponse<NameType extends string = string> = Required<QuerySquidMetricsResponse<NameType extends SquidMetricName ? NameType : SquidMetricName> | QueryUserMetricsResponse<NameType>>;
|
|
159
|
+
/**
|
|
160
|
+
* A single metric event (wire format).
|
|
161
|
+
* @category Metrics
|
|
162
|
+
*/
|
|
163
|
+
export interface Metric<MetricNameType = string> {
|
|
164
|
+
/** Name of the metric. */
|
|
165
|
+
name: MetricNameType;
|
|
166
|
+
/** Value of the metric. */
|
|
167
|
+
value: number;
|
|
168
|
+
/** Time associated with the metric. Milliseconds since UNIX epoch. */
|
|
169
|
+
timestamp: number;
|
|
170
|
+
/** Set of tags for the metric. */
|
|
171
|
+
tags: Record<string, string>;
|
|
172
|
+
}
|
|
@@ -21,6 +21,14 @@ export declare const ObservableNames: {
|
|
|
21
21
|
readonly graphql: ObservableNameMetrics;
|
|
22
22
|
readonly acquireLock: ObservableNameMetrics;
|
|
23
23
|
readonly releaseLock: ObservableNameMetrics;
|
|
24
|
+
/**
|
|
25
|
+
* Timing and count for '/observability/metrics' endpoint calls used to report batch of metrics.
|
|
26
|
+
*/
|
|
27
|
+
readonly metricReport: ObservableNameMetrics;
|
|
28
|
+
/**
|
|
29
|
+
* Timing and count for '/observability/metrics/query' endpoint calls used to query metrics.
|
|
30
|
+
*/
|
|
31
|
+
readonly metricQuery: ObservableNameMetrics;
|
|
24
32
|
};
|
|
25
33
|
export type ObservableName = keyof typeof ObservableNames;
|
|
26
34
|
export interface MetricEvent {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { QueryMetricsRequest, QueryMetricsResponse } from '../../internal-common/src/public-types/metric.public-types';
|
|
1
|
+
import { Metric, QueryMetricsRequest, QueryMetricsResponse } from '../../internal-common/src/public-types/metric.public-types';
|
|
2
2
|
/**
|
|
3
3
|
* A client for reporting user metrics and querying both application-related Squid and user metrics.
|
|
4
4
|
* @category Platform
|
|
@@ -25,16 +25,7 @@ export declare class ObservabilityClient {
|
|
|
25
25
|
queryMetrics<MetricName extends string = string>(metricRequest: QueryMetricsRequest<MetricName>): Promise<QueryMetricsResponse<MetricName>>;
|
|
26
26
|
}
|
|
27
27
|
/** A single metric event. */
|
|
28
|
-
export
|
|
29
|
-
/** Name of the metric. */
|
|
30
|
-
name: MetricNameType;
|
|
31
|
-
/** Value of the metric. */
|
|
32
|
-
value: number;
|
|
33
|
-
/** Time associated with the metric. Milliseconds since UNIX epoch. */
|
|
34
|
-
timestamp: number;
|
|
35
|
-
/** Set of tags for the metric. */
|
|
36
|
-
tags: Record<string, string>;
|
|
37
|
-
}
|
|
28
|
+
export { Metric } from '../../internal-common/src/public-types/metric.public-types';
|
|
38
29
|
/**
|
|
39
30
|
* MetricReport represents a single metric event with some optional fields.
|
|
40
31
|
* These optional fields are automatically populated by Squid with default values.
|