@keysync/cli 0.1.130 → 0.1.132

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # KeySync CLI
2
2
 
3
- KeySync CLI 0.1.130 synchronizes supported AI application configuration on macOS, Windows, and Linux.
3
+ KeySync CLI 0.1.132 synchronizes supported AI application configuration on macOS, Windows, and Linux.
4
4
 
5
5
  ## Requirements
6
6
 
@@ -84702,9 +84702,9 @@ var ccSwitchCoreProviderTemplatesV2 = [
84702
84702
  steps: [],
84703
84703
  sort_order: 5
84704
84704
  },
84705
- fields: [apiKeyField, defaultModelField("gpt-5.5")],
84705
+ fields: [apiKeyField, defaultModelField("gpt-5.6-luna")],
84706
84706
  defaults: {
84707
- default_model: "gpt-5.5",
84707
+ default_model: "gpt-5.6-luna",
84708
84708
  endpoints: [{ protocol: "openai_responses", base_url: "https://opendeep.top/v1" }],
84709
84709
  auth_mode: "keysync_managed_key",
84710
84710
  cc_switch_family: "keysync_default"
@@ -89245,7 +89245,8 @@ async function readDeviceStateFromDir(stateDir) {
89245
89245
  if (typeof parsed.device_id !== "string" || !parsed.device_id.trim()) return null;
89246
89246
  return {
89247
89247
  device_id: parsed.device_id,
89248
- ...typeof parsed.user_id === "string" && parsed.user_id.trim() ? { user_id: parsed.user_id } : {}
89248
+ ...typeof parsed.user_id === "string" && parsed.user_id.trim() ? { user_id: parsed.user_id } : {},
89249
+ ...typeof parsed.claim_ticket === "string" && parsed.claim_ticket.trim() ? { claim_ticket: parsed.claim_ticket } : {}
89249
89250
  };
89250
89251
  } catch {
89251
89252
  return null;
@@ -93590,7 +93591,7 @@ async function syncAndApply(session, deviceId, stateDir = defaultStateDir(), opt
93590
93591
  // apps/cli/package.json
93591
93592
  var package_default = {
93592
93593
  name: "@keysync/cli",
93593
- version: "0.1.130",
93594
+ version: "0.1.132",
93594
93595
  license: "MIT",
93595
93596
  private: true,
93596
93597
  type: "module",
@@ -94837,22 +94838,25 @@ async function ensureDaemonDeviceId(session, stateDir) {
94837
94838
  const current = await withSessionRefresh(session, async (activeSession) => {
94838
94839
  const activeClient = clientFromSession(activeSession);
94839
94840
  const current2 = await activeClient.get(`/devices/${device.device_id}`);
94840
- if (!current2.install_id_hash) {
94841
- return activeClient.post("/devices/register", {
94842
- name: registration.name,
94843
- platform: registration.platform,
94844
- hostname: registration.hostname,
94845
- client_version: version,
94846
- install_id_hash,
94847
- existing_device_id: device.device_id
94848
- });
94849
- }
94850
- if (current2.install_id_hash !== install_id_hash) {
94841
+ if (current2.install_id_hash && current2.install_id_hash !== install_id_hash) {
94851
94842
  throw new Error("Local device is linked to a different install identity.");
94852
94843
  }
94853
- return current2;
94844
+ const payload = current2.install_id_hash ? {
94845
+ name: current2.name,
94846
+ hostname: current2.hostname ?? null
94847
+ } : {
94848
+ name: registration.name,
94849
+ hostname: registration.hostname
94850
+ };
94851
+ return activeClient.post("/devices/register", {
94852
+ ...payload,
94853
+ platform: registration.platform,
94854
+ client_version: version,
94855
+ install_id_hash,
94856
+ ...current2.install_id_hash ? {} : { existing_device_id: device.device_id }
94857
+ });
94854
94858
  }, stateDir);
94855
- await writeDeviceState({ device_id: current.id, user_id: session.user_id }, stateDir);
94859
+ await writeDeviceState({ device_id: current.id, user_id: session.user_id, ...current.claim_ticket ? { claim_ticket: current.claim_ticket } : {} }, stateDir);
94856
94860
  return current.id;
94857
94861
  } catch (error) {
94858
94862
  if (!(error instanceof ApiError) || error.status !== 404 && error.status !== 410) throw error;
@@ -94870,7 +94874,7 @@ async function ensureDaemonDeviceId(session, stateDir) {
94870
94874
  }),
94871
94875
  stateDir
94872
94876
  );
94873
- await writeDeviceState({ device_id: result.id, user_id: session.user_id }, stateDir);
94877
+ await writeDeviceState({ device_id: result.id, user_id: session.user_id, ...result.claim_ticket ? { claim_ticket: result.claim_ticket } : {} }, stateDir);
94874
94878
  return result.id;
94875
94879
  }
94876
94880
  function parseDaemonLock(raw) {
@@ -95396,7 +95400,7 @@ async function main() {
95396
95400
  install_id_hash,
95397
95401
  existing_device_id: existingDeviceId
95398
95402
  });
95399
- await writeDeviceState({ device_id: result2.id, user_id: session.user_id }, stateDir);
95403
+ await writeDeviceState({ device_id: result2.id, user_id: session.user_id, ...result2.claim_ticket ? { claim_ticket: result2.claim_ticket } : {} }, stateDir);
95400
95404
  console.log(`Device bound: ${result2.id}`);
95401
95405
  return;
95402
95406
  }
@@ -95409,7 +95413,7 @@ async function main() {
95409
95413
  client_version: version,
95410
95414
  install_id_hash
95411
95415
  });
95412
- await writeDeviceState({ device_id: result.id, user_id: session.user_id }, stateDir);
95416
+ await writeDeviceState({ device_id: result.id, user_id: session.user_id, ...result.claim_ticket ? { claim_ticket: result.claim_ticket } : {} }, stateDir);
95413
95417
  console.log(`Device bound: ${result.id}`);
95414
95418
  return;
95415
95419
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keysync/cli",
3
- "version": "0.1.130",
3
+ "version": "0.1.132",
4
4
  "description": "KeySync cross-platform CLI and daemon",
5
5
  "license": "MIT",
6
6
  "type": "module",