@fayz-ai/core 0.10.0 → 0.12.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.
Files changed (112) hide show
  1. package/dist/chunk-7GJTLBG3.js +566 -0
  2. package/dist/chunk-7GJTLBG3.js.map +1 -0
  3. package/dist/chunk-ED6NBH6U.js +348 -0
  4. package/dist/chunk-ED6NBH6U.js.map +1 -0
  5. package/dist/chunk-EWKX4VUM.js +429 -0
  6. package/dist/chunk-EWKX4VUM.js.map +1 -0
  7. package/dist/chunk-IKZR3WSK.js +289 -0
  8. package/dist/chunk-IKZR3WSK.js.map +1 -0
  9. package/dist/chunk-KFBEKFII.js +320 -0
  10. package/dist/chunk-KFBEKFII.js.map +1 -0
  11. package/dist/{chunk-732GZEUI.js → chunk-RRYFXUQX.js} +22 -367
  12. package/dist/chunk-RRYFXUQX.js.map +1 -0
  13. package/dist/chunk-S5FOFKR4.js +1618 -0
  14. package/dist/chunk-S5FOFKR4.js.map +1 -0
  15. package/dist/{chunk-M27JPX3K.js → chunk-U3252GZO.js} +366 -24
  16. package/dist/chunk-U3252GZO.js.map +1 -0
  17. package/dist/connector-runtime/index.d.ts +15 -0
  18. package/dist/connector-runtime/index.d.ts.map +1 -0
  19. package/dist/connector-runtime/index.js +3 -0
  20. package/dist/connector-runtime/index.js.map +1 -0
  21. package/dist/data/archetype.d.ts.map +1 -1
  22. package/dist/data/bulk.d.ts +24 -0
  23. package/dist/data/bulk.d.ts.map +1 -1
  24. package/dist/data/cached.d.ts +5 -1
  25. package/dist/data/cached.d.ts.map +1 -1
  26. package/dist/data/custom-fields.d.ts +5 -0
  27. package/dist/data/custom-fields.d.ts.map +1 -0
  28. package/dist/data/errors.d.ts +44 -0
  29. package/dist/data/errors.d.ts.map +1 -0
  30. package/dist/data/index.d.ts +10 -1
  31. package/dist/data/index.d.ts.map +1 -1
  32. package/dist/data/index.js +3 -1
  33. package/dist/data/mock.d.ts.map +1 -1
  34. package/dist/data/offline.d.ts +45 -0
  35. package/dist/data/offline.d.ts.map +1 -0
  36. package/dist/data/platform-api.d.ts.map +1 -1
  37. package/dist/data/query.d.ts +91 -0
  38. package/dist/data/query.d.ts.map +1 -0
  39. package/dist/data/resolve.d.ts.map +1 -1
  40. package/dist/data/supabase.d.ts.map +1 -1
  41. package/dist/data/types.d.ts +21 -0
  42. package/dist/data/types.d.ts.map +1 -1
  43. package/dist/events/bus.d.ts +12 -0
  44. package/dist/events/bus.d.ts.map +1 -0
  45. package/dist/events/index.d.ts +3 -11
  46. package/dist/events/index.d.ts.map +1 -1
  47. package/dist/events/log.d.ts.map +1 -1
  48. package/dist/fields/store.d.ts +45 -0
  49. package/dist/fields/store.d.ts.map +1 -0
  50. package/dist/i18n/index.d.ts.map +1 -1
  51. package/dist/i18n/index.js +1 -1
  52. package/dist/i18n/shell-translations.en.d.ts.map +1 -1
  53. package/dist/i18n/shell-translations.pt-br.d.ts.map +1 -1
  54. package/dist/index.d.ts +35 -11
  55. package/dist/index.d.ts.map +1 -1
  56. package/dist/index.js +326 -252
  57. package/dist/index.js.map +1 -1
  58. package/dist/integrations/events.d.ts +7 -0
  59. package/dist/integrations/events.d.ts.map +1 -0
  60. package/dist/integrations/index.d.ts +663 -0
  61. package/dist/integrations/index.d.ts.map +1 -0
  62. package/dist/integrations/index.js +3 -1
  63. package/dist/integrations/permissions.d.ts +132 -0
  64. package/dist/integrations/permissions.d.ts.map +1 -0
  65. package/dist/integrations/request.d.ts +170 -0
  66. package/dist/integrations/request.d.ts.map +1 -0
  67. package/dist/integrations/runtime-token.d.ts +33 -0
  68. package/dist/integrations/runtime-token.d.ts.map +1 -0
  69. package/dist/integrations/runtime.d.ts +398 -0
  70. package/dist/integrations/runtime.d.ts.map +1 -0
  71. package/dist/integrations/settings.d.ts +102 -0
  72. package/dist/integrations/settings.d.ts.map +1 -0
  73. package/dist/integrations/store.d.ts +145 -0
  74. package/dist/integrations/store.d.ts.map +1 -0
  75. package/dist/lib/cache-idb.d.ts +54 -0
  76. package/dist/lib/cache-idb.d.ts.map +1 -0
  77. package/dist/lib/cache.d.ts +2 -0
  78. package/dist/lib/cache.d.ts.map +1 -1
  79. package/dist/plugin/index.js +2 -1
  80. package/dist/plugin/runtime.d.ts.map +1 -1
  81. package/dist/registry/entities.d.ts +41 -15
  82. package/dist/registry/entities.d.ts.map +1 -1
  83. package/dist/registry/index.d.ts +2 -2
  84. package/dist/registry/index.d.ts.map +1 -1
  85. package/dist/search/engine.d.ts.map +1 -1
  86. package/dist/search/types.d.ts +7 -0
  87. package/dist/search/types.d.ts.map +1 -1
  88. package/dist/{shell-translations.pt-br-2GWRQRRP.js → shell-translations.pt-br-ANQ64XTT.js} +75 -3
  89. package/dist/shell-translations.pt-br-ANQ64XTT.js.map +1 -0
  90. package/dist/telemetry/errors.d.ts +87 -0
  91. package/dist/telemetry/errors.d.ts.map +1 -0
  92. package/dist/testing/index.js +4 -1
  93. package/dist/testing.d.ts +2 -0
  94. package/dist/testing.d.ts.map +1 -1
  95. package/dist/types/analytics.d.ts +39 -0
  96. package/dist/types/analytics.d.ts.map +1 -1
  97. package/dist/types/crud.d.ts +35 -1
  98. package/dist/types/crud.d.ts.map +1 -1
  99. package/dist/types/plugins.d.ts +94 -0
  100. package/dist/types/plugins.d.ts.map +1 -1
  101. package/package.json +7 -3
  102. package/dist/chunk-6RBW2Y5K.js +0 -42
  103. package/dist/chunk-6RBW2Y5K.js.map +0 -1
  104. package/dist/chunk-732GZEUI.js.map +0 -1
  105. package/dist/chunk-CPMHCTX3.js +0 -77
  106. package/dist/chunk-CPMHCTX3.js.map +0 -1
  107. package/dist/chunk-JO7Z2AOE.js +0 -863
  108. package/dist/chunk-JO7Z2AOE.js.map +0 -1
  109. package/dist/chunk-M27JPX3K.js.map +0 -1
  110. package/dist/integrations.d.ts +0 -159
  111. package/dist/integrations.d.ts.map +0 -1
  112. package/dist/shell-translations.pt-br-2GWRQRRP.js.map +0 -1
@@ -5,6 +5,7 @@ import type { AnalyticsCardDef, ResolvedAnalyticsCard } from './analytics';
5
5
  import type { FeatureDeclaration, PermissionAction } from './permissions';
6
6
  import type { LimitDeclaration } from './entitlements';
7
7
  import type { ConnectorDefinition } from '../integrations';
8
+ import type { DataProvider } from '../data/types';
8
9
  export type VerticalId = 'beauty' | 'food' | 'health' | 'services' | 'retail' | 'education' | (string & {});
9
10
  export type PluginScope = 'core' | 'vertical' | 'universal' | 'addon' | 'tenant';
10
11
  export type PluginStatus = 'pending_setup' | 'active' | 'disabled' | 'removed';
@@ -27,6 +28,17 @@ export interface PluginNavigationEntry {
27
28
  icon?: string;
28
29
  badge?: string | number;
29
30
  permission?: PluginPermissionRequirement;
31
+ /**
32
+ * Heading this entry sits under, WITHIN its section — the app rail's half of
33
+ * the `group` the settings rail already draws (see `PluginSettingsTab.group`).
34
+ * Consecutive entries sharing a group render under one heading, so `position`
35
+ * has to keep a group's entries contiguous.
36
+ *
37
+ * Plugin factories are not expected to invent one: a heading is a statement
38
+ * about how THIS app's rail is divided ("Serviço" / "Retaguarda"), which the
39
+ * plugin cannot know. The app stamps it on the manifests it assembles.
40
+ */
41
+ group?: string;
30
42
  /**
31
43
  * Sales-channel / external link. When set, the entry opens this URL in a new
32
44
  * tab instead of routing internally — no page/route is registered for it. Used
@@ -48,6 +60,13 @@ export interface PluginSettingsTab {
48
60
  id: string;
49
61
  label: string;
50
62
  icon?: string;
63
+ /**
64
+ * Heading these tabs are filed under in the settings rail — "Commerce",
65
+ * "Estoque". A plugin that contributes several related screens says so once
66
+ * per tab and they group; one that contributes a single tab leaves it unset
67
+ * and lands under the generic "Plugins" run, exactly as before.
68
+ */
69
+ group?: string;
51
70
  /** Provide the component directly, or reference a registered component by id
52
71
  * (resolvePluginComponent resolves componentId → the component registry).
53
72
  * Exactly one is required. */
@@ -221,6 +240,23 @@ export interface ResolvedDomainEvent extends PluginEventDefinition {
221
240
  pluginName: string;
222
241
  pluginIcon?: string;
223
242
  }
243
+ /**
244
+ * A table whose row changes become domain events, via a trigger calling
245
+ * `plg_emit_event`.
246
+ *
247
+ * The browser store already emits on its own writes. This covers the writes it
248
+ * never sees — an edge function's upsert, an import, a hand-run SQL fix — which
249
+ * are exactly the writes an integration makes. Declaring the table instead of
250
+ * hand-writing a trigger per plugin keeps one shape of fact in the ledger.
251
+ */
252
+ export interface PluginEventSource {
253
+ /** Table in the plugin's schema, e.g. 'plg_blog_posts'. */
254
+ table: string;
255
+ /** Entity key the event is named after; the trigger appends the action. */
256
+ entityKey: string;
257
+ /** Actions to emit. Default: all three. */
258
+ actions?: Array<'created' | 'updated' | 'deleted'>;
259
+ }
224
260
  export interface PluginCapability {
225
261
  id: string;
226
262
  label: string;
@@ -280,6 +316,32 @@ export interface AgentRpcDeclaration {
280
316
  /** Whether the function writes audit_logs itself. */
281
317
  audits?: boolean;
282
318
  }
319
+ /**
320
+ * An edge function this plugin ships under `functions/<slug>/`.
321
+ *
322
+ * A function that nobody copies into the app is a dead feature — that is the
323
+ * documented fate of the google-calendar function, which existed in the SDK for
324
+ * months without ever being deployed. Declaring it lets the app's sync step and
325
+ * `fayz doctor` name what is missing instead of failing silently.
326
+ */
327
+ export interface PluginFunctionDeclaration {
328
+ /** Directory under `functions/`, and the deployed function name. */
329
+ slug: string;
330
+ /**
331
+ * Whether Supabase requires a caller JWT. A function reached through the Fayz
332
+ * ingress sets `false` and authenticates the signature instead.
333
+ */
334
+ verifyJwt: boolean;
335
+ /** Secret NAMES the function reads. Names only — a value here is a leak. */
336
+ secrets?: string[];
337
+ /** How the outside world reaches it: through the Fayz ingress, or not at all. */
338
+ ingress: 'fayz' | 'none';
339
+ /**
340
+ * Pool RPCs the function's credential is allowed to call. The privilege comes
341
+ * from this list, not from who wrote the function — see the 2026-08-11 ADR.
342
+ */
343
+ grants?: string[];
344
+ }
283
345
  export interface PluginAITool {
284
346
  id: string;
285
347
  name: string;
@@ -326,6 +388,15 @@ export interface PluginRegistryDef {
326
388
  seedData?: Record<string, unknown>[];
327
389
  mockData?: Record<string, unknown>[];
328
390
  readOnly?: boolean;
391
+ /**
392
+ * Read/write this registry through a provider the plugin already owns, instead
393
+ * of the table `entity.data.table` names. For a registry whose writes are not
394
+ * a plain column mapping: delivery zones normalise the CEP the merchant typed
395
+ * ('22.041-001' → '22041001') before it reaches a column that
396
+ * shop_quote_shipping compares as bare digits, and a generic write would store
397
+ * the punctuation and silently stop matching a whole city.
398
+ */
399
+ dataProvider?: DataProvider<never>;
329
400
  }
330
401
  export interface PluginMigration {
331
402
  id: string;
@@ -374,6 +445,8 @@ export interface PluginManifest {
374
445
  verticalId?: VerticalId;
375
446
  /** Events this plugin emits onto the bus (declared for introspection/automation). */
376
447
  events?: PluginEventDefinition[];
448
+ /** Tables whose row changes emit those events server-side. See {@link PluginEventSource}. */
449
+ emitsFrom?: PluginEventSource[];
377
450
  /** Which scaffold types this plugin targets. Omit for universal plugins. */
378
451
  scaffolds?: ScaffoldType[];
379
452
  tenantId?: string;
@@ -426,6 +499,27 @@ export interface PluginManifest {
426
499
  * host and the host plugin's settings render them in a unified Integrations tab.
427
500
  */
428
501
  connectors?: ConnectorDefinition[];
502
+ /**
503
+ * Platform connector slugs this module integrates with — the shelf a tenant is
504
+ * shown under "Adicionar conector", and the "Integra com" row on the plugin's
505
+ * page in the Fayz builder.
506
+ *
507
+ * The module is what decides: CRM brings Kommo and RD Station, Financeiro
508
+ * brings AbacatePay and Pagar.me, Agenda brings Google Calendar and Calendly.
509
+ * Neither a vertical nor a tag can answer that, and the platform catalogue
510
+ * answers it for the wrong audience — it is a builder directory, and reading
511
+ * it tenant-side is how the owner of a salon was once offered Supabase.
512
+ *
513
+ * Declaring a slug is NOT implementing it. A slug that also has a
514
+ * {@link ConnectorDefinition} behind it (matched on `catalogSlug ?? id`) reads
515
+ * "Disponível" and can be connected; the rest read "Em breve" and are
516
+ * informational. Every slug must exist in the platform catalogue — the
517
+ * generator refuses one that does not, which is what keeps this a relationship
518
+ * rather than a wishlist.
519
+ */
520
+ integrations?: string[];
521
+ /** Edge functions shipped under `functions/`. See {@link PluginFunctionDeclaration}. */
522
+ functions?: PluginFunctionDeclaration[];
429
523
  migrations?: PluginMigration[];
430
524
  /** Backend prerequisites the plugin needs; surfaced by `fayz doctor`. */
431
525
  diagnostics?: PluginDiagnostic[];
@@ -1 +1 @@
1
- {"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../src/types/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAC1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAE1D,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,GAAG,QAAQ,GAAG,WAAW,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;AAC3G,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,WAAW,GAAG,OAAO,GAAG,QAAQ,CAAA;AAChF,MAAM,MAAM,YAAY,GAAG,eAAe,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAA;AAE9E;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,WAAW,GAAG,cAAc,GAAG,SAAS,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;AAE5F,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,gBAAgB,CAAA;CACzB;AAED,MAAM,WAAW,qBA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cAAc,EAAE,qBAAqB,EAAE,CAAA;IACvC;uCACmC;IACnC,MAAM,EAAE,mBAAmB,EAAE,CAAA;IAC7B,YAAY,EAAE,gBAAgB,EAAE,CAAA;IAChC,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,MAAM,EAAE,kBAAkB,EAAE,CAAA;IAC5B,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,CAAA;IAC5C,wFAAwF;IACxF,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,EAAE,CAAC,CAAA;IACpD,cAAc,EAAE,kBAAkB,EAAE,CAAA;IACpC,iFAAiF;IACjF,YAAY,EAAE,gBAAgB,EAAE,CAAA;CACjC"}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "fayz": {
4
4
  "status": "beta"
5
5
  },
6
- "version": "0.10.0",
6
+ "version": "0.12.0",
7
7
  "description": "Fayz SDK core — data providers, entity system, plugin runtime, i18n, routing",
8
8
  "type": "module",
9
9
  "sideEffects": false,
@@ -52,8 +52,12 @@
52
52
  "import": "./dist/testing/index.js"
53
53
  },
54
54
  "./integrations": {
55
- "types": "./dist/integrations.d.ts",
55
+ "types": "./dist/integrations/index.d.ts",
56
56
  "import": "./dist/integrations/index.js"
57
+ },
58
+ "./connector-runtime": {
59
+ "types": "./dist/integrations/runtime.d.ts",
60
+ "import": "./dist/connector-runtime/index.js"
57
61
  }
58
62
  },
59
63
  "files": [
@@ -66,7 +70,7 @@
66
70
  "@supabase/supabase-js": "^2.45.0"
67
71
  },
68
72
  "dependencies": {
69
- "@fayz-ai/sdk": "^0.10.0"
73
+ "@fayz-ai/sdk": "^0.12.0"
70
74
  },
71
75
  "devDependencies": {
72
76
  "@types/react": "^18.3.0",
@@ -1,42 +0,0 @@
1
- // src/integrations.ts
2
- function connectorPlanes(def) {
3
- return def.planes?.length ? def.planes : ["sync"];
4
- }
5
- function preferredPlane(def) {
6
- return connectorPlanes(def).includes("agentic") ? "agentic" : "sync";
7
- }
8
- function connectorDirection(def) {
9
- return def.direction ?? "outbound";
10
- }
11
- function withAfterHooks(target, methods) {
12
- return new Proxy(target, {
13
- get(obj, prop, receiver) {
14
- const orig = Reflect.get(obj, prop, receiver);
15
- const hook = methods[prop];
16
- if (typeof orig !== "function" || !hook) return orig;
17
- return (...args) => {
18
- const result = orig.apply(obj, args);
19
- if (result instanceof Promise) {
20
- return result.then((value) => {
21
- try {
22
- void Promise.resolve(hook(args, value)).catch(() => {
23
- });
24
- } catch {
25
- }
26
- return value;
27
- });
28
- }
29
- try {
30
- void Promise.resolve(hook(args, result)).catch(() => {
31
- });
32
- } catch {
33
- }
34
- return result;
35
- };
36
- }
37
- });
38
- }
39
-
40
- export { connectorDirection, connectorPlanes, preferredPlane, withAfterHooks };
41
- //# sourceMappingURL=chunk-6RBW2Y5K.js.map
42
- //# sourceMappingURL=chunk-6RBW2Y5K.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/integrations.ts"],"names":[],"mappings":";AA6LO,SAAS,gBAAgB,GAAA,EAA4D;AAC1F,EAAA,OAAO,IAAI,MAAA,EAAQ,MAAA,GAAS,GAAA,CAAI,MAAA,GAAS,CAAC,MAAM,CAAA;AAClD;AAOO,SAAS,eAAe,GAAA,EAA0D;AACvF,EAAA,OAAO,gBAAgB,GAAG,CAAA,CAAE,QAAA,CAAS,SAAS,IAAI,SAAA,GAAY,MAAA;AAChE;AAGO,SAAS,mBAAmB,GAAA,EAAiE;AAClG,EAAA,OAAO,IAAI,SAAA,IAAa,UAAA;AAC1B;AASO,SAAS,cAAA,CACd,QACA,OAAA,EACG;AACH,EAAA,OAAO,IAAI,MAAM,MAAA,EAAQ;AAAA,IACvB,GAAA,CAAI,GAAA,EAAK,IAAA,EAAM,QAAA,EAAU;AACvB,MAAA,MAAM,IAAA,GAAO,OAAA,CAAQ,GAAA,CAAI,GAAA,EAAK,MAAM,QAAQ,CAAA;AAC5C,MAAA,MAAM,IAAA,GAAQ,QAA8G,IAAI,CAAA;AAChI,MAAA,IAAI,OAAO,IAAA,KAAS,UAAA,IAAc,CAAC,MAAM,OAAO,IAAA;AAChD,MAAA,OAAO,IAAI,IAAA,KAAoB;AAC7B,QAAA,MAAM,MAAA,GAAU,IAAA,CAAsC,KAAA,CAAM,GAAA,EAAK,IAAI,CAAA;AACrE,QAAA,IAAI,kBAAkB,OAAA,EAAS;AAC7B,UAAA,OAAO,MAAA,CAAO,IAAA,CAAK,CAAC,KAAA,KAAU;AAC5B,YAAA,IAAI;AAAE,cAAA,KAAK,OAAA,CAAQ,QAAQ,IAAA,CAAK,IAAA,EAAM,KAAK,CAAC,CAAA,CAAE,MAAM,MAAM;AAAA,cAAC,CAAC,CAAA;AAAA,YAAE,CAAA,CAAA,MAAQ;AAAA,YAA6B;AACnG,YAAA,OAAO,KAAA;AAAA,UACT,CAAC,CAAA;AAAA,QACH;AACA,QAAA,IAAI;AAAE,UAAA,KAAK,OAAA,CAAQ,QAAQ,IAAA,CAAK,IAAA,EAAM,MAAM,CAAC,CAAA,CAAE,MAAM,MAAM;AAAA,UAAC,CAAC,CAAA;AAAA,QAAE,CAAA,CAAA,MAAQ;AAAA,QAAa;AACpF,QAAA,OAAO,MAAA;AAAA,MACT,CAAA;AAAA,IACF;AAAA,GACD,CAAA;AACH","file":"chunk-6RBW2Y5K.js","sourcesContent":["// ---------------------------------------------------------------------------\n// Integration Connector spine\n// ---------------------------------------------------------------------------\n// An integration is a connector that keeps canonical Fayz data in agreement\n// with an external provider (Google Calendar, open banking, Shopify, …). This\n// module is the thin shared contract both native (SDK) and client-built\n// connectors implement. The heavy lifting (auth, fetch/push, idempotent\n// upserts) runs in the data plane — typically a Supabase Edge Function — while\n// the control plane (a settings tab + this contract) lives in the app/plugin.\n//\n// Design notes live in docs/integrations/bling-integration-brief.md. Proven precedents:\n// the Fayz runtime OAuth broker (packages/core/src/runtime/oauth.ts) and the\n// bank-statement edge functions in the predecessor app.\nimport type * as React from 'react'\n\n/** How a connector authenticates to its provider. */\nexport type IntegrationAuthKind = 'oauth' | 'api-key' | 'mtls'\n\n// ---------------------------------------------------------------------------\n// Planes — the two ways a connector gets honoured\n// ---------------------------------------------------------------------------\n// \"Integração\" and \"conector\" are the same noun. What differs is the plane it\n// runs on:\n//\n// - 'agentic' — the provider's tools are handed to the assistant. Nothing is\n// copied: the agent calls the provider at the moment it needs the answer,\n// so there is no mirror to drift and no de-para to maintain. Preferred\n// whenever the provider offers it.\n// - 'sync' — the old-school pipeline: authorize, map, run, keep an audit\n// trail. Required when the data must exist *inside* Fayz — to be listed,\n// filtered, reported on, or read while the provider is unreachable.\n//\n// A connector may support both; `preferredPlane` encodes the house rule.\nexport type ConnectorPlane = 'agentic' | 'sync'\n\n/** Which side reaches for the other, from this app's point of view. */\nexport type ConnectorDirection = 'inbound' | 'outbound'\n\n/** A tool the assistant gains once a connector is resolved on the agentic plane. */\nexport interface ConnectorAgentTool {\n name: string\n description?: string\n}\n\n/** Which way data flows for a given capability. */\nexport type SyncDirection = 'inbound' | 'outbound' | 'bidirectional'\n\n/** What causes a sync to run. */\nexport type SyncTrigger = 'on-write' | 'scheduled' | 'manual' | 'webhook'\n\n/** One thing a connector can sync (an entity + its direction + triggers). */\nexport interface ConnectorCapability {\n /** Canonical entity synced, e.g. 'booking', 'movement'. */\n entity: string\n direction: SyncDirection\n triggers: SyncTrigger[]\n}\n\n/** The state of a tenant's connection to a provider (one row in a *_integrations table). */\nexport interface ConnectionConfig {\n /** Provider key, e.g. 'google', 'plugbank'. */\n provider: string\n /** Whether the connection is active and should sync. */\n active: boolean\n /** Opaque, provider-specific config (calendar id, account id, cursor, …). Never secrets. */\n settings?: Record<string, unknown>\n /** Last successful sync, ISO timestamp. */\n lastSyncAt?: string\n}\n\n/** Audit record of one sync execution (generalizes *_sync_log / *_sync_runs). */\nexport interface SyncRun {\n id?: string\n provider: string\n direction: SyncDirection\n trigger: SyncTrigger\n status: 'success' | 'partial' | 'error'\n /** Items pulled/pushed and how many were written. */\n fetched?: number\n written?: number\n /** Pagination/incremental cursor advanced by this run. */\n cursor?: string\n error?: string\n startedAt?: string\n finishedAt?: string\n}\n\nexport interface TestConnectionResult {\n ok: boolean\n message?: string\n}\n\n/**\n * A connector's control-plane descriptor. The data-plane verbs (testConnection,\n * sync) are usually thin clients that invoke a Supabase Edge Function — the\n * function holds credentials and does the real work.\n */\nexport interface Connector {\n /** Stable connector id, e.g. 'google-calendar', 'plugbank'. */\n id: string\n /** Provider key matching ConnectionConfig.provider. */\n provider: string\n /** Plugin this connector extends, e.g. 'agenda', 'financial'. */\n pluginId: string\n authKind: IntegrationAuthKind\n capabilities: ConnectorCapability[]\n /** Validate the stored credentials/config without syncing. */\n testConnection?(config: ConnectionConfig): Promise<TestConnectionResult>\n /** Run a sync for the given direction; returns the audit record. */\n sync?(input: { config: ConnectionConfig; direction: SyncDirection; trigger: SyncTrigger }): Promise<SyncRun>\n}\n\n// ---------------------------------------------------------------------------\n// Connector UI contract — how an addon plugin EXTENDS a host plugin's settings\n// ---------------------------------------------------------------------------\n// An addon plugin declares one or more ConnectorDefinitions on its manifest\n// (`connectors: [...]`). The runtime groups them by `hostPluginId`, and the host\n// plugin's settings panel renders them in a unified \"Integrations\" tab — the\n// same connect/credentials experience for every connector. The connector-\n// specific bits (import a statement, sync now, history) live in `ExtraPanel`.\n\n/** A credential input the unified setup form renders for an api-key/mtls connector. */\nexport interface ConnectorField {\n key: string\n label: string\n type: 'text' | 'password'\n placeholder?: string\n}\n\nexport interface ConnectorStatus {\n connected: boolean\n detail?: string\n /** Which plane the live connection is running on (when connected). */\n plane?: ConnectorPlane\n}\n\n/**\n * UI-facing connector descriptor. Built on the data-plane `Connector` concept\n * (`pluginId` → `hostPluginId`), plus the control-plane hooks the unified\n * Integrations hub calls. Lives in core so `PluginManifest.connectors` can type\n * it; the rendering hub lives in `@fayz-ai/admin`.\n */\nexport interface ConnectorDefinition {\n /** Stable connector id, e.g. 'google-calendar', 'plugbank'. */\n id: string\n /** The plugin this connector extends, e.g. 'financial', 'agenda'. */\n hostPluginId: string\n name: string\n description?: string\n /** Lucide icon name. */\n icon?: string\n /**\n * The connector's own brand mark — a URL or an inline data URI. Preferred\n * over the catalogue's icon and over `icon`, so a connector the Fayz\n * directory doesn't carry still shows up as itself.\n */\n logoUrl?: string\n authKind: IntegrationAuthKind\n /** Planes this connector can be honoured on. Default: `['sync']`. */\n planes?: ConnectorPlane[]\n /** Default `'outbound'` — this app reaching a provider. */\n direction?: ConnectorDirection\n /** What the assistant gains on the agentic plane — shown before connecting. */\n agentTools?: ConnectorAgentTool[]\n /** Canonical entities this connector touches ('booking', 'movement'). */\n entities?: string[]\n /** Catalog category ('scheduling', 'payments', …) — matches the Fayz catalog. */\n category?: string\n /** Provider documentation, linked from the connector's detail. */\n docsUrl?: string\n /** Declarative credentials — the unified form renders these (api-key / mtls). */\n fields?: ConnectorField[]\n /** Current connection state for the status badge. */\n getStatus(): Promise<ConnectorStatus>\n /** Validate credentials without persisting (api-key / mtls). */\n testConnection?(values: Record<string, string>): Promise<TestConnectionResult>\n /** Persist the connection (api-key / mtls). */\n saveConnection?(values: Record<string, string>): Promise<void>\n /** Begin an OAuth connect flow — returns the consent URL to redirect to. */\n startOAuth?(redirectTo?: string): Promise<string>\n /** Tear down the connection. */\n disconnect?(): Promise<void>\n /** Move an existing connection between planes (only when `planes` has both). */\n setPlane?(plane: ConnectorPlane): Promise<void>\n /** Optional connector-specific UI below the connect panel (import / sync / history). */\n ExtraPanel?: React.ComponentType\n}\n\n/** Planes a connector supports — the contract's default is the sync pipeline. */\nexport function connectorPlanes(def: Pick<ConnectorDefinition, 'planes'>): ConnectorPlane[] {\n return def.planes?.length ? def.planes : ['sync']\n}\n\n/**\n * The plane to offer first. Agentic wins whenever the connector supports it:\n * handing the assistant a tool costs nothing to keep in agreement, while a sync\n * pipeline is a copy that has to be maintained for as long as it exists.\n */\nexport function preferredPlane(def: Pick<ConnectorDefinition, 'planes'>): ConnectorPlane {\n return connectorPlanes(def).includes('agentic') ? 'agentic' : 'sync'\n}\n\n/** Direction a connector moves data in — outbound unless it says otherwise. */\nexport function connectorDirection(def: Pick<ConnectorDefinition, 'direction'>): ConnectorDirection {\n return def.direction ?? 'outbound'\n}\n\n/**\n * Wrap an object's async methods so a handler fires AFTER selected methods\n * resolve — the non-invasive hook for outbound, event-driven sync when there's\n * no app-level event bus. Example: wrap an AgendaDataProvider so that after\n * createBooking/updateBooking/deleteBooking succeed, an external calendar is\n * updated. The handler runs fire-and-forget; its failures never break the call.\n */\nexport function withAfterHooks<T extends object>(\n target: T,\n methods: Partial<Record<keyof T, (args: unknown[], result: unknown) => void | Promise<void>>>,\n): T {\n return new Proxy(target, {\n get(obj, prop, receiver) {\n const orig = Reflect.get(obj, prop, receiver)\n const hook = (methods as Record<string | symbol, ((args: unknown[], result: unknown) => void | Promise<void>) | undefined>)[prop]\n if (typeof orig !== 'function' || !hook) return orig\n return (...args: unknown[]) => {\n const result = (orig as (...a: unknown[]) => unknown).apply(obj, args)\n if (result instanceof Promise) {\n return result.then((value) => {\n try { void Promise.resolve(hook(args, value)).catch(() => {}) } catch { /* never break the call */ }\n return value\n })\n }\n try { void Promise.resolve(hook(args, result)).catch(() => {}) } catch { /* noop */ }\n return result\n }\n },\n })\n}\n"]}