@uluops/ops-sdk 3.2.2 → 3.4.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 +79 -0
- package/README.md +61 -11
- package/dist/client.d.ts +76 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +76 -0
- package/dist/client.js.map +1 -1
- package/dist/config/constants.d.ts +1 -1
- package/dist/config/generated-version.d.ts +1 -1
- package/dist/config/generated-version.js +1 -1
- package/dist/config/loaders.d.ts +30 -4
- package/dist/config/loaders.d.ts.map +1 -1
- package/dist/config/loaders.js +34 -4
- package/dist/config/loaders.js.map +1 -1
- package/dist/config/validators.d.ts +3 -0
- package/dist/config/validators.d.ts.map +1 -1
- package/dist/config/validators.js +8 -0
- package/dist/config/validators.js.map +1 -1
- package/dist/errors/errors.d.ts +7 -1
- package/dist/errors/errors.d.ts.map +1 -1
- package/dist/errors/errors.js +7 -1
- package/dist/errors/errors.js.map +1 -1
- package/dist/http/http-client.d.ts +10 -0
- package/dist/http/http-client.d.ts.map +1 -1
- package/dist/http/http-client.js +12 -1
- package/dist/http/http-client.js.map +1 -1
- package/dist/operations/query-utils.d.ts +10 -0
- package/dist/operations/query-utils.d.ts.map +1 -1
- package/dist/operations/query-utils.js +10 -0
- package/dist/operations/query-utils.js.map +1 -1
- package/dist/types/response-schemas.d.ts.map +1 -1
- package/dist/types/response-schemas.js +36 -25
- package/dist/types/response-schemas.js.map +1 -1
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,85 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [3.4.0] - 2026-06-16
|
|
10
|
+
|
|
11
|
+
Consumer-experience polish from a `consumer-validate` pipeline run (docs 93 /
|
|
12
|
+
public-interface 91 / dx 88, all gates passed). No runtime behavior changes to
|
|
13
|
+
existing successful calls; one error type is now more specific (see Changed).
|
|
14
|
+
|
|
15
|
+
### Security
|
|
16
|
+
|
|
17
|
+
- **Defensive string-length ceilings on issue-domain response fields (CWE-20).**
|
|
18
|
+
Completes the bounding started in 3.2.1, which covered only the history-event
|
|
19
|
+
schemas: `IssueResponseSchema` (fingerprint, title, failureMode, category,
|
|
20
|
+
agent, filePath), `OccurrenceResponseSchema` (agentName, description, filePath),
|
|
21
|
+
`IssueNoteResponseSchema` (content, createdBy), and `StatusHistoryResponseSchema`
|
|
22
|
+
(reason) now carry `.max()` bounds set at-or-above the tracker DB column sizes
|
|
23
|
+
(verified against prod 2026-06-16, with margin against future widenings). An
|
|
24
|
+
unbounded `z.string()` let a degenerate or malicious server force a large heap
|
|
25
|
+
allocation on the calling host before any consumer-side gate could run (the CLI
|
|
26
|
+
consumes these schemas in issue-picker mode and `formatIssue`); oversized
|
|
27
|
+
payloads now throw `ZodError` at parse time instead. Compliant servers are
|
|
28
|
+
unaffected. The reusable `MAX_*` ceiling constants are consolidated above the
|
|
29
|
+
schemas, and `createMockIssue` now eagerly validates against the schema so a
|
|
30
|
+
malformed/oversized test fixture fails at construction. Two tests assert the
|
|
31
|
+
bound fires on an oversized title (600 chars) and fingerprint (200 chars).
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
|
|
35
|
+
- **`bulkUpdateStatus` README example corrected.** The example iterated the result
|
|
36
|
+
in a `for…of` loop and read `result.success` / `result.issueId` / `result.error` —
|
|
37
|
+
but the method returns an aggregate object `{ updated: number, failed: string[] }`,
|
|
38
|
+
so the documented code threw `TypeError: results is not iterable` at runtime. The
|
|
39
|
+
API and TypeScript types were always correct; only the example was wrong.
|
|
40
|
+
- **`NotFoundError.details` README comment corrected** to the real shape
|
|
41
|
+
(`{ resource: "Project '…' not found" }`, not `{ id: '…' }`).
|
|
42
|
+
- **`client.issues.search()` `query` parameter documented as optional** (it is
|
|
43
|
+
`query?: string`; filter-only searches are valid) — the parameter table previously
|
|
44
|
+
marked it required.
|
|
45
|
+
- **Stale README version header** (was `3.2.1`) updated.
|
|
46
|
+
|
|
47
|
+
### Changed
|
|
48
|
+
|
|
49
|
+
- **`OpsHttpClient` now throws `InputValidationError` (not a base `Error`) for an
|
|
50
|
+
invalid `orgSlug`.** Aligns with every other constructor-time validation so callers
|
|
51
|
+
branching on `instanceof InputValidationError` catch it. `InputValidationError`
|
|
52
|
+
extends `Error`, so existing `instanceof Error` / catch-all handlers are unaffected.
|
|
53
|
+
|
|
54
|
+
### Docs
|
|
55
|
+
|
|
56
|
+
- **`client.issues.softDelete(issueId)` is now documented** in the README Issue
|
|
57
|
+
Operations section (previously the only public method with no README entry).
|
|
58
|
+
- **Error type guards documented.** Added a "Type Guards" section covering all twelve
|
|
59
|
+
guards (`isNotFoundError`, `isRateLimitError`, …) exported from `@uluops/ops-sdk/errors`.
|
|
60
|
+
- **Every `OpsClient` namespace delegate now carries inline JSDoc**, so IDE hover over
|
|
61
|
+
`client.runs.save`, `client.issues.search`, etc. surfaces a summary and an
|
|
62
|
+
`@see` link to the underlying operation instead of a bare signature.
|
|
63
|
+
- **`loadCredentials` / `loadConfig` gained full `@param`/`@returns` JSDoc** documenting
|
|
64
|
+
the `options > env > file` priority chain, plus a JSDoc block on the `OpsHttpClient`
|
|
65
|
+
constructor, `buildIssueListParams`, and the config import example at the package root
|
|
66
|
+
(now showing `loadConfig`, `loadEnvFiles`, `ENV_VARS`, `API_KEY_PREFIX`).
|
|
67
|
+
- **TypeDoc API-reference generation added** (`npm run docs:api` → `docs/api`,
|
|
68
|
+
`@internal` excluded). `typedoc` added as a dev dependency.
|
|
69
|
+
|
|
70
|
+
### Internal
|
|
71
|
+
|
|
72
|
+
- **Leaked internal helpers tagged `@internal`** (no longer surfaced in generated docs;
|
|
73
|
+
still exported to avoid a breaking change): `createErrorFromStatus`
|
|
74
|
+
(`@uluops/ops-sdk/errors`); `getGlobalConfigDir`, `getCredentialsPath`,
|
|
75
|
+
`loadStoredCredentials`, `isApiKey`, `validateCredentials`, `validateUuid`,
|
|
76
|
+
`validateRequiredString`, `validatePositiveInt` (`@uluops/ops-sdk/config`). These are
|
|
77
|
+
plumbing re-exported for advanced/tooling consumers and are not covered by semver.
|
|
78
|
+
|
|
79
|
+
## [3.3.0] - 2026-06-16
|
|
80
|
+
|
|
81
|
+
### Changed
|
|
82
|
+
|
|
83
|
+
- **Bumped `@uluops/sdk-core` to `0.13.0`** (exact pin), which carries three fixes that affect this SDK at runtime:
|
|
84
|
+
- `retries: 0` now makes one attempt and surfaces the real typed error (e.g. `NetworkError`) instead of a contextless `Error('Request failed')`.
|
|
85
|
+
- A 401 with credentials present now yields an actionable `UnauthorizedError` (server reason preserved, plus guidance that the credential may be expired/revoked/invalid), distinct from the no-credentials case; the broken private-monorepo link was removed from the no-credentials message.
|
|
86
|
+
- `isApiKey()` now enforces the minimum key length, so it agrees with the `ApiKeyAuth` constructor.
|
|
87
|
+
|
|
9
88
|
## [3.2.2] - 2026-06-08
|
|
10
89
|
|
|
11
90
|
Companion to API v1.58.1 (dry-run completeness + Zod error envelope).
|
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
Official TypeScript SDK with Zod runtime validation for the UluOps platform API. Track execution runs, manage issues, analyze trends, and integrate agent pipelines into your workflow.
|
|
13
13
|
|
|
14
|
-
**Current version: 3.
|
|
14
|
+
**Current version: 3.4.0** | [Changelog](./CHANGELOG.md)
|
|
15
15
|
|
|
16
16
|
## Quick Start
|
|
17
17
|
|
|
@@ -227,8 +227,15 @@ import {
|
|
|
227
227
|
RateLimitError,
|
|
228
228
|
} from '@uluops/ops-sdk/errors';
|
|
229
229
|
|
|
230
|
-
// Config utilities
|
|
231
|
-
import {
|
|
230
|
+
// Config utilities (also re-exported from the package root)
|
|
231
|
+
import {
|
|
232
|
+
loadCredentials, // resolve credentials from options > env > credentials.json
|
|
233
|
+
loadConfig, // resolve full config (credentials + connection settings)
|
|
234
|
+
loadEnvFiles, // load .env files into process.env before reading config
|
|
235
|
+
DEFAULT_BASE_URL, // default API base URL
|
|
236
|
+
ENV_VARS, // map of the env var names the SDK reads
|
|
237
|
+
API_KEY_PREFIX, // expected API key prefix ('ulr_')
|
|
238
|
+
} from '@uluops/ops-sdk/config';
|
|
232
239
|
```
|
|
233
240
|
|
|
234
241
|
### Package Exports
|
|
@@ -1058,7 +1065,7 @@ Search issues across projects.
|
|
|
1058
1065
|
|
|
1059
1066
|
| Parameter | Type | Required | Description |
|
|
1060
1067
|
|-----------|------|----------|-------------|
|
|
1061
|
-
| `query` | `string` |
|
|
1068
|
+
| `query` | `string` | No | Search query (omit for filter-only searches) |
|
|
1062
1069
|
| `projects` | `string[]` | No | Filter by projects |
|
|
1063
1070
|
| `agents` | `string[]` | No | Filter by agents |
|
|
1064
1071
|
| `status` | `Status` | No | Filter by status |
|
|
@@ -1203,6 +1210,14 @@ Restore a soft-deleted issue.
|
|
|
1203
1210
|
const issue = await client.issues.restore('issue-uuid');
|
|
1204
1211
|
```
|
|
1205
1212
|
|
|
1213
|
+
#### `client.issues.softDelete(issueId)`
|
|
1214
|
+
|
|
1215
|
+
Soft-delete an active issue. Reversible via `restore()`. Returns `{ deleted: true }`.
|
|
1216
|
+
|
|
1217
|
+
```typescript
|
|
1218
|
+
await client.issues.softDelete('issue-uuid');
|
|
1219
|
+
```
|
|
1220
|
+
|
|
1206
1221
|
#### `client.issues.undoLastChange(issueId)`
|
|
1207
1222
|
|
|
1208
1223
|
Undo the last status change on an issue.
|
|
@@ -1221,12 +1236,12 @@ const results = await client.issues.bulkUpdateStatus([
|
|
|
1221
1236
|
{ issueId: 'issue-2', status: 'deferred', reason: 'Not a priority' },
|
|
1222
1237
|
]);
|
|
1223
1238
|
|
|
1224
|
-
//
|
|
1225
|
-
//
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1239
|
+
// The result is an aggregate object — `updated` counts the successes and
|
|
1240
|
+
// `failed` lists the issue IDs that could not be updated (e.g., not found
|
|
1241
|
+
// or an invalid status transition).
|
|
1242
|
+
console.log(`Updated ${results.updated} issue(s)`);
|
|
1243
|
+
if (results.failed.length > 0) {
|
|
1244
|
+
console.warn('Failed issue IDs:', results.failed);
|
|
1230
1245
|
}
|
|
1231
1246
|
```
|
|
1232
1247
|
|
|
@@ -1560,7 +1575,7 @@ try {
|
|
|
1560
1575
|
} catch (error) {
|
|
1561
1576
|
if (error instanceof NotFoundError) {
|
|
1562
1577
|
console.log(error.message); // "Project 'non-existent' not found"
|
|
1563
|
-
console.log(error.details); // {
|
|
1578
|
+
console.log(error.details); // { resource: "Project 'non-existent' not found" }
|
|
1564
1579
|
} else if (error instanceof UnauthorizedError) {
|
|
1565
1580
|
console.log('Please authenticate');
|
|
1566
1581
|
} else if (error instanceof RateLimitError) {
|
|
@@ -1590,6 +1605,41 @@ try {
|
|
|
1590
1605
|
| `TimeoutError` | - | Request timeout |
|
|
1591
1606
|
| `InputValidationError` | - | Client-side Zod validation failure |
|
|
1592
1607
|
|
|
1608
|
+
### Type Guards
|
|
1609
|
+
|
|
1610
|
+
Every error class also ships a type guard. These are an alternative to `instanceof`
|
|
1611
|
+
that narrows the error type without importing the class — useful in `switch`-style
|
|
1612
|
+
handling or when you only need a subset of the hierarchy:
|
|
1613
|
+
|
|
1614
|
+
```typescript
|
|
1615
|
+
import {
|
|
1616
|
+
isOpsApiError, // any server-returned API error
|
|
1617
|
+
isNotFoundError, // 404
|
|
1618
|
+
isUnauthorizedError, // 401
|
|
1619
|
+
isForbiddenError, // 403
|
|
1620
|
+
isValidationError, // 400
|
|
1621
|
+
isConflictError, // 409
|
|
1622
|
+
isUnprocessableError, // 422
|
|
1623
|
+
isRateLimitError, // 429
|
|
1624
|
+
isPayloadTooLargeError, // 413
|
|
1625
|
+
isServiceUnavailableError, // 503
|
|
1626
|
+
isNetworkError, // connection failure
|
|
1627
|
+
isTimeoutError, // request timeout
|
|
1628
|
+
} from '@uluops/ops-sdk/errors';
|
|
1629
|
+
|
|
1630
|
+
try {
|
|
1631
|
+
await client.runs.save(input);
|
|
1632
|
+
} catch (error) {
|
|
1633
|
+
if (isNotFoundError(error)) {
|
|
1634
|
+
// handle missing resource
|
|
1635
|
+
} else if (isRateLimitError(error)) {
|
|
1636
|
+
console.log(`Retry after ${error.details?.retryAfter}s`);
|
|
1637
|
+
} else if (isOpsApiError(error)) {
|
|
1638
|
+
console.log(`API error: ${error.code} - ${error.message}`);
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1641
|
+
```
|
|
1642
|
+
|
|
1593
1643
|
### Automatic Retries
|
|
1594
1644
|
|
|
1595
1645
|
The SDK automatically retries on transient errors (502, 503, 504, 429) and network failures (DNS, connection reset, ECONNREFUSED) with exponential backoff:
|
package/dist/client.d.ts
CHANGED
|
@@ -69,117 +69,193 @@ export declare class OpsClient {
|
|
|
69
69
|
getAuthType(): 'api_key' | 'session' | null;
|
|
70
70
|
/** Authentication, API keys, sessions, and user profile management */
|
|
71
71
|
readonly auth: {
|
|
72
|
+
/** Register a new user account. */
|
|
72
73
|
register: (input: RegisterInput) => Promise<RegisterResponse>;
|
|
74
|
+
/** Log in with email + password, returning a session token. */
|
|
73
75
|
login: (input: LoginInput) => Promise<LoginResponse>;
|
|
76
|
+
/** Revoke all active sessions for the current user. */
|
|
74
77
|
logoutAll: () => Promise<{
|
|
75
78
|
sessionsRevoked: number;
|
|
76
79
|
}>;
|
|
80
|
+
/** Trigger a password-reset email for the given address. */
|
|
77
81
|
forgotPassword: (email: string) => Promise<MessageResponse>;
|
|
82
|
+
/** Complete a password reset using a token from the reset email. */
|
|
78
83
|
resetPassword: (input: ResetPasswordInput) => Promise<MessageResponse>;
|
|
84
|
+
/** Change the current user's password (requires current password). */
|
|
79
85
|
changePassword: (input: ChangePasswordInput) => Promise<MessageResponse>;
|
|
86
|
+
/** Set a first-time password for OAuth/admin-created accounts. */
|
|
80
87
|
setPassword: (password: string) => Promise<MessageResponse>;
|
|
88
|
+
/** Get the authenticated user (auth-scoped view). */
|
|
81
89
|
getMe: () => Promise<AuthUser>;
|
|
90
|
+
/** Get the current user's public profile. */
|
|
82
91
|
getProfile: () => Promise<{
|
|
83
92
|
user: PublicUser;
|
|
84
93
|
}>;
|
|
94
|
+
/** Update the current user's profile (partial; at least one field). */
|
|
85
95
|
updateProfile: (input: UpdateProfileInput) => Promise<{
|
|
86
96
|
user: PublicUser;
|
|
87
97
|
}>;
|
|
98
|
+
/** Fetch the current user's avatar bytes and content type. */
|
|
88
99
|
getAvatar: () => Promise<{
|
|
89
100
|
data: ArrayBuffer;
|
|
90
101
|
contentType: string;
|
|
91
102
|
}>;
|
|
103
|
+
/** Remove the current user's avatar. */
|
|
92
104
|
deleteAvatar: () => Promise<void>;
|
|
105
|
+
/** List the current user's API keys (metadata only). */
|
|
93
106
|
listApiKeys: () => Promise<PublicApiKey[]>;
|
|
107
|
+
/** Create an API key; the secret is returned once, on creation. */
|
|
94
108
|
createApiKey: (input?: CreateApiKeyInput) => Promise<ApiKeyCreatedResponse>;
|
|
109
|
+
/** Revoke an API key by id. */
|
|
95
110
|
revokeApiKey: (keyId: string) => Promise<void>;
|
|
111
|
+
/** List the current user's active sessions. */
|
|
96
112
|
listSessions: () => Promise<PublicSession[]>;
|
|
113
|
+
/** Revoke a single session by id. */
|
|
97
114
|
revokeSession: (sessionId: string) => Promise<void>;
|
|
98
115
|
};
|
|
99
116
|
/** Project CRUD, summaries, trends, issue listing, and bulk operations */
|
|
100
117
|
readonly projects: {
|
|
118
|
+
/** List all projects visible to the caller. */
|
|
101
119
|
list: () => Promise<Project[]>;
|
|
120
|
+
/** Get a project by id or name. */
|
|
102
121
|
get: (idOrName: string) => Promise<Project>;
|
|
122
|
+
/** Create a new project. */
|
|
103
123
|
create: (input: CreateProjectInput) => Promise<Project>;
|
|
124
|
+
/** Update a project's metadata. */
|
|
104
125
|
update: (idOrName: string, input: UpdateProjectInput) => Promise<Project>;
|
|
126
|
+
/** Permanently delete a project (requires confirmation). */
|
|
105
127
|
delete: (idOrName: string, input: DeleteProjectInput) => Promise<DeleteResult>;
|
|
128
|
+
/** Soft-delete a project; reversible via `restore()`. */
|
|
106
129
|
softDelete: (idOrName: string, input: DeleteProjectInput) => Promise<DeleteResult>;
|
|
130
|
+
/** Restore a soft-deleted project. */
|
|
107
131
|
restore: (idOrName: string) => Promise<Project>;
|
|
132
|
+
/** Rename a project. */
|
|
108
133
|
rename: (input: RenameProjectInput) => Promise<Project>;
|
|
134
|
+
/** Get aggregate summary stats for a project. */
|
|
109
135
|
getSummary: (idOrName: string) => Promise<ProjectSummaryResponse>;
|
|
136
|
+
/** Get time-series trends for a project. */
|
|
110
137
|
getTrends: (idOrName: string, query?: ProjectTrendsQuery) => Promise<ProjectTrends>;
|
|
138
|
+
/** List a project's issues (filtered). */
|
|
111
139
|
listIssues: (idOrName: string, query?: ListProjectIssuesQuery) => Promise<Issue[]>;
|
|
140
|
+
/** List a project's issues with a total count for pagination. */
|
|
112
141
|
listIssuesWithCount: (idOrName: string, query?: ListProjectIssuesQuery) => Promise<PaginatedIssues>;
|
|
142
|
+
/** Bulk-update the status of many issues in a project. */
|
|
113
143
|
bulkUpdateIssueStatus: (idOrName: string, updates: BulkIssueStatusUpdate[]) => Promise<BulkIssueStatusResult>;
|
|
144
|
+
/** Merge duplicate issues within a project. */
|
|
114
145
|
mergeIssues: (idOrName: string, input: MergeIssuesInput) => Promise<MergeIssuesResult>;
|
|
115
146
|
};
|
|
116
147
|
/** Execution run save, preview, diff, archive, and retrieval */
|
|
117
148
|
readonly runs: {
|
|
149
|
+
/** Save an execution run (agents, scores, recommendations). */
|
|
118
150
|
save: (input: SaveRunInput, options?: {
|
|
119
151
|
_skipClientValidation?: boolean;
|
|
120
152
|
}) => Promise<SaveRunResponse>;
|
|
153
|
+
/** Preview a save without persisting (dry-run). */
|
|
121
154
|
validate: (input: SaveRunInput, options?: {
|
|
122
155
|
_skipClientValidation?: boolean;
|
|
123
156
|
}) => Promise<ValidateRunResponse>;
|
|
157
|
+
/** Diff two runs to surface regressions/improvements. */
|
|
124
158
|
diff: (query: RunDiffQuery) => Promise<RunDiffResult>;
|
|
159
|
+
/** Archive old runs by number/date/keep-last filter. */
|
|
125
160
|
archive: (input: ArchiveRunsInput) => Promise<ArchiveRunsResult>;
|
|
161
|
+
/** Update a run identified by project + run number. */
|
|
126
162
|
update: (input: UpdateRunByNumberInput, options?: {
|
|
127
163
|
_skipClientValidation?: boolean;
|
|
128
164
|
}) => Promise<Run>;
|
|
165
|
+
/** List run summaries for a project. */
|
|
129
166
|
listByProject: (projectId: string, query?: ListRunsQuery) => Promise<RunSummary[]>;
|
|
167
|
+
/** Get the latest run for a project (optionally by workflow type). */
|
|
130
168
|
getLatest: (projectId: string, workflowType?: string) => Promise<Run>;
|
|
169
|
+
/** Get full details for a run (defaults to latest when runNumber omitted). */
|
|
131
170
|
getDetails: (projectId: string, runNumber?: number) => Promise<RunDetails>;
|
|
171
|
+
/** Get a single run by its id. */
|
|
132
172
|
get: (runId: string) => Promise<Run>;
|
|
173
|
+
/** Update a run identified directly by id. */
|
|
133
174
|
updateById: (runId: string, input: UpdateRunInput, options?: {
|
|
134
175
|
_skipClientValidation?: boolean;
|
|
135
176
|
}) => Promise<Run>;
|
|
177
|
+
/** Delete a run by id. */
|
|
136
178
|
delete: (runId: string) => Promise<DeleteResult>;
|
|
179
|
+
/** Get the structured analysis attached to a run. */
|
|
137
180
|
getAnalysis: (runId: string) => Promise<RunAnalysis>;
|
|
181
|
+
/** List analyses across a project's runs. */
|
|
138
182
|
getProjectAnalysis: (projectId: string, query?: ProjectAnalysisQuery) => Promise<ProjectAnalysisList>;
|
|
183
|
+
/** Query individual analysis records across runs. */
|
|
139
184
|
queryAnalysisRecords: (query?: AnalysisRecordsQuery) => Promise<AnalysisRecordsList>;
|
|
185
|
+
/** Get per-run analysis history for a single agent. */
|
|
140
186
|
getAgentRunsAnalysis: (agentName: string, query: AgentRunsAnalysisQuery) => Promise<AgentRunsAnalysis>;
|
|
141
187
|
};
|
|
142
188
|
/** Issue CRUD, search, status management, notes, and bulk operations */
|
|
143
189
|
readonly issues: {
|
|
190
|
+
/** Create a user-submitted issue. */
|
|
144
191
|
create: (input: CreateUserIssueInput) => Promise<Issue>;
|
|
192
|
+
/** Search issues by text/filters. */
|
|
145
193
|
search: (query: IssueSearchQuery) => Promise<Issue[]>;
|
|
194
|
+
/** Get an issue by its fingerprint within a project. */
|
|
146
195
|
getByFingerprint: (fingerprint: string, project: string) => Promise<Issue>;
|
|
196
|
+
/** Update an issue's status by fingerprint + project. */
|
|
147
197
|
updateStatusByFingerprint: (fingerprint: string, project: string, input: UpdateIssueStatusInput) => Promise<StatusUpdateResult>;
|
|
198
|
+
/** Get an issue by id. */
|
|
148
199
|
get: (issueId: string) => Promise<Issue>;
|
|
200
|
+
/** Get an issue with notes and history detail. */
|
|
149
201
|
getDetails: (issueId: string) => Promise<IssueDetails>;
|
|
202
|
+
/** Get an issue's change history. */
|
|
150
203
|
getHistory: (issueId: string) => Promise<IssueHistoryEnvelope>;
|
|
204
|
+
/** Update an issue's status by id. */
|
|
151
205
|
updateStatus: (issueId: string, input: UpdateIssueStatusInput) => Promise<Issue>;
|
|
206
|
+
/** Update an issue's metadata by id. */
|
|
152
207
|
update: (issueId: string, input: UpdateIssueInput) => Promise<Issue>;
|
|
208
|
+
/** Add a note to an issue. */
|
|
153
209
|
addNote: (issueId: string, input: CreateIssueNoteInput) => Promise<IssueNote>;
|
|
210
|
+
/** Restore a soft-deleted issue. */
|
|
154
211
|
restore: (issueId: string) => Promise<Issue>;
|
|
212
|
+
/** Soft-delete an active issue; reversible via `restore()`. */
|
|
155
213
|
softDelete: (issueId: string) => Promise<DeleteResult>;
|
|
214
|
+
/** Undo the most recent change to an issue. */
|
|
156
215
|
undoLastChange: (issueId: string) => Promise<Issue>;
|
|
216
|
+
/** Bulk-update issue statuses; returns `{ updated, failed }`. */
|
|
157
217
|
bulkUpdateStatus: (updates: BulkStatusUpdateItem[]) => Promise<BulkIssueStatusResult>;
|
|
218
|
+
/** List a project's issues by project id (filtered). */
|
|
158
219
|
listByProject: (projectId: string, query?: ListIssuesQuery) => Promise<Issue[]>;
|
|
159
220
|
};
|
|
160
221
|
/** Agent performance, taxonomy analytics, burndown, velocity, and discovery */
|
|
161
222
|
readonly analytics: {
|
|
223
|
+
/** Get per-agent performance metrics. */
|
|
162
224
|
getAgentPerformance: (query?: AnalyticsQuery) => Promise<AgentPerformance[]>;
|
|
225
|
+
/** Get agent reliability (convergence/recurrence) metrics. */
|
|
163
226
|
getAgentReliability: (query?: AgentReliabilityQuery) => Promise<AgentReliabilityResult>;
|
|
227
|
+
/** Get an agent's lifecycle timeline. */
|
|
164
228
|
getAgentLifecycle: (agentName: string, query?: AnalyticsQuery) => Promise<AgentLifecycleEntry[]>;
|
|
229
|
+
/** Get issue resolution-rate metrics. */
|
|
165
230
|
getResolutionRates: (query?: AnalyticsQuery) => Promise<ResolutionRateResult[]>;
|
|
231
|
+
/** Get files with the most recurring issues. */
|
|
166
232
|
getFileHotspots: (query?: AnalyticsQuery) => Promise<FileHotspotResult[]>;
|
|
233
|
+
/** Get the distribution of issues across the failure taxonomy. */
|
|
167
234
|
getTaxonomyDistribution: (query?: AnalyticsQuery) => Promise<TaxonomyDistributionResult[]>;
|
|
235
|
+
/** Get the full taxonomy analytics breakdown. */
|
|
168
236
|
getFullTaxonomy: (query?: AnalyticsQuery) => Promise<FullTaxonomyAnalyticsResult>;
|
|
237
|
+
/** Get issue burndown over time. */
|
|
169
238
|
getBurndown: (query?: BurndownQuery) => Promise<BurndownResultResponse>;
|
|
239
|
+
/** Get resolution velocity over time. */
|
|
170
240
|
getVelocity: (query?: VelocityQuery) => Promise<VelocityResultResponse>;
|
|
241
|
+
/** Get issue-discovery rate metrics. */
|
|
171
242
|
getDiscovery: (query?: DiscoveryQuery) => Promise<DiscoveryResultResponse>;
|
|
243
|
+
/** Get the agent comparison matrix. */
|
|
172
244
|
getAgentMatrix: (query?: AgentMatrixQuery) => Promise<AgentMatrixResultResponse>;
|
|
245
|
+
/** Get a high-level trend summary. */
|
|
173
246
|
getTrendSummary: (query?: AnalyticsQuery) => Promise<TrendSummaryResult[]>;
|
|
174
247
|
/**
|
|
175
248
|
* Get analytics by metric name (generic endpoint).
|
|
176
249
|
* Returns unvalidated data — use typed methods (getAgentPerformance, etc.) for validated responses.
|
|
250
|
+
*
|
|
177
251
|
*/
|
|
178
252
|
getByMetric: (metric: analyticsOps.AnalyticsMetric, query?: AnalyticsQuery) => Promise<unknown>;
|
|
253
|
+
/** List agents known to the analytics layer. */
|
|
179
254
|
listAgents: (query?: AnalyticsQuery) => Promise<AgentInfo[]>;
|
|
180
255
|
};
|
|
181
256
|
/** Failure taxonomy schema (domains, modes, severities) */
|
|
182
257
|
readonly taxonomy: {
|
|
258
|
+
/** Get the failure-taxonomy schema (domains, modes, severities). */
|
|
183
259
|
get: () => Promise<TaxonomyResponse>;
|
|
184
260
|
};
|
|
185
261
|
}
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAS7E,OAAO,KAAK,YAAY,MAAM,2BAA2B,CAAC;AAE1D,OAAO,KAAK,EACV,aAAa,EACb,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,UAAU,EACX,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EACV,OAAO,EACP,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,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;;;;;OAMG;IACG,MAAM,IAAI,OAAO,CAAC;QAAE,eAAe,EAAE,MAAM,CAAA;KAAE,CAAC;IAIpD;;;;OAIG;IACH,eAAe,IAAI,OAAO;IAK1B;;;;OAIG;IACH,WAAW,IAAI,SAAS,GAAG,SAAS,GAAG,IAAI;IAS3C,sEAAsE;IACtE,QAAQ,CAAC,IAAI;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAS7E,OAAO,KAAK,YAAY,MAAM,2BAA2B,CAAC;AAE1D,OAAO,KAAK,EACV,aAAa,EACb,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,UAAU,EACX,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EACV,OAAO,EACP,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EACV,GAAG,EACH,UAAU,EACV,WAAW,EACX,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,sBAAsB,EACtB,aAAa,EACb,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EACV,KAAK,EACL,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,EACtB,oB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AuC;iCACd,gBAAgB,KAAG,OAAO,CAAC,yBAAyB,CAAC;QAG9E,sCAAsC;kCACZ,cAAc,KAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;QAGxE;;;;WAIG;8BACmB,YAAY,CAAC,eAAe,UAAU,cAAc,KAAG,OAAO,CAAC,OAAO,CAAC;QAG7F,gDAAgD;6BAC3B,cAAc,KAAG,OAAO,CAAC,SAAS,EAAE,CAAC;MAG1D;IAMF,2DAA2D;IAC3D,QAAQ,CAAC,QAAQ;QACf,oEAAoE;mBAC3D,OAAO,CAAC,gBAAgB,CAAC;MAElC;CAEH"}
|
package/dist/client.js
CHANGED
|
@@ -110,22 +110,39 @@ export class OpsClient {
|
|
|
110
110
|
// ============================================
|
|
111
111
|
/** Authentication, API keys, sessions, and user profile management */
|
|
112
112
|
auth = {
|
|
113
|
+
/** Register a new user account. */
|
|
113
114
|
register: (input) => authOps.register(this.httpClient, input),
|
|
115
|
+
/** Log in with email + password, returning a session token. */
|
|
114
116
|
login: (input) => authOps.login(this.httpClient, input),
|
|
117
|
+
/** Revoke all active sessions for the current user. */
|
|
115
118
|
logoutAll: () => authOps.logoutAll(this.httpClient),
|
|
119
|
+
/** Trigger a password-reset email for the given address. */
|
|
116
120
|
forgotPassword: (email) => authOps.forgotPassword(this.httpClient, email),
|
|
121
|
+
/** Complete a password reset using a token from the reset email. */
|
|
117
122
|
resetPassword: (input) => authOps.resetPassword(this.httpClient, input),
|
|
123
|
+
/** Change the current user's password (requires current password). */
|
|
118
124
|
changePassword: (input) => authOps.changePassword(this.httpClient, input),
|
|
125
|
+
/** Set a first-time password for OAuth/admin-created accounts. */
|
|
119
126
|
setPassword: (password) => authOps.setPassword(this.httpClient, password),
|
|
127
|
+
/** Get the authenticated user (auth-scoped view). */
|
|
120
128
|
getMe: () => authOps.getMe(this.httpClient),
|
|
129
|
+
/** Get the current user's public profile. */
|
|
121
130
|
getProfile: () => authOps.getProfile(this.httpClient),
|
|
131
|
+
/** Update the current user's profile (partial; at least one field). */
|
|
122
132
|
updateProfile: (input) => authOps.updateProfile(this.httpClient, input),
|
|
133
|
+
/** Fetch the current user's avatar bytes and content type. */
|
|
123
134
|
getAvatar: () => authOps.getAvatar(this.httpClient),
|
|
135
|
+
/** Remove the current user's avatar. */
|
|
124
136
|
deleteAvatar: () => authOps.deleteAvatar(this.httpClient),
|
|
137
|
+
/** List the current user's API keys (metadata only). */
|
|
125
138
|
listApiKeys: () => authOps.listApiKeys(this.httpClient),
|
|
139
|
+
/** Create an API key; the secret is returned once, on creation. */
|
|
126
140
|
createApiKey: (input) => authOps.createApiKey(this.httpClient, input),
|
|
141
|
+
/** Revoke an API key by id. */
|
|
127
142
|
revokeApiKey: (keyId) => authOps.revokeApiKey(this.httpClient, keyId),
|
|
143
|
+
/** List the current user's active sessions. */
|
|
128
144
|
listSessions: () => authOps.listSessions(this.httpClient),
|
|
145
|
+
/** Revoke a single session by id. */
|
|
129
146
|
revokeSession: (sessionId) => authOps.revokeSession(this.httpClient, sessionId),
|
|
130
147
|
};
|
|
131
148
|
// ============================================
|
|
@@ -133,19 +150,33 @@ export class OpsClient {
|
|
|
133
150
|
// ============================================
|
|
134
151
|
/** Project CRUD, summaries, trends, issue listing, and bulk operations */
|
|
135
152
|
projects = {
|
|
153
|
+
/** List all projects visible to the caller. */
|
|
136
154
|
list: () => projectOps.list(this.httpClient),
|
|
155
|
+
/** Get a project by id or name. */
|
|
137
156
|
get: (idOrName) => projectOps.get(this.httpClient, idOrName),
|
|
157
|
+
/** Create a new project. */
|
|
138
158
|
create: (input) => projectOps.create(this.httpClient, input),
|
|
159
|
+
/** Update a project's metadata. */
|
|
139
160
|
update: (idOrName, input) => projectOps.update(this.httpClient, idOrName, input),
|
|
161
|
+
/** Permanently delete a project (requires confirmation). */
|
|
140
162
|
delete: (idOrName, input) => projectOps.deleteProject(this.httpClient, idOrName, input),
|
|
163
|
+
/** Soft-delete a project; reversible via `restore()`. */
|
|
141
164
|
softDelete: (idOrName, input) => projectOps.softDelete(this.httpClient, idOrName, input),
|
|
165
|
+
/** Restore a soft-deleted project. */
|
|
142
166
|
restore: (idOrName) => projectOps.restore(this.httpClient, idOrName),
|
|
167
|
+
/** Rename a project. */
|
|
143
168
|
rename: (input) => projectOps.rename(this.httpClient, input),
|
|
169
|
+
/** Get aggregate summary stats for a project. */
|
|
144
170
|
getSummary: (idOrName) => projectOps.getSummary(this.httpClient, idOrName),
|
|
171
|
+
/** Get time-series trends for a project. */
|
|
145
172
|
getTrends: (idOrName, query) => projectOps.getTrends(this.httpClient, idOrName, query),
|
|
173
|
+
/** List a project's issues (filtered). */
|
|
146
174
|
listIssues: (idOrName, query) => projectOps.listIssues(this.httpClient, idOrName, query),
|
|
175
|
+
/** List a project's issues with a total count for pagination. */
|
|
147
176
|
listIssuesWithCount: (idOrName, query) => projectOps.listIssuesWithCount(this.httpClient, idOrName, query),
|
|
177
|
+
/** Bulk-update the status of many issues in a project. */
|
|
148
178
|
bulkUpdateIssueStatus: (idOrName, updates) => projectOps.bulkUpdateIssueStatus(this.httpClient, idOrName, updates),
|
|
179
|
+
/** Merge duplicate issues within a project. */
|
|
149
180
|
mergeIssues: (idOrName, input) => projectOps.mergeIssues(this.httpClient, idOrName, input),
|
|
150
181
|
};
|
|
151
182
|
// ============================================
|
|
@@ -153,21 +184,36 @@ export class OpsClient {
|
|
|
153
184
|
// ============================================
|
|
154
185
|
/** Execution run save, preview, diff, archive, and retrieval */
|
|
155
186
|
runs = {
|
|
187
|
+
/** Save an execution run (agents, scores, recommendations). */
|
|
156
188
|
save: (input, options) => runOps.save(this.httpClient, input, options),
|
|
189
|
+
/** Preview a save without persisting (dry-run). */
|
|
157
190
|
validate: (input, options) => runOps.validate(this.httpClient, input, options),
|
|
191
|
+
/** Diff two runs to surface regressions/improvements. */
|
|
158
192
|
diff: (query) => runOps.diff(this.httpClient, query),
|
|
193
|
+
/** Archive old runs by number/date/keep-last filter. */
|
|
159
194
|
archive: (input) => runOps.archive(this.httpClient, input),
|
|
195
|
+
/** Update a run identified by project + run number. */
|
|
160
196
|
update: (input, options) => runOps.update(this.httpClient, input, options),
|
|
197
|
+
/** List run summaries for a project. */
|
|
161
198
|
listByProject: (projectId, query) => runOps.listByProject(this.httpClient, projectId, query),
|
|
199
|
+
/** Get the latest run for a project (optionally by workflow type). */
|
|
162
200
|
getLatest: (projectId, workflowType) => runOps.getLatest(this.httpClient, projectId, workflowType),
|
|
201
|
+
/** Get full details for a run (defaults to latest when runNumber omitted). */
|
|
163
202
|
getDetails: (projectId, runNumber) => runOps.getDetails(this.httpClient, projectId, runNumber),
|
|
203
|
+
/** Get a single run by its id. */
|
|
164
204
|
get: (runId) => runOps.get(this.httpClient, runId),
|
|
205
|
+
/** Update a run identified directly by id. */
|
|
165
206
|
updateById: (runId, input, options) => runOps.updateById(this.httpClient, runId, input, options),
|
|
207
|
+
/** Delete a run by id. */
|
|
166
208
|
delete: (runId) => runOps.deleteRun(this.httpClient, runId),
|
|
167
209
|
// Analysis operations (v0.3.0)
|
|
210
|
+
/** Get the structured analysis attached to a run. */
|
|
168
211
|
getAnalysis: (runId) => runOps.getAnalysis(this.httpClient, runId),
|
|
212
|
+
/** List analyses across a project's runs. */
|
|
169
213
|
getProjectAnalysis: (projectId, query) => runOps.getProjectAnalysis(this.httpClient, projectId, query),
|
|
214
|
+
/** Query individual analysis records across runs. */
|
|
170
215
|
queryAnalysisRecords: (query) => runOps.queryAnalysisRecords(this.httpClient, query),
|
|
216
|
+
/** Get per-run analysis history for a single agent. */
|
|
171
217
|
getAgentRunsAnalysis: (agentName, query) => runOps.getAgentRunsAnalysis(this.httpClient, agentName, query),
|
|
172
218
|
};
|
|
173
219
|
// ============================================
|
|
@@ -175,20 +221,35 @@ export class OpsClient {
|
|
|
175
221
|
// ============================================
|
|
176
222
|
/** Issue CRUD, search, status management, notes, and bulk operations */
|
|
177
223
|
issues = {
|
|
224
|
+
/** Create a user-submitted issue. */
|
|
178
225
|
create: (input) => issueOps.create(this.httpClient, input),
|
|
226
|
+
/** Search issues by text/filters. */
|
|
179
227
|
search: (query) => issueOps.search(this.httpClient, query),
|
|
228
|
+
/** Get an issue by its fingerprint within a project. */
|
|
180
229
|
getByFingerprint: (fingerprint, project) => issueOps.getByFingerprint(this.httpClient, fingerprint, project),
|
|
230
|
+
/** Update an issue's status by fingerprint + project. */
|
|
181
231
|
updateStatusByFingerprint: (fingerprint, project, input) => issueOps.updateStatusByFingerprint(this.httpClient, fingerprint, project, input),
|
|
232
|
+
/** Get an issue by id. */
|
|
182
233
|
get: (issueId) => issueOps.get(this.httpClient, issueId),
|
|
234
|
+
/** Get an issue with notes and history detail. */
|
|
183
235
|
getDetails: (issueId) => issueOps.getDetails(this.httpClient, issueId),
|
|
236
|
+
/** Get an issue's change history. */
|
|
184
237
|
getHistory: (issueId) => issueOps.getHistory(this.httpClient, issueId),
|
|
238
|
+
/** Update an issue's status by id. */
|
|
185
239
|
updateStatus: (issueId, input) => issueOps.updateStatus(this.httpClient, issueId, input),
|
|
240
|
+
/** Update an issue's metadata by id. */
|
|
186
241
|
update: (issueId, input) => issueOps.update(this.httpClient, issueId, input),
|
|
242
|
+
/** Add a note to an issue. */
|
|
187
243
|
addNote: (issueId, input) => issueOps.addNote(this.httpClient, issueId, input),
|
|
244
|
+
/** Restore a soft-deleted issue. */
|
|
188
245
|
restore: (issueId) => issueOps.restore(this.httpClient, issueId),
|
|
246
|
+
/** Soft-delete an active issue; reversible via `restore()`. */
|
|
189
247
|
softDelete: (issueId) => issueOps.softDelete(this.httpClient, issueId),
|
|
248
|
+
/** Undo the most recent change to an issue. */
|
|
190
249
|
undoLastChange: (issueId) => issueOps.undoLastChange(this.httpClient, issueId),
|
|
250
|
+
/** Bulk-update issue statuses; returns `{ updated, failed }`. */
|
|
191
251
|
bulkUpdateStatus: (updates) => issueOps.bulkUpdateStatus(this.httpClient, updates),
|
|
252
|
+
/** List a project's issues by project id (filtered). */
|
|
192
253
|
listByProject: (projectId, query) => issueOps.listByProject(this.httpClient, projectId, query),
|
|
193
254
|
};
|
|
194
255
|
// ============================================
|
|
@@ -196,23 +257,37 @@ export class OpsClient {
|
|
|
196
257
|
// ============================================
|
|
197
258
|
/** Agent performance, taxonomy analytics, burndown, velocity, and discovery */
|
|
198
259
|
analytics = {
|
|
260
|
+
/** Get per-agent performance metrics. */
|
|
199
261
|
getAgentPerformance: (query) => analyticsOps.getAgentPerformance(this.httpClient, query),
|
|
262
|
+
/** Get agent reliability (convergence/recurrence) metrics. */
|
|
200
263
|
getAgentReliability: (query) => analyticsOps.getAgentReliability(this.httpClient, query),
|
|
264
|
+
/** Get an agent's lifecycle timeline. */
|
|
201
265
|
getAgentLifecycle: (agentName, query) => analyticsOps.getAgentLifecycle(this.httpClient, agentName, query),
|
|
266
|
+
/** Get issue resolution-rate metrics. */
|
|
202
267
|
getResolutionRates: (query) => analyticsOps.getResolutionRates(this.httpClient, query),
|
|
268
|
+
/** Get files with the most recurring issues. */
|
|
203
269
|
getFileHotspots: (query) => analyticsOps.getFileHotspots(this.httpClient, query),
|
|
270
|
+
/** Get the distribution of issues across the failure taxonomy. */
|
|
204
271
|
getTaxonomyDistribution: (query) => analyticsOps.getTaxonomyDistribution(this.httpClient, query),
|
|
272
|
+
/** Get the full taxonomy analytics breakdown. */
|
|
205
273
|
getFullTaxonomy: (query) => analyticsOps.getFullTaxonomy(this.httpClient, query),
|
|
274
|
+
/** Get issue burndown over time. */
|
|
206
275
|
getBurndown: (query) => analyticsOps.getBurndown(this.httpClient, query),
|
|
276
|
+
/** Get resolution velocity over time. */
|
|
207
277
|
getVelocity: (query) => analyticsOps.getVelocity(this.httpClient, query),
|
|
278
|
+
/** Get issue-discovery rate metrics. */
|
|
208
279
|
getDiscovery: (query) => analyticsOps.getDiscovery(this.httpClient, query),
|
|
280
|
+
/** Get the agent comparison matrix. */
|
|
209
281
|
getAgentMatrix: (query) => analyticsOps.getAgentMatrix(this.httpClient, query),
|
|
282
|
+
/** Get a high-level trend summary. */
|
|
210
283
|
getTrendSummary: (query) => analyticsOps.getTrendSummary(this.httpClient, query),
|
|
211
284
|
/**
|
|
212
285
|
* Get analytics by metric name (generic endpoint).
|
|
213
286
|
* Returns unvalidated data — use typed methods (getAgentPerformance, etc.) for validated responses.
|
|
287
|
+
*
|
|
214
288
|
*/
|
|
215
289
|
getByMetric: (metric, query) => analyticsOps.getByMetric(this.httpClient, metric, query),
|
|
290
|
+
/** List agents known to the analytics layer. */
|
|
216
291
|
listAgents: (query) => analyticsOps.listAgents(this.httpClient, query),
|
|
217
292
|
};
|
|
218
293
|
// ============================================
|
|
@@ -220,6 +295,7 @@ export class OpsClient {
|
|
|
220
295
|
// ============================================
|
|
221
296
|
/** Failure taxonomy schema (domains, modes, severities) */
|
|
222
297
|
taxonomy = {
|
|
298
|
+
/** Get the failure-taxonomy schema (domains, modes, severities). */
|
|
223
299
|
get: () => taxonomyOps.get(this.httpClient),
|
|
224
300
|
};
|
|
225
301
|
}
|