@jxsuite/protocol 6.0.0 → 6.2.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/package.json +1 -1
- package/src/routes.ts +8 -0
- package/src/types.ts +25 -0
package/package.json
CHANGED
package/src/routes.ts
CHANGED
|
@@ -382,6 +382,14 @@ export const STUDIO_ROUTES = {
|
|
|
382
382
|
gitFetch: route("POST", "/__studio/git/fetch", "Refresh remote tracking state"),
|
|
383
383
|
gitCheckout: route("POST", "/__studio/git/checkout", "Switch branches"),
|
|
384
384
|
gitCreateBranch: route("POST", "/__studio/git/create-branch", "Create a branch"),
|
|
385
|
+
gitCommitBranch: route(
|
|
386
|
+
"POST",
|
|
387
|
+
"/__studio/git/commit-branch",
|
|
388
|
+
"Commit the change set as a NEW branch off the session's base, then take it out of this one " +
|
|
389
|
+
"→ GitCommitBranchResult; 409 branch_exists",
|
|
390
|
+
"A publish the remote conflicts with reports the conflict alone, and Send for review stays " +
|
|
391
|
+
"refused on a branch whose every commit is live.",
|
|
392
|
+
),
|
|
385
393
|
gitDiff: route("GET", "/__studio/git/diff", "Unified diff of dirty files (or one path)"),
|
|
386
394
|
gitShow: route("GET", "/__studio/git/show", "File content at a ref"),
|
|
387
395
|
gitDiscard: route("POST", "/__studio/git/discard", "Discard working changes"),
|
package/src/types.ts
CHANGED
|
@@ -238,6 +238,18 @@ export interface GitLogEntry {
|
|
|
238
238
|
date: string;
|
|
239
239
|
}
|
|
240
240
|
|
|
241
|
+
/**
|
|
242
|
+
* Response of `git/commit-branch` (see StudioPlatform.gitCommitBranch): the branch the change set
|
|
243
|
+
* now lives on, its commit, and which files left this session (`moved`) or stayed because they were
|
|
244
|
+
* edited while it was made (`kept`).
|
|
245
|
+
*/
|
|
246
|
+
export interface GitCommitBranchResult {
|
|
247
|
+
branch: string;
|
|
248
|
+
sha: string;
|
|
249
|
+
moved: string[];
|
|
250
|
+
kept: string[];
|
|
251
|
+
}
|
|
252
|
+
|
|
241
253
|
/** Response of the pull-request route (see StudioPlatform.createPullRequest). */
|
|
242
254
|
export interface PullRequestInfo {
|
|
243
255
|
url: string;
|
|
@@ -817,6 +829,12 @@ export interface AiModelInfo {
|
|
|
817
829
|
}
|
|
818
830
|
|
|
819
831
|
/** Response of the AI proxy's models route (the chat route's sibling). */
|
|
832
|
+
/**
|
|
833
|
+
* The wire a provider speaks: the OpenAI-compatible chat-completions API, or the Anthropic Messages
|
|
834
|
+
* API (ai.md §2.6). The chat route's own body and frames are the same for both.
|
|
835
|
+
*/
|
|
836
|
+
export type AiProviderFamily = "openai-compat" | "anthropic";
|
|
837
|
+
|
|
820
838
|
export interface AiModelsResponse {
|
|
821
839
|
models: AiModelInfo[];
|
|
822
840
|
/** True when the backend holds working credentials (env key, managed platform). */
|
|
@@ -825,6 +843,13 @@ export interface AiModelsResponse {
|
|
|
825
843
|
managed?: boolean;
|
|
826
844
|
/** The backend's preferred model id, when it declares one. */
|
|
827
845
|
defaultModel?: string;
|
|
846
|
+
/**
|
|
847
|
+
* The provider families the chat route can reach with a caller's own key, chosen per request with
|
|
848
|
+
* the `X-Api-Provider` header (ai.md §2.6). Absent means `["openai-compat"]`: a backend that
|
|
849
|
+
* predates the header forwards every key to an OpenAI-compatible endpoint, so a client **MUST
|
|
850
|
+
* NOT** send it a key for any other family.
|
|
851
|
+
*/
|
|
852
|
+
providers?: AiProviderFamily[];
|
|
828
853
|
/** Set when the upstream provider was unreachable and defaults were returned. */
|
|
829
854
|
upstreamError?: number | string;
|
|
830
855
|
/**
|