@cat-factory/app 0.224.1 → 0.225.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.
@@ -38,12 +38,20 @@ const auth = useAuthStore()
38
38
  const store = usePublicApiKeysStore()
39
39
 
40
40
  /**
41
- * The minter to attribute a key to. `null` when the key predates the audit column (or was
42
- * minted with no session), so the row simply omits the segment. When the minter is the
43
- * signed-in user we show a localized "you"; otherwise the raw `usr_*` id (the list has no
44
- * user-name lookup — the audit id is the honest, non-misleading thing to show).
41
+ * The minter to attribute a key to. When the minter is the signed-in user we show a localized
42
+ * "you"; for another person, the raw `usr_*` id (the list has no user-name lookup, so the audit id
43
+ * is the honest, non-misleading thing to show).
44
+ *
45
+ * A key PROVISIONED HEADLESSLY (`POST /api/v1/keys`) has no user and names the KEY that minted
46
+ * it instead. Reading `createdByKeyId` here is not a nicety: a headless mint stores a null user,
47
+ * so without this branch it would render exactly like a key that predates the audit column, and
48
+ * "nobody knows who made this" would be shown for the one case the platform knows precisely.
49
+ * `null` stays reserved for genuinely unattributed keys, where the row omits the segment.
45
50
  */
46
51
  function minterLabel(key: PublicApiKey): string | null {
52
+ if (key.createdByKeyId) {
53
+ return t('settings.apiTokens.list.createdByKey', { id: key.createdByKeyId })
54
+ }
47
55
  if (!key.createdByUserId) return null
48
56
  return key.createdByUserId === auth.user?.id
49
57
  ? t('settings.apiTokens.list.createdByYou')
@@ -12,6 +12,7 @@ function key(over: Partial<PublicApiKey> = {}): PublicApiKey {
12
12
  label: 'CI',
13
13
  scope: 'write',
14
14
  createdByUserId: null,
15
+ createdByKeyId: null,
15
16
  createdAt: 1,
16
17
  lastUsedAt: null,
17
18
  revokedAt: null,
@@ -699,6 +699,7 @@
699
699
  "neverUsed": "nie verwendet",
700
700
  "createdBy": "erstellt von {user}",
701
701
  "createdByYou": "Ihnen",
702
+ "createdByKey": "API-Schlüssel {id}",
702
703
  "revoke": "Token widerrufen"
703
704
  },
704
705
  "add": {
@@ -3190,6 +3190,7 @@
3190
3190
  "neverUsed": "never used",
3191
3191
  "createdBy": "created by {user}",
3192
3192
  "createdByYou": "you",
3193
+ "createdByKey": "API key {id}",
3193
3194
  "revoke": "Revoke token"
3194
3195
  },
3195
3196
  "add": {
@@ -2942,6 +2942,7 @@
2942
2942
  "neverUsed": "nunca usado",
2943
2943
  "createdBy": "creado por {user}",
2944
2944
  "createdByYou": "ti",
2945
+ "createdByKey": "la clave de API {id}",
2945
2946
  "revoke": "Revocar token"
2946
2947
  },
2947
2948
  "add": {
@@ -2942,6 +2942,7 @@
2942
2942
  "neverUsed": "jamais utilisé",
2943
2943
  "createdBy": "créé par {user}",
2944
2944
  "createdByYou": "vous",
2945
+ "createdByKey": "la clé d’API {id}",
2945
2946
  "revoke": "Révoquer le jeton"
2946
2947
  },
2947
2948
  "add": {
@@ -3083,6 +3083,7 @@
3083
3083
  "neverUsed": "מעולם לא היה בשימוש",
3084
3084
  "createdBy": "נוצר על ידי {user}",
3085
3085
  "createdByYou": "אתה",
3086
+ "createdByKey": "מפתח API {id}",
3086
3087
  "revoke": "בטל אסימון"
3087
3088
  },
3088
3089
  "add": {
@@ -699,6 +699,7 @@
699
699
  "neverUsed": "mai utilizzato",
700
700
  "createdBy": "creato da {user}",
701
701
  "createdByYou": "te",
702
+ "createdByKey": "la chiave API {id}",
702
703
  "revoke": "Revoca token"
703
704
  },
704
705
  "add": {
@@ -3083,6 +3083,7 @@
3083
3083
  "neverUsed": "未使用",
3084
3084
  "createdBy": "作成者: {user}",
3085
3085
  "createdByYou": "あなた",
3086
+ "createdByKey": "APIキー {id}",
3086
3087
  "revoke": "トークンを取り消す"
3087
3088
  },
3088
3089
  "add": {
@@ -2942,6 +2942,7 @@
2942
2942
  "neverUsed": "nigdy nie użyto",
2943
2943
  "createdBy": "utworzone przez {user}",
2944
2944
  "createdByYou": "Ciebie",
2945
+ "createdByKey": "klucz API {id}",
2945
2946
  "revoke": "Unieważnij token"
2946
2947
  },
2947
2948
  "add": {
@@ -3083,6 +3083,7 @@
3083
3083
  "neverUsed": "hiç kullanılmadı",
3084
3084
  "createdBy": "oluşturan: {user}",
3085
3085
  "createdByYou": "siz",
3086
+ "createdByKey": "{id} API anahtarı",
3086
3087
  "revoke": "Belirteci iptal et"
3087
3088
  },
3088
3089
  "add": {
@@ -2942,6 +2942,7 @@
2942
2942
  "neverUsed": "ніколи не використовувався",
2943
2943
  "createdBy": "створено {user}",
2944
2944
  "createdByYou": "вами",
2945
+ "createdByKey": "ключ API {id}",
2945
2946
  "revoke": "Відкликати токен"
2946
2947
  },
2947
2948
  "add": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cat-factory/app",
3
- "version": "0.224.1",
3
+ "version": "0.225.0",
4
4
  "description": "Reusable Nuxt layer for the Agent Architecture Board SPA (components, stores, composables, pages). Consume it from a thin deployment app via `extends: ['@cat-factory/app']` and point it at your backend with NUXT_PUBLIC_API_BASE. See deploy/frontend for an example.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -40,7 +40,7 @@
40
40
  "valibot": "^1.4.2",
41
41
  "vue": "3.5.40",
42
42
  "wretch": "^3.0.9",
43
- "@cat-factory/contracts": "0.241.0"
43
+ "@cat-factory/contracts": "0.242.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@toad-contracts/testing": "0.3.2",