@ellipsis-dev/sdk 0.2.3 → 0.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/dist/index.d.ts +12 -3
- package/dist/index.js +34 -0
- package/dist/store/index.d.ts +1 -1
- package/dist/stream/index.d.ts +1 -1
- package/dist/{types-CNx-q_eN.d.ts → types-CtTRS9eJ.d.ts} +1046 -94
- package/package.json +1 -1
- package/schema/frames.schema.json +3 -101
- package/schema/lifecycle.schema.json +44 -0
- package/schema/openapi.v1.json +2628 -627
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AgentSessionWire, L as ListSessionRecordsResponse, a as ListSessionTurnsResponse, b as ListSessionExecutionsResponse, S as SessionMessageWire } from './types-
|
|
2
|
-
export {
|
|
1
|
+
import { A as AgentSessionWire, L as ListSessionRecordsResponse, a as ListSessionTurnsResponse, b as ListSessionExecutionsResponse, S as SessionMessageWire, C as CreateReviewRequest, R as Review, c as ListReviewsResponse } from './types-CtTRS9eJ.js';
|
|
2
|
+
export { d as AgentSessionExitStatus, e as AgentSessionPr, f as AgentSessionSource, g as AgentSessionStatus, h as AgentTurn, i as AgentTurnStatus, j as AttributionType, B as BudgetSource, D as DefaultResolution, k as DeltaFrame, l as DoneFrame, E as ErrorFrame, F as Finding, G as GithubAccountSnippet, m as GithubAccountType, H as Harness, n as HeartbeatFrame, P as ParentKind, o as PromptBlockedReason, p as RecordsAppendFrame, q as ResolvedReviewScope, r as ReviewCounters, s as ReviewScope, t as ReviewScopeKind, u as SendSessionMessageRequest, v as SessionExecutionWire, w as SessionFrame, x as SessionLiveness, y as SessionMessageStatus, z as SessionPrompting, I as SessionRecordWire, J as SessionState, K as SessionStreamFrame, M as SessionSurface, N as SnapshotFrame, O as StreamFrame, T as TokensInfo, Q as components, U as paths } from './types-CtTRS9eJ.js';
|
|
3
3
|
|
|
4
4
|
type FetchJson = (path: string, init?: {
|
|
5
5
|
method?: string;
|
|
@@ -18,6 +18,15 @@ declare class EllipsisClient {
|
|
|
18
18
|
sendSessionMessage(sessionId: string, message: string, options?: {
|
|
19
19
|
idempotencyKey?: string;
|
|
20
20
|
}): Promise<SessionMessageWire>;
|
|
21
|
+
createReview(request: CreateReviewRequest): Promise<Review>;
|
|
22
|
+
getReview(reviewId: string): Promise<Review>;
|
|
23
|
+
listReviews(options?: {
|
|
24
|
+
owner?: string;
|
|
25
|
+
repo?: string;
|
|
26
|
+
pullRequestNumber?: number;
|
|
27
|
+
status?: string;
|
|
28
|
+
limit?: number;
|
|
29
|
+
}): Promise<ListReviewsResponse>;
|
|
21
30
|
}
|
|
22
31
|
|
|
23
|
-
export { AgentSessionWire, EllipsisClient, type FetchJson, ListSessionExecutionsResponse, ListSessionRecordsResponse, ListSessionTurnsResponse, SessionMessageWire };
|
|
32
|
+
export { AgentSessionWire, CreateReviewRequest, EllipsisClient, type FetchJson, ListReviewsResponse, ListSessionExecutionsResponse, ListSessionRecordsResponse, ListSessionTurnsResponse, Review, SessionMessageWire };
|
package/dist/index.js
CHANGED
|
@@ -57,6 +57,40 @@ var EllipsisClient = class {
|
|
|
57
57
|
}
|
|
58
58
|
);
|
|
59
59
|
}
|
|
60
|
+
// Trigger a code review on a pull request, or on a pushed branch (the
|
|
61
|
+
// platform finds-or-creates a draft PR for it). A review's `id` IS a session
|
|
62
|
+
// id, so callers stream it with the stream client and then re-read it below
|
|
63
|
+
// for the findings — which only exist once the review finalizes. A review
|
|
64
|
+
// with nothing new to look at comes back with `status: 'skipped'`, not an
|
|
65
|
+
// error.
|
|
66
|
+
async createReview(request) {
|
|
67
|
+
return await this.fetchJson("/v1/reviews", {
|
|
68
|
+
method: "POST",
|
|
69
|
+
body: request
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
// One review: scope, findings, parser counters, and the posting outcome.
|
|
73
|
+
async getReview(reviewId) {
|
|
74
|
+
return await this.fetchJson(
|
|
75
|
+
`/v1/reviews/${encodeURIComponent(reviewId)}`
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
// Reviews newest first, `findings` omitted (counters only). Includes
|
|
79
|
+
// webhook-triggered reviews, so this is the full review history of a PR —
|
|
80
|
+
// the chain the incremental watermark walks.
|
|
81
|
+
async listReviews(options = {}) {
|
|
82
|
+
const params = new URLSearchParams();
|
|
83
|
+
if (options.owner != null) params.set("owner", options.owner);
|
|
84
|
+
if (options.repo != null) params.set("repo", options.repo);
|
|
85
|
+
if (options.pullRequestNumber != null)
|
|
86
|
+
params.set("pull_request_number", String(options.pullRequestNumber));
|
|
87
|
+
if (options.status != null) params.set("status", options.status);
|
|
88
|
+
if (options.limit != null) params.set("limit", String(options.limit));
|
|
89
|
+
const query = params.toString();
|
|
90
|
+
return await this.fetchJson(
|
|
91
|
+
"/v1/reviews" + (query ? `?${query}` : "")
|
|
92
|
+
);
|
|
93
|
+
}
|
|
60
94
|
};
|
|
61
95
|
export {
|
|
62
96
|
EllipsisClient
|
package/dist/store/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { I as SessionRecordWire, A as AgentSessionWire, S as SessionMessageWire, O as StreamFrame } from '../types-CtTRS9eJ.js';
|
|
2
2
|
|
|
3
3
|
interface ChatToolNode {
|
|
4
4
|
key: string;
|
package/dist/stream/index.d.ts
CHANGED