@agent-native/dispatch 0.42.7-nightly-20261113032548 → 0.42.7

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.
Files changed (45) hide show
  1. package/CHANGELOG.md +5 -12
  2. package/README.md +20 -18
  3. package/dist/actions/create-vault-grant.d.ts +2 -1
  4. package/dist/actions/create-vault-secret.d.ts +1 -1
  5. package/dist/actions/create-vault-secret.js +2 -2
  6. package/dist/actions/create-vault-secret.js.map +1 -1
  7. package/dist/actions/grant-vault-secrets-to-app.d.ts +1 -0
  8. package/dist/actions/list-vault-grants.d.ts +1 -0
  9. package/dist/actions/list-vault-secret-options.js +1 -1
  10. package/dist/actions/list-vault-secret-options.js.map +1 -1
  11. package/dist/actions/list-vault-secrets.js +3 -5
  12. package/dist/actions/list-vault-secrets.js.map +1 -1
  13. package/dist/actions/revoke-vault-grant.d.ts +2 -1
  14. package/dist/actions/update-vault-secret.d.ts +1 -1
  15. package/dist/actions/update-vault-secret.js +2 -2
  16. package/dist/actions/update-vault-secret.js.map +1 -1
  17. package/dist/db/migrations.d.ts.map +1 -1
  18. package/dist/db/migrations.js +19 -0
  19. package/dist/db/migrations.js.map +1 -1
  20. package/dist/db/schema.d.ts +8 -185
  21. package/dist/db/schema.d.ts.map +1 -1
  22. package/dist/db/schema.js +3 -13
  23. package/dist/db/schema.js.map +1 -1
  24. package/dist/routes/pages/vault.d.ts.map +1 -1
  25. package/dist/routes/pages/vault.js +1 -1
  26. package/dist/routes/pages/vault.js.map +1 -1
  27. package/dist/server/lib/vault-store.d.ts +67 -93
  28. package/dist/server/lib/vault-store.d.ts.map +1 -1
  29. package/dist/server/lib/vault-store.js +227 -280
  30. package/dist/server/lib/vault-store.js.map +1 -1
  31. package/dist/server/plugins/db.d.ts.map +1 -1
  32. package/dist/server/plugins/db.js +2 -0
  33. package/dist/server/plugins/db.js.map +1 -1
  34. package/package.json +4 -4
  35. package/src/actions/create-vault-secret.ts +2 -5
  36. package/src/actions/list-vault-secret-options.ts +1 -1
  37. package/src/actions/list-vault-secrets.ts +3 -8
  38. package/src/actions/update-vault-secret.ts +2 -6
  39. package/src/db/migrations.spec.ts +117 -1
  40. package/src/db/migrations.ts +19 -0
  41. package/src/db/schema.ts +3 -14
  42. package/src/routes/pages/vault.tsx +0 -4
  43. package/src/server/lib/vault-store.spec.ts +1188 -475
  44. package/src/server/lib/vault-store.ts +343 -405
  45. package/src/server/plugins/db.ts +2 -0
@@ -1680,13 +1680,13 @@ export declare const dispatchDreamProposals: import("node_modules/drizzle-orm/pg
1680
1680
  };
1681
1681
  dialect: 'pg';
1682
1682
  }>;
1683
- export declare const vaultSecrets: import("node_modules/drizzle-orm/pg-core").PgTableWithColumns<{
1684
- name: "vault_secrets";
1683
+ export declare const vaultGrants: import("node_modules/drizzle-orm/pg-core").PgTableWithColumns<{
1684
+ name: "vault_grants";
1685
1685
  schema: undefined;
1686
1686
  columns: {
1687
1687
  id: import("node_modules/drizzle-orm/pg-core").PgColumn<{
1688
1688
  name: "id";
1689
- tableName: "vault_secrets";
1689
+ tableName: "vault_grants";
1690
1690
  dataType: "string";
1691
1691
  columnType: "PgText";
1692
1692
  data: string;
@@ -1703,7 +1703,7 @@ export declare const vaultSecrets: import("node_modules/drizzle-orm/pg-core").Pg
1703
1703
  }, {}, {}>;
1704
1704
  ownerEmail: import("node_modules/drizzle-orm/pg-core").PgColumn<{
1705
1705
  name: "owner_email";
1706
- tableName: "vault_secrets";
1706
+ tableName: "vault_grants";
1707
1707
  dataType: "string";
1708
1708
  columnType: "PgText";
1709
1709
  data: string;
@@ -1720,7 +1720,7 @@ export declare const vaultSecrets: import("node_modules/drizzle-orm/pg-core").Pg
1720
1720
  }, {}, {}>;
1721
1721
  orgId: import("node_modules/drizzle-orm/pg-core").PgColumn<{
1722
1722
  name: "org_id";
1723
- tableName: "vault_secrets";
1723
+ tableName: "vault_grants";
1724
1724
  dataType: "string";
1725
1725
  columnType: "PgText";
1726
1726
  data: string;
@@ -1735,9 +1735,9 @@ export declare const vaultSecrets: import("node_modules/drizzle-orm/pg-core").Pg
1735
1735
  identity: undefined;
1736
1736
  generated: undefined;
1737
1737
  }, {}, {}>;
1738
- name: import("node_modules/drizzle-orm/pg-core").PgColumn<{
1739
- name: "name";
1740
- tableName: "vault_secrets";
1738
+ secretId: import("node_modules/drizzle-orm/pg-core").PgColumn<{
1739
+ name: "secret_id";
1740
+ tableName: "vault_grants";
1741
1741
  dataType: "string";
1742
1742
  columnType: "PgText";
1743
1743
  data: string;
@@ -1754,166 +1754,6 @@ export declare const vaultSecrets: import("node_modules/drizzle-orm/pg-core").Pg
1754
1754
  }, {}, {}>;
1755
1755
  credentialKey: import("node_modules/drizzle-orm/pg-core").PgColumn<{
1756
1756
  name: "credential_key";
1757
- tableName: "vault_secrets";
1758
- dataType: "string";
1759
- columnType: "PgText";
1760
- data: string;
1761
- driverParam: string;
1762
- notNull: true;
1763
- hasDefault: false;
1764
- isPrimaryKey: false;
1765
- isAutoincrement: false;
1766
- hasRuntimeDefault: false;
1767
- enumValues: [string, ...string[]];
1768
- baseColumn: never;
1769
- identity: undefined;
1770
- generated: undefined;
1771
- }, {}, {}>;
1772
- value: import("node_modules/drizzle-orm/pg-core").PgColumn<{
1773
- name: "value";
1774
- tableName: "vault_secrets";
1775
- dataType: "string";
1776
- columnType: "PgText";
1777
- data: string;
1778
- driverParam: string;
1779
- notNull: true;
1780
- hasDefault: false;
1781
- isPrimaryKey: false;
1782
- isAutoincrement: false;
1783
- hasRuntimeDefault: false;
1784
- enumValues: [string, ...string[]];
1785
- baseColumn: never;
1786
- identity: undefined;
1787
- generated: undefined;
1788
- }, {}, {}>;
1789
- provider: import("node_modules/drizzle-orm/pg-core").PgColumn<{
1790
- name: "provider";
1791
- tableName: "vault_secrets";
1792
- dataType: "string";
1793
- columnType: "PgText";
1794
- data: string;
1795
- driverParam: string;
1796
- notNull: false;
1797
- hasDefault: false;
1798
- isPrimaryKey: false;
1799
- isAutoincrement: false;
1800
- hasRuntimeDefault: false;
1801
- enumValues: [string, ...string[]];
1802
- baseColumn: never;
1803
- identity: undefined;
1804
- generated: undefined;
1805
- }, {}, {}>;
1806
- description: import("node_modules/drizzle-orm/pg-core").PgColumn<{
1807
- name: "description";
1808
- tableName: "vault_secrets";
1809
- dataType: "string";
1810
- columnType: "PgText";
1811
- data: string;
1812
- driverParam: string;
1813
- notNull: false;
1814
- hasDefault: false;
1815
- isPrimaryKey: false;
1816
- isAutoincrement: false;
1817
- hasRuntimeDefault: false;
1818
- enumValues: [string, ...string[]];
1819
- baseColumn: never;
1820
- identity: undefined;
1821
- generated: undefined;
1822
- }, {}, {}>;
1823
- createdBy: import("node_modules/drizzle-orm/pg-core").PgColumn<{
1824
- name: "created_by";
1825
- tableName: "vault_secrets";
1826
- dataType: "string";
1827
- columnType: "PgText";
1828
- data: string;
1829
- driverParam: string;
1830
- notNull: true;
1831
- hasDefault: false;
1832
- isPrimaryKey: false;
1833
- isAutoincrement: false;
1834
- hasRuntimeDefault: false;
1835
- enumValues: [string, ...string[]];
1836
- baseColumn: never;
1837
- identity: undefined;
1838
- generated: undefined;
1839
- }, {}, {}>;
1840
- createdAt: import("node_modules/drizzle-orm/pg-core").PgColumn<{
1841
- name: "created_at";
1842
- tableName: "vault_secrets";
1843
- dataType: "number";
1844
- columnType: "PgBigInt53";
1845
- data: number;
1846
- driverParam: string | number;
1847
- notNull: true;
1848
- hasDefault: false;
1849
- isPrimaryKey: false;
1850
- isAutoincrement: false;
1851
- hasRuntimeDefault: false;
1852
- enumValues: undefined;
1853
- baseColumn: never;
1854
- identity: undefined;
1855
- generated: undefined;
1856
- }, {}, {}>;
1857
- updatedAt: import("node_modules/drizzle-orm/pg-core").PgColumn<{
1858
- name: "updated_at";
1859
- tableName: "vault_secrets";
1860
- dataType: "number";
1861
- columnType: "PgBigInt53";
1862
- data: number;
1863
- driverParam: string | number;
1864
- notNull: true;
1865
- hasDefault: false;
1866
- isPrimaryKey: false;
1867
- isAutoincrement: false;
1868
- hasRuntimeDefault: false;
1869
- enumValues: undefined;
1870
- baseColumn: never;
1871
- identity: undefined;
1872
- generated: undefined;
1873
- }, {}, {}>;
1874
- };
1875
- dialect: 'pg';
1876
- }>;
1877
- export declare const vaultGrants: import("node_modules/drizzle-orm/pg-core").PgTableWithColumns<{
1878
- name: "vault_grants";
1879
- schema: undefined;
1880
- columns: {
1881
- id: import("node_modules/drizzle-orm/pg-core").PgColumn<{
1882
- name: "id";
1883
- tableName: "vault_grants";
1884
- dataType: "string";
1885
- columnType: "PgText";
1886
- data: string;
1887
- driverParam: string;
1888
- notNull: true;
1889
- hasDefault: false;
1890
- isPrimaryKey: true;
1891
- isAutoincrement: false;
1892
- hasRuntimeDefault: false;
1893
- enumValues: [string, ...string[]];
1894
- baseColumn: never;
1895
- identity: undefined;
1896
- generated: undefined;
1897
- }, {}, {}>;
1898
- ownerEmail: import("node_modules/drizzle-orm/pg-core").PgColumn<{
1899
- name: "owner_email";
1900
- tableName: "vault_grants";
1901
- dataType: "string";
1902
- columnType: "PgText";
1903
- data: string;
1904
- driverParam: string;
1905
- notNull: true;
1906
- hasDefault: false;
1907
- isPrimaryKey: false;
1908
- isAutoincrement: false;
1909
- hasRuntimeDefault: false;
1910
- enumValues: [string, ...string[]];
1911
- baseColumn: never;
1912
- identity: undefined;
1913
- generated: undefined;
1914
- }, {}, {}>;
1915
- orgId: import("node_modules/drizzle-orm/pg-core").PgColumn<{
1916
- name: "org_id";
1917
1757
  tableName: "vault_grants";
1918
1758
  dataType: "string";
1919
1759
  columnType: "PgText";
@@ -1929,23 +1769,6 @@ export declare const vaultGrants: import("node_modules/drizzle-orm/pg-core").PgT
1929
1769
  identity: undefined;
1930
1770
  generated: undefined;
1931
1771
  }, {}, {}>;
1932
- secretId: import("node_modules/drizzle-orm/pg-core").PgColumn<{
1933
- name: "secret_id";
1934
- tableName: "vault_grants";
1935
- dataType: "string";
1936
- columnType: "PgText";
1937
- data: string;
1938
- driverParam: string;
1939
- notNull: true;
1940
- hasDefault: false;
1941
- isPrimaryKey: false;
1942
- isAutoincrement: false;
1943
- hasRuntimeDefault: false;
1944
- enumValues: [string, ...string[]];
1945
- baseColumn: never;
1946
- identity: undefined;
1947
- generated: undefined;
1948
- }, {}, {}>;
1949
1772
  appId: import("node_modules/drizzle-orm/pg-core").PgColumn<{
1950
1773
  name: "app_id";
1951
1774
  tableName: "vault_grants";
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/db/schema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE3E,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY/B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUhC,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAa7B,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWxB,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAa7B,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUlC,CAAC"}
package/dist/db/schema.js CHANGED
@@ -110,24 +110,14 @@ export const dispatchDreamProposals = table("dispatch_dream_proposals", {
110
110
  createdAt: bigint("created_at", { mode: "number" }).notNull(),
111
111
  updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
112
112
  });
113
- export const vaultSecrets = table("vault_secrets", {
114
- id: text("id").primaryKey(),
115
- ownerEmail: text("owner_email").notNull(),
116
- orgId: text("org_id"),
117
- name: text("name").notNull(),
118
- credentialKey: text("credential_key").notNull(),
119
- value: text("value").notNull(),
120
- provider: text("provider"),
121
- description: text("description"),
122
- createdBy: text("created_by").notNull(),
123
- createdAt: bigint("created_at", { mode: "number" }).notNull(),
124
- updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
125
- });
126
113
  export const vaultGrants = table("vault_grants", {
127
114
  id: text("id").primaryKey(),
128
115
  ownerEmail: text("owner_email").notNull(),
129
116
  orgId: text("org_id"),
117
+ // The `app_secrets` row id. Core checks a grant by `credentialKey` alone;
118
+ // rows written before that column existed have none and match nothing.
130
119
  secretId: text("secret_id").notNull(),
120
+ credentialKey: text("credential_key"),
131
121
  appId: text("app_id").notNull(),
132
122
  grantedBy: text("granted_by").notNull(),
133
123
  status: text("status").notNull(),
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/db/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAE5E,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE3E,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC,uBAAuB,EAAE;IACjE,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE;IAC3B,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,EAAE;IACzC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;IACrB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE;IAC5B,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,EAAE;IACpC,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,EAAE;IAC1C,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC;IAC7B,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC;IACpB,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE;IACvC,SAAS,EAAE,MAAM,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;IAC7D,SAAS,EAAE,MAAM,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;CAC9D,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,CAAC,yBAAyB,EAAE;IACpE,EAAE,EAAE,IAAI,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CAAC,UAAU,EAAE;IAC3B,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,EAAE;IACzC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;IACrB,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,EAAE;IACzC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE;IAC/B,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE,EAAE,uBAAuB;IACzD,QAAQ,EAAE,MAAM,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,wCAAwC;IAC3F,SAAS,EAAE,MAAM,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;IAC7D,SAAS,EAAE,MAAM,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;CAC9D,CAAC,CAAC","sourcesContent":["import { bigint, table, text, integer } from \"@agent-native/core/db/schema\";\n\nexport { workspaceApps, workspaceAppShares } from \"@agent-native/core/org\";\n\nexport const dispatchDestinations = table(\"dispatch_destinations\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n name: text(\"name\").notNull(),\n platform: text(\"platform\").notNull(),\n destination: text(\"destination\").notNull(),\n threadRef: text(\"thread_ref\"),\n notes: text(\"notes\"),\n createdBy: text(\"created_by\").notNull(),\n createdAt: bigint(\"created_at\", { mode: \"number\" }).notNull(),\n updatedAt: bigint(\"updated_at\", { mode: \"number\" }).notNull(),\n});\n\nexport const dispatchIdentityLinks = table(\"dispatch_identity_links\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n platform: text(\"platform\").notNull(),\n externalUserId: text(\"external_user_id\").notNull(),\n externalUserName: text(\"external_user_name\"),\n linkedBy: text(\"linked_by\").notNull(),\n createdAt: bigint(\"created_at\", { mode: \"number\" }).notNull(),\n updatedAt: bigint(\"updated_at\", { mode: \"number\" }).notNull(),\n});\n\nexport const dispatchLinkTokens = table(\"dispatch_link_tokens\", {\n id: text(\"id\").primaryKey(),\n token: text(\"token\").notNull(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n platform: text(\"platform\").notNull(),\n createdBy: text(\"created_by\").notNull(),\n expiresAt: bigint(\"expires_at\", { mode: \"number\" }).notNull(),\n claimedAt: bigint(\"claimed_at\", { mode: \"number\" }),\n claimedByExternalUserId: text(\"claimed_by_external_user_id\"),\n claimedByExternalUserName: text(\"claimed_by_external_user_name\"),\n createdAt: bigint(\"created_at\", { mode: \"number\" }).notNull(),\n updatedAt: bigint(\"updated_at\", { mode: \"number\" }).notNull(),\n});\n\nexport const dispatchApprovalRequests = table(\"dispatch_approval_requests\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n changeType: text(\"change_type\").notNull(),\n targetType: text(\"target_type\").notNull(),\n targetId: text(\"target_id\"),\n status: text(\"status\").notNull(),\n summary: text(\"summary\").notNull(),\n payload: text(\"payload\").notNull(),\n beforeValue: text(\"before_value\"),\n afterValue: text(\"after_value\"),\n requestedBy: text(\"requested_by\").notNull(),\n reviewedBy: text(\"reviewed_by\"),\n reviewedAt: bigint(\"reviewed_at\", { mode: \"number\" }),\n createdAt: bigint(\"created_at\", { mode: \"number\" }).notNull(),\n updatedAt: bigint(\"updated_at\", { mode: \"number\" }).notNull(),\n});\n\nexport const dispatchAuditEvents = table(\"dispatch_audit_events\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n actor: text(\"actor\").notNull(),\n action: text(\"action\").notNull(),\n targetType: text(\"target_type\").notNull(),\n targetId: text(\"target_id\"),\n summary: text(\"summary\").notNull(),\n metadata: text(\"metadata\"),\n createdAt: bigint(\"created_at\", { mode: \"number\" }).notNull(),\n});\n\nexport const dispatchDreams = table(\"dispatch_dreams\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n sourceId: text(\"source_id\").notNull(),\n title: text(\"title\").notNull(),\n status: text(\"status\").notNull(),\n query: text(\"query\"),\n report: text(\"report\"),\n summary: text(\"summary\"),\n sourceHealth: text(\"source_health\"),\n candidateCount: integer(\"candidate_count\").notNull(),\n inspectedThreadCount: integer(\"inspected_thread_count\").notNull(),\n createdBy: text(\"created_by\").notNull(),\n error: text(\"error\"),\n startedAt: bigint(\"started_at\", { mode: \"number\" }).notNull(),\n completedAt: bigint(\"completed_at\", { mode: \"number\" }),\n createdAt: bigint(\"created_at\", { mode: \"number\" }).notNull(),\n updatedAt: bigint(\"updated_at\", { mode: \"number\" }).notNull(),\n});\n\nexport const dispatchDreamProposals = table(\"dispatch_dream_proposals\", {\n id: text(\"id\").primaryKey(),\n dreamId: text(\"dream_id\").notNull(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n targetType: text(\"target_type\").notNull(),\n targetPath: text(\"target_path\").notNull(),\n title: text(\"title\").notNull(),\n summary: text(\"summary\").notNull(),\n rationale: text(\"rationale\").notNull(),\n content: text(\"content\").notNull(),\n evidence: text(\"evidence\").notNull(),\n confidence: integer(\"confidence\").notNull(),\n risk: text(\"risk\").notNull(),\n status: text(\"status\").notNull(),\n appliedBy: text(\"applied_by\"),\n appliedAt: bigint(\"applied_at\", { mode: \"number\" }),\n rejectedBy: text(\"rejected_by\"),\n rejectedAt: bigint(\"rejected_at\", { mode: \"number\" }),\n createdAt: bigint(\"created_at\", { mode: \"number\" }).notNull(),\n updatedAt: bigint(\"updated_at\", { mode: \"number\" }).notNull(),\n});\n\nexport const vaultSecrets = table(\"vault_secrets\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n name: text(\"name\").notNull(),\n credentialKey: text(\"credential_key\").notNull(),\n value: text(\"value\").notNull(),\n provider: text(\"provider\"),\n description: text(\"description\"),\n createdBy: text(\"created_by\").notNull(),\n createdAt: bigint(\"created_at\", { mode: \"number\" }).notNull(),\n updatedAt: bigint(\"updated_at\", { mode: \"number\" }).notNull(),\n});\n\nexport const vaultGrants = table(\"vault_grants\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n secretId: text(\"secret_id\").notNull(),\n appId: text(\"app_id\").notNull(),\n grantedBy: text(\"granted_by\").notNull(),\n status: text(\"status\").notNull(),\n syncedAt: bigint(\"synced_at\", { mode: \"number\" }),\n createdAt: bigint(\"created_at\", { mode: \"number\" }).notNull(),\n updatedAt: bigint(\"updated_at\", { mode: \"number\" }).notNull(),\n});\n\nexport const vaultRequests = table(\"vault_requests\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n credentialKey: text(\"credential_key\").notNull(),\n appId: text(\"app_id\").notNull(),\n reason: text(\"reason\"),\n requestedBy: text(\"requested_by\").notNull(),\n status: text(\"status\").notNull(),\n reviewedBy: text(\"reviewed_by\"),\n reviewedAt: bigint(\"reviewed_at\", { mode: \"number\" }),\n createdAt: bigint(\"created_at\", { mode: \"number\" }).notNull(),\n updatedAt: bigint(\"updated_at\", { mode: \"number\" }).notNull(),\n});\n\nexport const vaultAuditLog = table(\"vault_audit_log\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n secretId: text(\"secret_id\"),\n appId: text(\"app_id\"),\n action: text(\"action\").notNull(),\n actor: text(\"actor\").notNull(),\n summary: text(\"summary\").notNull(),\n metadata: text(\"metadata\"),\n createdAt: bigint(\"created_at\", { mode: \"number\" }).notNull(),\n});\n\nexport const workspaceResources = table(\"workspace_resources\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n kind: text(\"kind\").notNull(), // \"skill\" | \"instruction\" | \"agent\" | \"agent-file\" | \"knowledge\" | \"mcp-server\"\n name: text(\"name\").notNull(),\n description: text(\"description\"),\n path: text(\"path\").notNull(), // resource path, e.g. \"skills/designer.md\"\n content: text(\"content\").notNull(),\n scope: text(\"scope\").notNull(), // \"all\" (runtime inherited) | \"selected\" (grant per-app)\n createdBy: text(\"created_by\").notNull(),\n createdAt: bigint(\"created_at\", { mode: \"number\" }).notNull(),\n updatedAt: bigint(\"updated_at\", { mode: \"number\" }).notNull(),\n});\n\nexport const workspaceResourceGrants = table(\"workspace_resource_grants\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n resourceId: text(\"resource_id\").notNull(),\n appId: text(\"app_id\").notNull(),\n status: text(\"status\").notNull(), // \"active\" | \"revoked\"\n syncedAt: bigint(\"synced_at\", { mode: \"number\" }), // legacy column retained for older rows\n createdAt: bigint(\"created_at\", { mode: \"number\" }).notNull(),\n updatedAt: bigint(\"updated_at\", { mode: \"number\" }).notNull(),\n});\n"]}
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/db/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAE5E,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE3E,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC,uBAAuB,EAAE;IACjE,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE;IAC3B,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,EAAE;IACzC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;IACrB,IAAI,EAAE,IAAI,CAAC,MAAM,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I,CAAC,QAAQ,CAAC;IACrB,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,EAAE;IACzC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE;IAC/B,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE,EAAE,uBAAuB;IACzD,QAAQ,EAAE,MAAM,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,wCAAwC;IAC3F,SAAS,EAAE,MAAM,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;IAC7D,SAAS,EAAE,MAAM,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;CAC9D,CAAC,CAAC","sourcesContent":["import { bigint, table, text, integer } from \"@agent-native/core/db/schema\";\n\nexport { workspaceApps, workspaceAppShares } from \"@agent-native/core/org\";\n\nexport const dispatchDestinations = table(\"dispatch_destinations\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n name: text(\"name\").notNull(),\n platform: text(\"platform\").notNull(),\n destination: text(\"destination\").notNull(),\n threadRef: text(\"thread_ref\"),\n notes: text(\"notes\"),\n createdBy: text(\"created_by\").notNull(),\n createdAt: bigint(\"created_at\", { mode: \"number\" }).notNull(),\n updatedAt: bigint(\"updated_at\", { mode: \"number\" }).notNull(),\n});\n\nexport const dispatchIdentityLinks = table(\"dispatch_identity_links\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n platform: text(\"platform\").notNull(),\n externalUserId: text(\"external_user_id\").notNull(),\n externalUserName: text(\"external_user_name\"),\n linkedBy: text(\"linked_by\").notNull(),\n createdAt: bigint(\"created_at\", { mode: \"number\" }).notNull(),\n updatedAt: bigint(\"updated_at\", { mode: \"number\" }).notNull(),\n});\n\nexport const dispatchLinkTokens = table(\"dispatch_link_tokens\", {\n id: text(\"id\").primaryKey(),\n token: text(\"token\").notNull(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n platform: text(\"platform\").notNull(),\n createdBy: text(\"created_by\").notNull(),\n expiresAt: bigint(\"expires_at\", { mode: \"number\" }).notNull(),\n claimedAt: bigint(\"claimed_at\", { mode: \"number\" }),\n claimedByExternalUserId: text(\"claimed_by_external_user_id\"),\n claimedByExternalUserName: text(\"claimed_by_external_user_name\"),\n createdAt: bigint(\"created_at\", { mode: \"number\" }).notNull(),\n updatedAt: bigint(\"updated_at\", { mode: \"number\" }).notNull(),\n});\n\nexport const dispatchApprovalRequests = table(\"dispatch_approval_requests\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n changeType: text(\"change_type\").notNull(),\n targetType: text(\"target_type\").notNull(),\n targetId: text(\"target_id\"),\n status: text(\"status\").notNull(),\n summary: text(\"summary\").notNull(),\n payload: text(\"payload\").notNull(),\n beforeValue: text(\"before_value\"),\n afterValue: text(\"after_value\"),\n requestedBy: text(\"requested_by\").notNull(),\n reviewedBy: text(\"reviewed_by\"),\n reviewedAt: bigint(\"reviewed_at\", { mode: \"number\" }),\n createdAt: bigint(\"created_at\", { mode: \"number\" }).notNull(),\n updatedAt: bigint(\"updated_at\", { mode: \"number\" }).notNull(),\n});\n\nexport const dispatchAuditEvents = table(\"dispatch_audit_events\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n actor: text(\"actor\").notNull(),\n action: text(\"action\").notNull(),\n targetType: text(\"target_type\").notNull(),\n targetId: text(\"target_id\"),\n summary: text(\"summary\").notNull(),\n metadata: text(\"metadata\"),\n createdAt: bigint(\"created_at\", { mode: \"number\" }).notNull(),\n});\n\nexport const dispatchDreams = table(\"dispatch_dreams\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n sourceId: text(\"source_id\").notNull(),\n title: text(\"title\").notNull(),\n status: text(\"status\").notNull(),\n query: text(\"query\"),\n report: text(\"report\"),\n summary: text(\"summary\"),\n sourceHealth: text(\"source_health\"),\n candidateCount: integer(\"candidate_count\").notNull(),\n inspectedThreadCount: integer(\"inspected_thread_count\").notNull(),\n createdBy: text(\"created_by\").notNull(),\n error: text(\"error\"),\n startedAt: bigint(\"started_at\", { mode: \"number\" }).notNull(),\n completedAt: bigint(\"completed_at\", { mode: \"number\" }),\n createdAt: bigint(\"created_at\", { mode: \"number\" }).notNull(),\n updatedAt: bigint(\"updated_at\", { mode: \"number\" }).notNull(),\n});\n\nexport const dispatchDreamProposals = table(\"dispatch_dream_proposals\", {\n id: text(\"id\").primaryKey(),\n dreamId: text(\"dream_id\").notNull(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n targetType: text(\"target_type\").notNull(),\n targetPath: text(\"target_path\").notNull(),\n title: text(\"title\").notNull(),\n summary: text(\"summary\").notNull(),\n rationale: text(\"rationale\").notNull(),\n content: text(\"content\").notNull(),\n evidence: text(\"evidence\").notNull(),\n confidence: integer(\"confidence\").notNull(),\n risk: text(\"risk\").notNull(),\n status: text(\"status\").notNull(),\n appliedBy: text(\"applied_by\"),\n appliedAt: bigint(\"applied_at\", { mode: \"number\" }),\n rejectedBy: text(\"rejected_by\"),\n rejectedAt: bigint(\"rejected_at\", { mode: \"number\" }),\n createdAt: bigint(\"created_at\", { mode: \"number\" }).notNull(),\n updatedAt: bigint(\"updated_at\", { mode: \"number\" }).notNull(),\n});\n\nexport const vaultGrants = table(\"vault_grants\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n // The `app_secrets` row id. Core checks a grant by `credentialKey` alone;\n // rows written before that column existed have none and match nothing.\n secretId: text(\"secret_id\").notNull(),\n credentialKey: text(\"credential_key\"),\n appId: text(\"app_id\").notNull(),\n grantedBy: text(\"granted_by\").notNull(),\n status: text(\"status\").notNull(),\n syncedAt: bigint(\"synced_at\", { mode: \"number\" }),\n createdAt: bigint(\"created_at\", { mode: \"number\" }).notNull(),\n updatedAt: bigint(\"updated_at\", { mode: \"number\" }).notNull(),\n});\n\nexport const vaultRequests = table(\"vault_requests\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n credentialKey: text(\"credential_key\").notNull(),\n appId: text(\"app_id\").notNull(),\n reason: text(\"reason\"),\n requestedBy: text(\"requested_by\").notNull(),\n status: text(\"status\").notNull(),\n reviewedBy: text(\"reviewed_by\"),\n reviewedAt: bigint(\"reviewed_at\", { mode: \"number\" }),\n createdAt: bigint(\"created_at\", { mode: \"number\" }).notNull(),\n updatedAt: bigint(\"updated_at\", { mode: \"number\" }).notNull(),\n});\n\nexport const vaultAuditLog = table(\"vault_audit_log\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n secretId: text(\"secret_id\"),\n appId: text(\"app_id\"),\n action: text(\"action\").notNull(),\n actor: text(\"actor\").notNull(),\n summary: text(\"summary\").notNull(),\n metadata: text(\"metadata\"),\n createdAt: bigint(\"created_at\", { mode: \"number\" }).notNull(),\n});\n\nexport const workspaceResources = table(\"workspace_resources\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n kind: text(\"kind\").notNull(), // \"skill\" | \"instruction\" | \"agent\" | \"agent-file\" | \"knowledge\" | \"mcp-server\"\n name: text(\"name\").notNull(),\n description: text(\"description\"),\n path: text(\"path\").notNull(), // resource path, e.g. \"skills/designer.md\"\n content: text(\"content\").notNull(),\n scope: text(\"scope\").notNull(), // \"all\" (runtime inherited) | \"selected\" (grant per-app)\n createdBy: text(\"created_by\").notNull(),\n createdAt: bigint(\"created_at\", { mode: \"number\" }).notNull(),\n updatedAt: bigint(\"updated_at\", { mode: \"number\" }).notNull(),\n});\n\nexport const workspaceResourceGrants = table(\"workspace_resource_grants\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n resourceId: text(\"resource_id\").notNull(),\n appId: text(\"app_id\").notNull(),\n status: text(\"status\").notNull(), // \"active\" | \"revoked\"\n syncedAt: bigint(\"synced_at\", { mode: \"number\" }), // legacy column retained for older rows\n createdAt: bigint(\"created_at\", { mode: \"number\" }).notNull(),\n updatedAt: bigint(\"updated_at\", { mode: \"number\" }).notNull(),\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"vault.d.ts","sourceRoot":"","sources":["../../../src/routes/pages/vault.tsx"],"names":[],"mappings":"AAMA,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,oCAAoC,CAAC;AAwE5C,wBAAgB,IAAI;;IAEnB;AAyrBD,UAAU,sBAAsB;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,UAAU,kBAAkB;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,UAAU,UAAU;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,kBAAkB,EAAE,CAAC;CACrC;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,iBAAiB,EAAE,sBAAsB,EAAE,EAC3C,OAAO,EAAE,UAAU,EAAE,GAAG,SAAS,EACjC,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,GACrB,YAAY,EAAE,CA0BhB;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,oDAgSjC"}
1
+ {"version":3,"file":"vault.d.ts","sourceRoot":"","sources":["../../../src/routes/pages/vault.tsx"],"names":[],"mappings":"AAMA,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,oCAAoC,CAAC;AAwE5C,wBAAgB,IAAI;;IAEnB;AAqrBD,UAAU,sBAAsB;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,UAAU,kBAAkB;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,UAAU,UAAU;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,kBAAkB,EAAE,CAAC;CACrC;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,iBAAiB,EAAE,sBAAsB,EAAE,EAC3C,OAAO,EAAE,UAAU,EAAE,GAAG,SAAS,EACjC,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,GACrB,YAAY,EAAE,CA0BhB;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,oDAgSjC"}
@@ -152,7 +152,7 @@ function SecretRow({ secret, grants, accessMode, }) {
152
152
  const allApps = accessMode !== "manual";
153
153
  return (_jsxs("div", { className: "rounded-xl bg-card", children: [_jsxs("button", { type: "button", className: "flex w-full items-center gap-3 px-4 py-3 text-left cursor-pointer", onClick: () => setExpanded(!expanded), children: [expanded ? (_jsx(IconChevronDown, { size: 16, className: "text-muted-foreground" })) : (_jsx(IconChevronRight, { size: 16, className: "text-muted-foreground" })), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-sm font-medium text-foreground", children: secret.name }), secret.provider && (_jsx(Badge, { variant: "secondary", className: "text-xs", children: secret.provider }))] }), secret.credentialKey !== secret.name && (_jsx("div", { className: "mt-0.5 font-mono text-xs text-muted-foreground", children: secret.credentialKey }))] }), _jsx("div", { className: "flex items-center gap-2", children: _jsx(Badge, { variant: "outline", className: "text-xs", children: allApps
154
154
  ? "All apps"
155
- : `${activeGrants.length} grant${activeGrants.length !== 1 ? "s" : ""}` }) })] }), expanded && (_jsxs("div", { className: "border-t px-4 py-3 space-y-3", children: [secret.description && (_jsx("p", { className: "text-sm text-muted-foreground", children: secret.description })), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-xs text-muted-foreground", children: "Value:" }), secret.valueStatus === "unreadable" ? (_jsx("span", { className: "text-xs text-destructive", children: "Saved, but this deployment cannot decrypt it. Save the key again." })) : secret.valueStatus === "missing" ? (_jsx("span", { className: "text-xs text-destructive", children: "Nothing stored. Save the key again." })) : (_jsx("code", { className: "text-xs font-mono text-foreground", children: secret.last4 }))] }), _jsxs("div", { className: "space-y-2", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-xs font-medium text-foreground", children: allApps ? "Access" : "Grants" }), !allApps && (_jsx(GrantDialog, { secretId: secret.id, secretName: secret.name }))] }), allApps ? (_jsx("div", { className: "rounded-lg border border-dashed px-3 py-4 text-center text-xs text-muted-foreground", children: "Available to every workspace app." })) : activeGrants.length > 0 ? (_jsx("div", { className: "space-y-1.5", children: activeGrants.map((grant) => (_jsxs("div", { className: "flex items-center justify-between rounded-lg border px-3 py-2", children: [_jsx("span", { className: "text-sm font-medium text-foreground", children: grant.appId }), _jsx("div", { className: "flex gap-1.5", children: _jsx(Button, { variant: "ghost", size: "sm", onClick: () => revokeGrant.mutate({ grantId: grant.id }), disabled: revokeGrant.isPending, children: _jsx(IconX, { size: 14 }) }) })] }, grant.id))) })) : (_jsx("div", { className: "rounded-lg border border-dashed px-3 py-4 text-center text-xs text-muted-foreground", children: "No grants yet." }))] }), _jsxs("div", { className: "flex justify-end gap-2 border-t pt-3", children: [_jsx(EditSecretDialog, { secret: secret }), _jsxs(AlertDialog, { children: [_jsx(AlertDialogTrigger, { asChild: true, children: _jsxs(Button, { variant: "destructive", size: "sm", disabled: deleteSecret.isPending, children: [_jsx(IconTrash, { size: 14, className: "mr-1" }), "Delete key"] }) }), _jsxs(AlertDialogContent, { children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: "Delete this key?" }), _jsxs(AlertDialogDescription, { children: ["Removing \u201C", secret.name, "\u201D revokes all of its grants. Apps that depended on this credential lose access. This cannot be undone."] })] }), _jsxs(AlertDialogFooter, { children: [_jsx(AlertDialogCancel, { children: "Cancel" }), _jsx(AlertDialogAction, { onClick: () => deleteSecret.mutate({ id: secret.id }), children: "Delete key" })] })] })] })] })] }))] }));
155
+ : `${activeGrants.length} grant${activeGrants.length !== 1 ? "s" : ""}` }) })] }), expanded && (_jsxs("div", { className: "border-t px-4 py-3 space-y-3", children: [secret.description && (_jsx("p", { className: "text-sm text-muted-foreground", children: secret.description })), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-xs text-muted-foreground", children: "Value:" }), secret.valueStatus === "unreadable" ? (_jsx("span", { className: "text-xs text-destructive", children: "Saved, but this deployment cannot decrypt it. Save the key again." })) : (_jsx("code", { className: "text-xs font-mono text-foreground", children: secret.last4 }))] }), _jsxs("div", { className: "space-y-2", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-xs font-medium text-foreground", children: allApps ? "Access" : "Grants" }), !allApps && (_jsx(GrantDialog, { secretId: secret.id, secretName: secret.name }))] }), allApps ? (_jsx("div", { className: "rounded-lg border border-dashed px-3 py-4 text-center text-xs text-muted-foreground", children: "Available to every workspace app." })) : activeGrants.length > 0 ? (_jsx("div", { className: "space-y-1.5", children: activeGrants.map((grant) => (_jsxs("div", { className: "flex items-center justify-between rounded-lg border px-3 py-2", children: [_jsx("span", { className: "text-sm font-medium text-foreground", children: grant.appId }), _jsx("div", { className: "flex gap-1.5", children: _jsx(Button, { variant: "ghost", size: "sm", onClick: () => revokeGrant.mutate({ grantId: grant.id }), disabled: revokeGrant.isPending, children: _jsx(IconX, { size: 14 }) }) })] }, grant.id))) })) : (_jsx("div", { className: "rounded-lg border border-dashed px-3 py-4 text-center text-xs text-muted-foreground", children: "No grants yet." }))] }), _jsxs("div", { className: "flex justify-end gap-2 border-t pt-3", children: [_jsx(EditSecretDialog, { secret: secret }), _jsxs(AlertDialog, { children: [_jsx(AlertDialogTrigger, { asChild: true, children: _jsxs(Button, { variant: "destructive", size: "sm", disabled: deleteSecret.isPending, children: [_jsx(IconTrash, { size: 14, className: "mr-1" }), "Delete key"] }) }), _jsxs(AlertDialogContent, { children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: "Delete this key?" }), _jsxs(AlertDialogDescription, { children: ["Removing \u201C", secret.name, "\u201D revokes all of its grants. Apps that depended on this credential lose access. This cannot be undone."] })] }), _jsxs(AlertDialogFooter, { children: [_jsx(AlertDialogCancel, { children: "Cancel" }), _jsx(AlertDialogAction, { onClick: () => deleteSecret.mutate({ id: secret.id }), children: "Delete key" })] })] })] })] })] }))] }));
156
156
  }
157
157
  function RequestRow({ request, canManage, }) {
158
158
  const [secretValue, setSecretValue] = useState("");