feat(hololake): add enterprise responsibility entrance
This commit is contained in:
parent
3df6b1d3ca
commit
97b378b60c
12 changed files with 599 additions and 16 deletions
|
|
@ -1,4 +1,5 @@
|
|||
mod agent_executor;
|
||||
mod enterprise_entrance;
|
||||
mod model;
|
||||
mod persona_runtime;
|
||||
mod realtime_bridge;
|
||||
|
|
@ -456,6 +457,41 @@ fn reject_agent_proposal(
|
|||
Ok(proposal)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn enterprise_entrance_snapshot(
|
||||
app: AppHandle,
|
||||
) -> Result<enterprise_entrance::EnterpriseEntranceSnapshot, String> {
|
||||
enterprise_entrance::snapshot(&app)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn prepare_enterprise_device(
|
||||
app: AppHandle,
|
||||
) -> Result<enterprise_entrance::EnterpriseDeviceProof, String> {
|
||||
enterprise_entrance::prepare_device(&app)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn prepare_enterprise_binding(
|
||||
app: AppHandle,
|
||||
domain_id: String,
|
||||
responsible_human_id: String,
|
||||
persona_id: String,
|
||||
) -> Result<enterprise_entrance::EnterpriseBindingRequest, String> {
|
||||
enterprise_entrance::prepare_binding(&app, &domain_id, &responsible_human_id, &persona_id)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn sign_enterprise_challenge(
|
||||
app: AppHandle,
|
||||
request_id: String,
|
||||
challenge_id: String,
|
||||
nonce: String,
|
||||
expires_unix_ms: u128,
|
||||
) -> Result<enterprise_entrance::EnterpriseChallengeProof, String> {
|
||||
enterprise_entrance::sign_challenge(&app, &request_id, &challenge_id, &nonce, expires_unix_ms)
|
||||
}
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
tauri::Builder::default()
|
||||
|
|
@ -533,6 +569,10 @@ pub fn run() {
|
|||
compile_tcs_agent_proposal,
|
||||
approve_agent_proposal,
|
||||
reject_agent_proposal
|
||||
,enterprise_entrance_snapshot
|
||||
,prepare_enterprise_device
|
||||
,prepare_enterprise_binding
|
||||
,sign_enterprise_challenge
|
||||
])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("HoloLake runtime failed")
|
||||
|
|
|
|||
Loading…
Reference in a new issue