@oh-my-pi/pi-catalog 18.4.0 → 18.4.2

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/src/wire/devin.ts CHANGED
@@ -22,9 +22,9 @@ const DEVIN_LOCALE = "en";
22
22
  const DEVIN_CLI_METADATA = {
23
23
  ideName: "devin-cli",
24
24
  ideType: "chisel",
25
- ideVersion: "3000.6.2",
25
+ ideVersion: "3000.11.3",
26
26
  extensionName: "chisel",
27
- extensionVersion: "3000.6.2",
27
+ extensionVersion: "3000.11.3",
28
28
  locale: DEVIN_LOCALE,
29
29
  os: DEVIN_OS,
30
30
  } as const;
@@ -50,19 +50,23 @@ export function normalizeDevinSessionToken(apiKey: string | undefined): string {
50
50
  return apiKey.startsWith(DEVIN_SESSION_TOKEN_PREFIX) ? apiKey : `${DEVIN_SESSION_TOKEN_PREFIX}${apiKey}`;
51
51
  }
52
52
 
53
- /**
54
- * Fields for `Metadata` on released-CLI calls (`GetUserJwt`, `AssignModel`,
55
- * `GetChatMessage`, `GetUserStatus`). `userJwt` stays empty for the calls the
56
- * CLI makes with the session token alone (auth, model assignment, usage).
57
- */
58
- export function devinCliMetadata(apiKey: string | undefined, userJwt = "") {
53
+ /** Released-CLI metadata with credential bytes already encoded for the wire. */
54
+ export function devinWireMetadata(apiKey: string | undefined, userJwt = "") {
59
55
  return {
60
- apiKey: normalizeDevinSessionToken(apiKey),
56
+ apiKey: apiKey ?? "",
61
57
  userJwt,
62
58
  ...DEVIN_CLI_METADATA,
63
59
  };
64
60
  }
65
61
 
62
+ /**
63
+ * Fields for `Metadata` on released-CLI calls (`GetUserJwt`, `AssignModel`,
64
+ * `GetChatMessage`, `GetUserStatus`) authenticated by a Devin session token.
65
+ */
66
+ export function devinCliMetadata(apiKey: string | undefined, userJwt = "") {
67
+ return devinWireMetadata(normalizeDevinSessionToken(apiKey), userJwt);
68
+ }
69
+
66
70
  /** Fields for `Metadata` on the dev-channel `GetCliModelConfigs` call. */
67
71
  export function devinDiscoveryMetadata(apiKey: string | undefined) {
68
72
  return {