fix: echo REST completion nonce and argument context
This commit is contained in:
@@ -569,12 +569,18 @@ pub struct CompletionRequest {
|
|||||||
pub prefix: String,
|
pub prefix: String,
|
||||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
pub context: Option<protocol::CompletionContext>,
|
pub context: Option<protocol::CompletionContext>,
|
||||||
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
|
pub request_id: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
|
||||||
pub struct CompletionResponse {
|
pub struct CompletionResponse {
|
||||||
pub kind: CompletionKind,
|
pub kind: CompletionKind,
|
||||||
pub prefix: String,
|
pub prefix: String,
|
||||||
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
|
pub context: Option<protocol::CompletionContext>,
|
||||||
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
|
pub request_id: Option<String>,
|
||||||
pub entries: Vec<CompletionEntry>,
|
pub entries: Vec<CompletionEntry>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8273,6 +8273,8 @@ pub struct RuntimeWorkerCompletionsRequest {
|
|||||||
pub prefix: String,
|
pub prefix: String,
|
||||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
pub context: Option<protocol::CompletionContext>,
|
pub context: Option<protocol::CompletionContext>,
|
||||||
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
|
pub request_id: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, JsonSchema)]
|
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, JsonSchema)]
|
||||||
@@ -8282,6 +8284,10 @@ pub struct RuntimeWorkerCompletionsResult {
|
|||||||
pub worker_id: String,
|
pub worker_id: String,
|
||||||
pub kind: protocol::CompletionKind,
|
pub kind: protocol::CompletionKind,
|
||||||
pub prefix: String,
|
pub prefix: String,
|
||||||
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
|
pub context: Option<protocol::CompletionContext>,
|
||||||
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
|
pub request_id: Option<String>,
|
||||||
pub entries: Vec<protocol::CompletionEntry>,
|
pub entries: Vec<protocol::CompletionEntry>,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub diagnostics: Vec<Diagnostic>,
|
pub diagnostics: Vec<Diagnostic>,
|
||||||
|
|||||||
@@ -521,21 +521,8 @@ pub struct RuntimeHttpUploadedFileDeleteResponse {
|
|||||||
pub deleted: bool,
|
pub deleted: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
pub type RuntimeHttpWorkerCompletionsRequest = runtime_api::CompletionRequest;
|
||||||
pub struct RuntimeHttpWorkerCompletionsRequest {
|
pub type RuntimeHttpWorkerCompletionsResponse = runtime_api::CompletionResponse;
|
||||||
pub kind: protocol::CompletionKind,
|
|
||||||
#[serde(default)]
|
|
||||||
pub prefix: String,
|
|
||||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
|
||||||
pub context: Option<protocol::CompletionContext>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
|
||||||
pub struct RuntimeHttpWorkerCompletionsResponse {
|
|
||||||
pub kind: protocol::CompletionKind,
|
|
||||||
pub prefix: String,
|
|
||||||
pub entries: Vec<protocol::CompletionEntry>,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Worker lifecycle request body used by stop/cancel endpoints.
|
/// Worker lifecycle request body used by stop/cancel endpoints.
|
||||||
#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
|
||||||
@@ -1880,6 +1867,8 @@ async fn worker_completions(
|
|||||||
Ok(Json(RuntimeHttpWorkerCompletionsResponse {
|
Ok(Json(RuntimeHttpWorkerCompletionsResponse {
|
||||||
kind: request.kind,
|
kind: request.kind,
|
||||||
prefix: request.prefix,
|
prefix: request.prefix,
|
||||||
|
context: request.context,
|
||||||
|
request_id: request.request_id,
|
||||||
entries,
|
entries,
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
@@ -3517,6 +3506,56 @@ mod tests {
|
|||||||
serde_json::from_slice(&body).unwrap()
|
serde_json::from_slice(&body).unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[tokio::test]
|
||||||
|
async fn rest_feature_completions_echo_each_nonce_and_qualified_context() {
|
||||||
|
let runtime =
|
||||||
|
Runtime::with_execution_backend(RuntimeOptions::default(), Arc::new(AcceptingBackend))
|
||||||
|
.unwrap();
|
||||||
|
runtime
|
||||||
|
.store_config_bundle(test_bundle(ProfileSelector::Builtin(
|
||||||
|
"builtin:coder".into(),
|
||||||
|
)))
|
||||||
|
.unwrap();
|
||||||
|
let token = "completion-token";
|
||||||
|
let app = runtime_http_router(runtime, token.into());
|
||||||
|
let created = authed_json_request(
|
||||||
|
app.clone(),
|
||||||
|
Method::POST,
|
||||||
|
"/v1/workers",
|
||||||
|
token,
|
||||||
|
&task_request("completion"),
|
||||||
|
)
|
||||||
|
.await;
|
||||||
|
assert_eq!(created.status(), StatusCode::OK);
|
||||||
|
let created: RuntimeHttpWorkerResponse = read_json(created).await;
|
||||||
|
let context = protocol::CompletionContext {
|
||||||
|
invocation: protocol::FeatureInvocationIdentity("builtin:test/prepare".into()),
|
||||||
|
argument: Some("path".into()),
|
||||||
|
};
|
||||||
|
for nonce in ["first", "second", "first"] {
|
||||||
|
let request = runtime_api::CompletionRequest {
|
||||||
|
kind: protocol::CompletionKind::FeatureArgument,
|
||||||
|
prefix: "資料/".into(),
|
||||||
|
context: Some(context.clone()),
|
||||||
|
request_id: Some(nonce.into()),
|
||||||
|
};
|
||||||
|
let response = authed_json_request(
|
||||||
|
app.clone(),
|
||||||
|
Method::POST,
|
||||||
|
&format!("/v1/workers/{}/completions", created.worker.worker_id),
|
||||||
|
token,
|
||||||
|
&request,
|
||||||
|
)
|
||||||
|
.await;
|
||||||
|
assert_eq!(response.status(), StatusCode::OK);
|
||||||
|
let response: runtime_api::CompletionResponse = read_json(response).await;
|
||||||
|
assert_eq!(response.kind, request.kind);
|
||||||
|
assert_eq!(response.prefix, request.prefix);
|
||||||
|
assert_eq!(response.context, request.context);
|
||||||
|
assert_eq!(response.request_id, request.request_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn rest_command_api_delegates_to_runtime() {
|
async fn rest_command_api_delegates_to_runtime() {
|
||||||
let runtime =
|
let runtime =
|
||||||
|
|||||||
@@ -582,6 +582,8 @@ impl runtime_api::RuntimeApi for RuntimeManagementApi {
|
|||||||
Ok(runtime_api::CompletionResponse {
|
Ok(runtime_api::CompletionResponse {
|
||||||
kind,
|
kind,
|
||||||
prefix,
|
prefix,
|
||||||
|
context: value.context,
|
||||||
|
request_id: value.request_id,
|
||||||
entries,
|
entries,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -737,6 +737,8 @@ pub struct WorkerCompletionsRequest {
|
|||||||
pub prefix: String,
|
pub prefix: String,
|
||||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
pub context: Option<protocol::CompletionContext>,
|
pub context: Option<protocol::CompletionContext>,
|
||||||
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
|
pub request_id: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
|
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
|
||||||
@@ -745,6 +747,10 @@ pub struct WorkerCompletionsResult {
|
|||||||
pub worker: RuntimeWorkerRef,
|
pub worker: RuntimeWorkerRef,
|
||||||
pub kind: protocol::CompletionKind,
|
pub kind: protocol::CompletionKind,
|
||||||
pub prefix: String,
|
pub prefix: String,
|
||||||
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
|
pub context: Option<protocol::CompletionContext>,
|
||||||
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
|
pub request_id: Option<String>,
|
||||||
pub entries: Vec<protocol::CompletionEntry>,
|
pub entries: Vec<protocol::CompletionEntry>,
|
||||||
pub diagnostics: Vec<RuntimeDiagnostic>,
|
pub diagnostics: Vec<RuntimeDiagnostic>,
|
||||||
}
|
}
|
||||||
@@ -1329,6 +1335,8 @@ pub trait WorkspaceWorkerRuntime: Send + Sync {
|
|||||||
worker: RuntimeWorkerRef::new(self.runtime_id().to_string(), worker_id.to_string()),
|
worker: RuntimeWorkerRef::new(self.runtime_id().to_string(), worker_id.to_string()),
|
||||||
kind: request.kind,
|
kind: request.kind,
|
||||||
prefix: request.prefix,
|
prefix: request.prefix,
|
||||||
|
context: request.context,
|
||||||
|
request_id: request.request_id,
|
||||||
entries: Vec::new(),
|
entries: Vec::new(),
|
||||||
diagnostics: vec![diagnostic(
|
diagnostics: vec![diagnostic(
|
||||||
"worker_completions_unsupported",
|
"worker_completions_unsupported",
|
||||||
@@ -3312,6 +3320,8 @@ impl WorkspaceWorkerRuntime for EmbeddedWorkerRuntime {
|
|||||||
worker: RuntimeWorkerRef::new(self.runtime_id.clone(), worker_id.to_string()),
|
worker: RuntimeWorkerRef::new(self.runtime_id.clone(), worker_id.to_string()),
|
||||||
kind: request.kind,
|
kind: request.kind,
|
||||||
prefix: request.prefix,
|
prefix: request.prefix,
|
||||||
|
context: request.context,
|
||||||
|
request_id: request.request_id,
|
||||||
entries: Vec::new(),
|
entries: Vec::new(),
|
||||||
diagnostics: vec![diagnostic(
|
diagnostics: vec![diagnostic(
|
||||||
"embedded_worker_execution_unavailable",
|
"embedded_worker_execution_unavailable",
|
||||||
@@ -3327,6 +3337,8 @@ impl WorkspaceWorkerRuntime for EmbeddedWorkerRuntime {
|
|||||||
worker: RuntimeWorkerRef::new(self.runtime_id.clone(), worker_id.to_string()),
|
worker: RuntimeWorkerRef::new(self.runtime_id.clone(), worker_id.to_string()),
|
||||||
kind: request.kind,
|
kind: request.kind,
|
||||||
prefix: request.prefix,
|
prefix: request.prefix,
|
||||||
|
context: request.context,
|
||||||
|
request_id: request.request_id,
|
||||||
entries: Vec::new(),
|
entries: Vec::new(),
|
||||||
diagnostics: vec![diagnostic(
|
diagnostics: vec![diagnostic(
|
||||||
"embedded_worker_id_invalid",
|
"embedded_worker_id_invalid",
|
||||||
@@ -3345,6 +3357,8 @@ impl WorkspaceWorkerRuntime for EmbeddedWorkerRuntime {
|
|||||||
worker: RuntimeWorkerRef::new(self.runtime_id.clone(), worker_id.to_string()),
|
worker: RuntimeWorkerRef::new(self.runtime_id.clone(), worker_id.to_string()),
|
||||||
kind: request.kind,
|
kind: request.kind,
|
||||||
prefix: request.prefix,
|
prefix: request.prefix,
|
||||||
|
context: request.context,
|
||||||
|
request_id: request.request_id,
|
||||||
entries,
|
entries,
|
||||||
diagnostics: Vec::new(),
|
diagnostics: Vec::new(),
|
||||||
},
|
},
|
||||||
@@ -3352,6 +3366,8 @@ impl WorkspaceWorkerRuntime for EmbeddedWorkerRuntime {
|
|||||||
worker: RuntimeWorkerRef::new(self.runtime_id.clone(), worker_id.to_string()),
|
worker: RuntimeWorkerRef::new(self.runtime_id.clone(), worker_id.to_string()),
|
||||||
kind: request.kind,
|
kind: request.kind,
|
||||||
prefix: request.prefix,
|
prefix: request.prefix,
|
||||||
|
context: request.context,
|
||||||
|
request_id: request.request_id,
|
||||||
entries: Vec::new(),
|
entries: Vec::new(),
|
||||||
diagnostics: vec![embedded_runtime_diagnostic(&error)],
|
diagnostics: vec![embedded_runtime_diagnostic(&error)],
|
||||||
},
|
},
|
||||||
@@ -5420,9 +5436,12 @@ impl WorkspaceWorkerRuntime for RemoteWorkerRuntime {
|
|||||||
kind: request.kind,
|
kind: request.kind,
|
||||||
prefix: request.prefix,
|
prefix: request.prefix,
|
||||||
context: request.context,
|
context: request.context,
|
||||||
|
request_id: request.request_id,
|
||||||
};
|
};
|
||||||
let failure_kind = request.kind;
|
let failure_kind = request.kind;
|
||||||
let failure_prefix = request.prefix.clone();
|
let failure_prefix = request.prefix.clone();
|
||||||
|
let failure_context = request.context.clone();
|
||||||
|
let failure_request_id = request.request_id.clone();
|
||||||
let worker_id_owned = worker_id.to_string();
|
let worker_id_owned = worker_id.to_string();
|
||||||
match self.run_runtime_api(
|
match self.run_runtime_api(
|
||||||
self.request_timeout,
|
self.request_timeout,
|
||||||
@@ -5437,6 +5456,8 @@ impl WorkspaceWorkerRuntime for RemoteWorkerRuntime {
|
|||||||
worker: RuntimeWorkerRef::new(self.runtime_id.clone(), worker_id.to_string()),
|
worker: RuntimeWorkerRef::new(self.runtime_id.clone(), worker_id.to_string()),
|
||||||
kind: response.kind,
|
kind: response.kind,
|
||||||
prefix: response.prefix,
|
prefix: response.prefix,
|
||||||
|
context: response.context,
|
||||||
|
request_id: response.request_id,
|
||||||
entries: response.entries,
|
entries: response.entries,
|
||||||
diagnostics: Vec::new(),
|
diagnostics: Vec::new(),
|
||||||
},
|
},
|
||||||
@@ -5444,6 +5465,8 @@ impl WorkspaceWorkerRuntime for RemoteWorkerRuntime {
|
|||||||
worker: RuntimeWorkerRef::new(self.runtime_id.clone(), worker_id.to_string()),
|
worker: RuntimeWorkerRef::new(self.runtime_id.clone(), worker_id.to_string()),
|
||||||
kind: failure_kind,
|
kind: failure_kind,
|
||||||
prefix: failure_prefix,
|
prefix: failure_prefix,
|
||||||
|
context: failure_context,
|
||||||
|
request_id: failure_request_id,
|
||||||
entries: Vec::new(),
|
entries: Vec::new(),
|
||||||
diagnostics: vec![diagnostic],
|
diagnostics: vec![diagnostic],
|
||||||
},
|
},
|
||||||
@@ -6748,6 +6771,7 @@ mod tests {
|
|||||||
invocation: protocol::FeatureInvocationIdentity("builtin:test/prepare".into()),
|
invocation: protocol::FeatureInvocationIdentity("builtin:test/prepare".into()),
|
||||||
argument: Some("path".into()),
|
argument: Some("path".into()),
|
||||||
}),
|
}),
|
||||||
|
request_id: Some("completion-nonce".into()),
|
||||||
};
|
};
|
||||||
let wire: runtime_api::CompletionRequest =
|
let wire: runtime_api::CompletionRequest =
|
||||||
runtime_contract_convert(request.clone()).unwrap();
|
runtime_contract_convert(request.clone()).unwrap();
|
||||||
|
|||||||
@@ -6330,6 +6330,7 @@ fn worker_completions_request_from_api(
|
|||||||
kind: request.kind,
|
kind: request.kind,
|
||||||
prefix: request.prefix,
|
prefix: request.prefix,
|
||||||
context: request.context,
|
context: request.context,
|
||||||
|
request_id: request.request_id,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6427,6 +6428,8 @@ fn worker_completions_result_to_api(
|
|||||||
worker_id: result.worker.worker_id,
|
worker_id: result.worker.worker_id,
|
||||||
kind: result.kind,
|
kind: result.kind,
|
||||||
prefix: result.prefix,
|
prefix: result.prefix,
|
||||||
|
context: result.context,
|
||||||
|
request_id: result.request_id,
|
||||||
entries: result.entries,
|
entries: result.entries,
|
||||||
diagnostics: result.diagnostics.into_iter().map(Into::into).collect(),
|
diagnostics: result.diagnostics.into_iter().map(Into::into).collect(),
|
||||||
})
|
})
|
||||||
@@ -35577,6 +35580,33 @@ mod tests {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn feature_completion_api_conversions_preserve_nonce_and_context_for_aba_requests() {
|
||||||
|
for nonce in ["first", "second", "first"] {
|
||||||
|
let json = serde_json::json!({"kind":"feature_argument", "prefix":"資料/", "request_id":nonce,
|
||||||
|
"context":{"invocation":"builtin:test/prepare", "argument":"path"}});
|
||||||
|
let wire: server_api::RuntimeWorkerCompletionsRequest =
|
||||||
|
serde_json::from_value(json.clone()).unwrap();
|
||||||
|
let request = worker_completions_request_from_api(wire).unwrap();
|
||||||
|
assert_eq!(serde_json::to_value(&request).unwrap(), json);
|
||||||
|
let result = worker_completions_result_to_api(WorkerCompletionsResult {
|
||||||
|
worker: RuntimeWorkerRef::new("runtime", "worker"),
|
||||||
|
kind: request.kind,
|
||||||
|
prefix: request.prefix,
|
||||||
|
context: request.context,
|
||||||
|
request_id: request.request_id,
|
||||||
|
entries: Vec::new(),
|
||||||
|
diagnostics: Vec::new(),
|
||||||
|
})
|
||||||
|
.unwrap();
|
||||||
|
assert_eq!(result.request_id.as_deref(), Some(nonce));
|
||||||
|
assert_eq!(
|
||||||
|
serde_json::to_value(result.context).unwrap(),
|
||||||
|
json["context"]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn flow_or_generic_worker_state_change_is_not_ticket_completion_authority() {
|
fn flow_or_generic_worker_state_change_is_not_ticket_completion_authority() {
|
||||||
let change = || {
|
let change = || {
|
||||||
|
|||||||
+23
-1
@@ -7807,6 +7807,12 @@
|
|||||||
"prefix": {
|
"prefix": {
|
||||||
"default": "",
|
"default": "",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"request_id": {
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
@@ -7817,6 +7823,16 @@
|
|||||||
"RuntimeWorkerCompletionsResult": {
|
"RuntimeWorkerCompletionsResult": {
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"context": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/CompletionContext"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"diagnostics": {
|
"diagnostics": {
|
||||||
"default": [],
|
"default": [],
|
||||||
"items": {
|
"items": {
|
||||||
@@ -7836,6 +7852,12 @@
|
|||||||
"prefix": {
|
"prefix": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"request_id": {
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
"runtime_id": {
|
"runtime_id": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@@ -15264,7 +15286,7 @@
|
|||||||
"info": {
|
"info": {
|
||||||
"title": "Yoi Server API",
|
"title": "Yoi Server API",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"x-yoi-source-digest": "sha256:0dc47aa72f9cace6e0026fbf5d9385f51b6d79c8f6a70a04954067a35e01c887"
|
"x-yoi-source-digest": "sha256:eddff23c6405c11e8becfef09473d6833647bcaba9243abae189db7f840c1896"
|
||||||
},
|
},
|
||||||
"openapi": "3.1.0",
|
"openapi": "3.1.0",
|
||||||
"paths": {
|
"paths": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// @generated by yoi-companion-openapi-typescript@1. Do not edit.
|
// @generated by yoi-companion-openapi-typescript@1. Do not edit.
|
||||||
// Input: openapi/server-api.json
|
// Input: openapi/server-api.json
|
||||||
// Input contract: 0.1.0 (sha256:0dc47aa72f9cace6e0026fbf5d9385f51b6d79c8f6a70a04954067a35e01c887)
|
// Input contract: 0.1.0 (sha256:eddff23c6405c11e8becfef09473d6833647bcaba9243abae189db7f840c1896)
|
||||||
// Options: companion-operation-schema-closure,openapi-3.1,strict-integer-ranges,sorted-output
|
// Options: companion-operation-schema-closure,openapi-3.1,strict-integer-ranges,sorted-output
|
||||||
// Output: web/workspace/src/lib/generated/companion-api.ts
|
// Output: web/workspace/src/lib/generated/companion-api.ts
|
||||||
// Regenerate/check: cargo run -q -p server-api --example generate_companion_api_types -- --check
|
// Regenerate/check: cargo run -q -p server-api --example generate_companion_api_types -- --check
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// @generated by yoi-repository-openapi-typescript@1. Do not edit.
|
// @generated by yoi-repository-openapi-typescript@1. Do not edit.
|
||||||
// Input: openapi/server-api.json
|
// Input: openapi/server-api.json
|
||||||
// Input contract: 0.1.0 (sha256:0dc47aa72f9cace6e0026fbf5d9385f51b6d79c8f6a70a04954067a35e01c887)
|
// Input contract: 0.1.0 (sha256:eddff23c6405c11e8becfef09473d6833647bcaba9243abae189db7f840c1896)
|
||||||
// Options: repository-operation-schema-closure,openapi-3.1,format:uint64=safe-number,strict-safe-integers,sorted-output
|
// Options: repository-operation-schema-closure,openapi-3.1,format:uint64=safe-number,strict-safe-integers,sorted-output
|
||||||
// Output: web/workspace/src/lib/generated/repository-api.ts
|
// Output: web/workspace/src/lib/generated/repository-api.ts
|
||||||
// Regenerate/check: cargo run -q -p server-api --example generate_repository_openapi_types -- --check
|
// Regenerate/check: cargo run -q -p server-api --example generate_repository_openapi_types -- --check
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// @generated by yoi-runtime-openapi-typescript@1. Do not edit.
|
// @generated by yoi-runtime-openapi-typescript@1. Do not edit.
|
||||||
// Input: openapi/server-api.json
|
// Input: openapi/server-api.json
|
||||||
// Input contract: 0.1.0 (sha256:0dc47aa72f9cace6e0026fbf5d9385f51b6d79c8f6a70a04954067a35e01c887)
|
// Input contract: 0.1.0 (sha256:eddff23c6405c11e8becfef09473d6833647bcaba9243abae189db7f840c1896)
|
||||||
// Options: runtime-operation-schema-closure,openapi-3.1,strict-integer-ranges,sorted-output
|
// Options: runtime-operation-schema-closure,openapi-3.1,strict-integer-ranges,sorted-output
|
||||||
// Output: web/workspace/src/lib/generated/runtime-api.ts
|
// Output: web/workspace/src/lib/generated/runtime-api.ts
|
||||||
// Regenerate/check: cargo run -q -p server-api --example generate_runtime_api_types -- --check
|
// Regenerate/check: cargo run -q -p server-api --example generate_runtime_api_types -- --check
|
||||||
@@ -125,9 +125,9 @@ export type RuntimeVerificationEvidenceSummary = { binding_revision: number; las
|
|||||||
|
|
||||||
export type RuntimeVerificationOutcome = "verified" | "challenge_issued" | "verification_failed" | "connectivity_failed";
|
export type RuntimeVerificationOutcome = "verified" | "challenge_issued" | "verification_failed" | "connectivity_failed";
|
||||||
|
|
||||||
export type RuntimeWorkerCompletionsRequest = { context?: CompletionContext | null; kind: CompletionKind; prefix?: string; };
|
export type RuntimeWorkerCompletionsRequest = { context?: CompletionContext | null; kind: CompletionKind; prefix?: string; request_id?: string | null; };
|
||||||
|
|
||||||
export type RuntimeWorkerCompletionsResult = { diagnostics?: Array<Diagnostic>; entries: Array<CompletionEntry>; kind: CompletionKind; prefix: string; runtime_id: string; worker_id: string; };
|
export type RuntimeWorkerCompletionsResult = { context?: CompletionContext | null; diagnostics?: Array<Diagnostic>; entries: Array<CompletionEntry>; kind: CompletionKind; prefix: string; request_id?: string | null; runtime_id: string; worker_id: string; };
|
||||||
|
|
||||||
export type RuntimeWorkerInputRequest = { content: string; kind?: string | null; segments?: Array<Segment> | null; };
|
export type RuntimeWorkerInputRequest = { content: string; kind?: string | null; segments?: Array<Segment> | null; };
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// @generated by yoi-ticket-browser-openapi-typescript@1. Do not edit.
|
// @generated by yoi-ticket-browser-openapi-typescript@1. Do not edit.
|
||||||
// Input: openapi/server-api.json
|
// Input: openapi/server-api.json
|
||||||
// Input contract: 0.1.0 (sha256:0dc47aa72f9cace6e0026fbf5d9385f51b6d79c8f6a70a04954067a35e01c887)
|
// Input contract: 0.1.0 (sha256:eddff23c6405c11e8becfef09473d6833647bcaba9243abae189db7f840c1896)
|
||||||
// Options: ticket-objective-merge-request-browser-operation-schema-closure,openapi-3.1,strict-integer-ranges,sorted-output
|
// Options: ticket-objective-merge-request-browser-operation-schema-closure,openapi-3.1,strict-integer-ranges,sorted-output
|
||||||
// Output: web/workspace/src/lib/generated/ticket-api.ts
|
// Output: web/workspace/src/lib/generated/ticket-api.ts
|
||||||
// Regenerate/check: cargo run -q -p server-api --example generate_ticket_api_types -- --check
|
// Regenerate/check: cargo run -q -p server-api --example generate_ticket_api_types -- --check
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// @generated by yoi-worker-openapi-typescript@1. Do not edit.
|
// @generated by yoi-worker-openapi-typescript@1. Do not edit.
|
||||||
// Input: openapi/server-api.json
|
// Input: openapi/server-api.json
|
||||||
// Input contract: 0.1.0 (sha256:0dc47aa72f9cace6e0026fbf5d9385f51b6d79c8f6a70a04954067a35e01c887)
|
// Input contract: 0.1.0 (sha256:eddff23c6405c11e8becfef09473d6833647bcaba9243abae189db7f840c1896)
|
||||||
// Options: worker-operation-schema-closure,openapi-3.1,strict-integer-ranges,sorted-output
|
// Options: worker-operation-schema-closure,openapi-3.1,strict-integer-ranges,sorted-output
|
||||||
// Output: web/workspace/src/lib/generated/worker-launch-api.ts
|
// Output: web/workspace/src/lib/generated/worker-launch-api.ts
|
||||||
// Regenerate/check: cargo run -q -p server-api --example generate_worker_launch_api_types -- --check
|
// Regenerate/check: cargo run -q -p server-api --example generate_worker_launch_api_types -- --check
|
||||||
|
|||||||
Reference in New Issue
Block a user