@lssm/lib.bus 1.7.1 → 1.7.3
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/dist/contracts/src/capabilities/openbanking.js.map +1 -1
- package/dist/contracts/src/integrations/openbanking/models.js.map +1 -1
- package/dist/contracts/src/integrations/openbanking/telemetry.js.map +1 -1
- package/dist/contracts/src/integrations/providers/powens.js.map +1 -1
- package/dist/contracts/src/knowledge/contracts.js.map +1 -1
- package/dist/contracts/src/knowledge/spaces/product-canon.js.map +1 -1
- package/dist/contracts/src/knowledge/spaces/support-faq.js.map +1 -1
- package/dist/contracts/src/regenerator/service.js.map +1 -1
- package/package.json +16 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openbanking.js","names":["openBankingAccountsReadCapability: CapabilitySpec","openBankingTransactionsReadCapability: CapabilitySpec","openBankingBalancesReadCapability: CapabilitySpec"],"sources":["../../../../../contracts/src/capabilities/openbanking.ts"],"sourcesContent":["import type { CapabilityRegistry, CapabilitySpec } from '../capabilities';\nimport { StabilityEnum } from '../ownership';\n\nconst OWNERS = ['platform.finance'] as const;\nconst TAGS = ['open-banking', 'finance'] as const;\n\nexport const openBankingAccountsReadCapability: CapabilitySpec = {\n meta: {\n key: 'openbanking.accounts.read',\n version: 1,\n kind: 'integration',\n title: 'Open Banking Accounts (Read)',\n description:\n 'Provides read-only access to linked bank accounts, including account summaries and metadata.',\n domain: 'finance',\n owners: [...OWNERS],\n tags: [...TAGS],\n stability: StabilityEnum.Experimental,\n },\n provides: [\n {\n surface: 'operation',\n name: 'openbanking.accounts.list',\n version: 1,\n description: 'List bank accounts linked to a Powens open banking connection.',\n },\n {\n surface: 'operation',\n name: 'openbanking.accounts.get',\n version: 1,\n description: 'Retrieve the canonical bank account record for a specific account.',\n },\n {\n surface: 'operation',\n name: 'openbanking.accounts.sync',\n version: 1,\n description: 'Trigger a refresh of bank account metadata from the open banking provider.',\n },\n ],\n};\n\nexport const openBankingTransactionsReadCapability: CapabilitySpec = {\n meta: {\n key: 'openbanking.transactions.read',\n version: 1,\n kind: 'integration',\n title: 'Open Banking Transactions (Read)',\n description:\n 'Enables retrieval of transaction history for linked bank accounts via open banking providers.',\n domain: 'finance',\n owners: [...OWNERS],\n tags: [...TAGS, 'transactions'],\n stability: StabilityEnum.Experimental,\n },\n provides: [\n {\n surface: 'operation',\n name: 'openbanking.transactions.list',\n version: 1,\n description: 'List transactions for a given bank account with optional date filtering.',\n },\n {\n surface: 'operation',\n name: 'openbanking.transactions.sync',\n version: 1,\n description: 'Synchronise transactions from the open banking provider into the canonical ledger.',\n },\n ],\n};\n\nexport const openBankingBalancesReadCapability: CapabilitySpec = {\n meta: {\n key: 'openbanking.balances.read',\n version: 1,\n kind: 'integration',\n title: 'Open Banking Balances (Read)',\n description:\n 'Allows querying of current and available balances for linked bank accounts via open banking providers.',\n domain: 'finance',\n owners: [...OWNERS],\n tags: [...TAGS, 'balances'],\n stability: StabilityEnum.Experimental,\n },\n provides: [\n {\n surface: 'operation',\n name: 'openbanking.balances.get',\n version: 1,\n description: 'Retrieve the latest known balances for a specified bank account.',\n },\n {\n surface: 'operation',\n name: 'openbanking.balances.refresh',\n version: 1,\n description: 'Force a balance refresh from the open banking provider.',\n },\n ],\n};\n\nexport function registerOpenBankingCapabilities(\n registry: CapabilityRegistry\n): CapabilityRegistry {\n return registry\n .register(openBankingAccountsReadCapability)\n .register(openBankingTransactionsReadCapability)\n .register(openBankingBalancesReadCapability);\n}\n\n\n"],"mappings":"gDAGA,MAAM,EAAS,CAAC,mBAAmB,CAC7B,EAAO,CAAC,eAAgB,UAAU,CAW5B,CAAC,GAAG,EAAO,CACb,CAAC,GAAG,EAAK,CACJ,EAAc,aAiCjB,CAAC,GAAG,EAAO,CACb,CAAC,GAAG,EAAqB,CACpB,EAAc,aA2BjB,CAAC,GAAG,EAAO,CACb,CAAC,GAAG,EAAiB,CAChB,EAAc"}
|
|
1
|
+
{"version":3,"file":"openbanking.js","names":["openBankingAccountsReadCapability: CapabilitySpec","openBankingTransactionsReadCapability: CapabilitySpec","openBankingBalancesReadCapability: CapabilitySpec"],"sources":["../../../../../contracts/src/capabilities/openbanking.ts"],"sourcesContent":["import type { CapabilityRegistry, CapabilitySpec } from '../capabilities';\nimport { StabilityEnum } from '../ownership';\n\nconst OWNERS = ['platform.finance'] as const;\nconst TAGS = ['open-banking', 'finance'] as const;\n\nexport const openBankingAccountsReadCapability: CapabilitySpec = {\n meta: {\n key: 'openbanking.accounts.read',\n version: 1,\n kind: 'integration',\n title: 'Open Banking Accounts (Read)',\n description:\n 'Provides read-only access to linked bank accounts, including account summaries and metadata.',\n domain: 'finance',\n owners: [...OWNERS],\n tags: [...TAGS],\n stability: StabilityEnum.Experimental,\n },\n provides: [\n {\n surface: 'operation',\n name: 'openbanking.accounts.list',\n version: 1,\n description: 'List bank accounts linked to a Powens open banking connection.',\n },\n {\n surface: 'operation',\n name: 'openbanking.accounts.get',\n version: 1,\n description: 'Retrieve the canonical bank account record for a specific account.',\n },\n {\n surface: 'operation',\n name: 'openbanking.accounts.sync',\n version: 1,\n description: 'Trigger a refresh of bank account metadata from the open banking provider.',\n },\n ],\n};\n\nexport const openBankingTransactionsReadCapability: CapabilitySpec = {\n meta: {\n key: 'openbanking.transactions.read',\n version: 1,\n kind: 'integration',\n title: 'Open Banking Transactions (Read)',\n description:\n 'Enables retrieval of transaction history for linked bank accounts via open banking providers.',\n domain: 'finance',\n owners: [...OWNERS],\n tags: [...TAGS, 'transactions'],\n stability: StabilityEnum.Experimental,\n },\n provides: [\n {\n surface: 'operation',\n name: 'openbanking.transactions.list',\n version: 1,\n description: 'List transactions for a given bank account with optional date filtering.',\n },\n {\n surface: 'operation',\n name: 'openbanking.transactions.sync',\n version: 1,\n description: 'Synchronise transactions from the open banking provider into the canonical ledger.',\n },\n ],\n};\n\nexport const openBankingBalancesReadCapability: CapabilitySpec = {\n meta: {\n key: 'openbanking.balances.read',\n version: 1,\n kind: 'integration',\n title: 'Open Banking Balances (Read)',\n description:\n 'Allows querying of current and available balances for linked bank accounts via open banking providers.',\n domain: 'finance',\n owners: [...OWNERS],\n tags: [...TAGS, 'balances'],\n stability: StabilityEnum.Experimental,\n },\n provides: [\n {\n surface: 'operation',\n name: 'openbanking.balances.get',\n version: 1,\n description: 'Retrieve the latest known balances for a specified bank account.',\n },\n {\n surface: 'operation',\n name: 'openbanking.balances.refresh',\n version: 1,\n description: 'Force a balance refresh from the open banking provider.',\n },\n ],\n};\n\nexport function registerOpenBankingCapabilities(\n registry: CapabilityRegistry\n): CapabilityRegistry {\n return registry\n .register(openBankingAccountsReadCapability)\n .register(openBankingTransactionsReadCapability)\n .register(openBankingBalancesReadCapability);\n}\n\n\n\n\n"],"mappings":"gDAGA,MAAM,EAAS,CAAC,mBAAmB,CAC7B,EAAO,CAAC,eAAgB,UAAU,CAW5B,CAAC,GAAG,EAAO,CACb,CAAC,GAAG,EAAK,CACJ,EAAc,aAiCjB,CAAC,GAAG,EAAO,CACb,CAAC,GAAG,EAAqB,CACpB,EAAc,aA2BjB,CAAC,GAAG,EAAO,CACb,CAAC,GAAG,EAAiB,CAChB,EAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.js","names":[],"sources":["../../../../../../contracts/src/integrations/openbanking/models.ts"],"sourcesContent":["import {\n ScalarTypeEnum,\n SchemaModel,\n} from '@lssm/lib.schema';\n\nexport const BankAccountRecord = new SchemaModel({\n name: 'BankAccountRecord',\n description:\n 'Canonical representation of a bank account synced from an open banking provider.',\n fields: {\n id: { type: ScalarTypeEnum.ID(), isOptional: false },\n tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },\n userId: { type: ScalarTypeEnum.ID(), isOptional: false },\n connectionId: { type: ScalarTypeEnum.ID(), isOptional: false },\n externalId: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n institutionId: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n institutionName: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n institutionLogoUrl: { type: ScalarTypeEnum.URL(), isOptional: true },\n iban: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n bic: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n accountType: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n currency: { type: ScalarTypeEnum.Currency(), isOptional: false },\n displayName: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n accountNumberMasked: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n productCode: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n balance: { type: ScalarTypeEnum.Float_unsecure(), isOptional: true },\n availableBalance: { type: ScalarTypeEnum.Float_unsecure(), isOptional: true },\n lastSyncedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n metadata: { type: ScalarTypeEnum.JSONObject(), isOptional: true },\n },\n});\n\nexport const BankTransactionRecord = new SchemaModel({\n name: 'BankTransactionRecord',\n description:\n 'Canonical transaction entry mapped from Powens into the open banking ledger.',\n fields: {\n id: { type: ScalarTypeEnum.ID(), isOptional: false },\n accountId: { type: ScalarTypeEnum.ID(), isOptional: false },\n tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },\n connectionId: { type: ScalarTypeEnum.ID(), isOptional: false },\n externalId: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n currency: { type: ScalarTypeEnum.Currency(), isOptional: false },\n date: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n bookingDate: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n valueDate: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n counterpartyName: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n counterpartyAccount: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n merchantCategoryCode: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n rawCategory: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n standardizedCategory: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n transactionType: {\n type: ScalarTypeEnum.NonEmptyString(),\n isOptional: false,\n },\n status: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n runningBalance: { type: ScalarTypeEnum.Float_unsecure(), isOptional: true },\n metadata: { type: ScalarTypeEnum.JSONObject(), isOptional: true },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const AccountBalanceRecord = new SchemaModel({\n name: 'AccountBalanceRecord',\n description:\n 'Canonical balance snapshot computed from Powens balance payloads.',\n fields: {\n id: { type: ScalarTypeEnum.ID(), isOptional: false },\n accountId: { type: ScalarTypeEnum.ID(), isOptional: false },\n tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },\n connectionId: { type: ScalarTypeEnum.ID(), isOptional: false },\n balanceType: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n currentBalance: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n availableBalance: {\n type: ScalarTypeEnum.Float_unsecure(),\n isOptional: true,\n },\n currency: { type: ScalarTypeEnum.Currency(), isOptional: false },\n lastUpdatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n metadata: { type: ScalarTypeEnum.JSONObject(), isOptional: true },\n },\n});\n\n\n\n"],"mappings":"sLAKA,MAAa,EAAoB,IAAI,EAAY,CAC/C,KAAM,oBACN,YACE,mFACF,OAAQ,CACN,GAAI,CAAE,KAAM,EAAe,IAAI,CAAE,WAAY,GAAO,CACpD,SAAU,CAAE,KAAM,EAAe,IAAI,CAAE,WAAY,GAAO,CAC1D,OAAQ,CAAE,KAAM,EAAe,I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E,WAAY,GAAO,CACpD,UAAW,CAAE,KAAM,EAAe,IAAI,CAAE,WAAY,GAAO,CAC3D,SAAU,CAAE,KAAM,EAAe,IAAI,CAAE,WAAY,GAAO,CAC1D,aAAc,CAAE,KAAM,EAAe,IAAI,CAAE,WAAY,GAAO,CAC9D,YAAa,CAAE,KAAM,EAAe,gBAAgB,CAAE,WAAY,GAAO,CACzE,eAAgB,CAAE,KAAM,EAAe,gBAAgB,CAAE,WAAY,GAAO,CAC5E,iBAAkB,CAChB,KAAM,EAAe,gBAAgB,CACrC,WAAY,GACb,CACD,SAAU,CAAE,KAAM,EAAe,UAAU,CAAE,WAAY,GAAO,CAChE,cAAe,CAAE,KAAM,EAAe,UAAU,CAAE,WAAY,GAAO,CACrE,UAAW,CAAE,KAAM,EAAe,UAAU,CAAE,WAAY,GAAO,CACjE,SAAU,CAAE,KAAM,EAAe,YAAY,CAAE,WAAY,GAAM,CAClE,CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"models.js","names":[],"sources":["../../../../../../contracts/src/integrations/openbanking/models.ts"],"sourcesContent":["import {\n ScalarTypeEnum,\n SchemaModel,\n} from '@lssm/lib.schema';\n\nexport const BankAccountRecord = new SchemaModel({\n name: 'BankAccountRecord',\n description:\n 'Canonical representation of a bank account synced from an open banking provider.',\n fields: {\n id: { type: ScalarTypeEnum.ID(), isOptional: false },\n tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },\n userId: { type: ScalarTypeEnum.ID(), isOptional: false },\n connectionId: { type: ScalarTypeEnum.ID(), isOptional: false },\n externalId: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n institutionId: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n institutionName: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n institutionLogoUrl: { type: ScalarTypeEnum.URL(), isOptional: true },\n iban: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n bic: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n accountType: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n currency: { type: ScalarTypeEnum.Currency(), isOptional: false },\n displayName: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n accountNumberMasked: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n productCode: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n balance: { type: ScalarTypeEnum.Float_unsecure(), isOptional: true },\n availableBalance: { type: ScalarTypeEnum.Float_unsecure(), isOptional: true },\n lastSyncedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n metadata: { type: ScalarTypeEnum.JSONObject(), isOptional: true },\n },\n});\n\nexport const BankTransactionRecord = new SchemaModel({\n name: 'BankTransactionRecord',\n description:\n 'Canonical transaction entry mapped from Powens into the open banking ledger.',\n fields: {\n id: { type: ScalarTypeEnum.ID(), isOptional: false },\n accountId: { type: ScalarTypeEnum.ID(), isOptional: false },\n tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },\n connectionId: { type: ScalarTypeEnum.ID(), isOptional: false },\n externalId: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n currency: { type: ScalarTypeEnum.Currency(), isOptional: false },\n date: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n bookingDate: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n valueDate: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n counterpartyName: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n counterpartyAccount: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n merchantCategoryCode: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n rawCategory: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n standardizedCategory: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n transactionType: {\n type: ScalarTypeEnum.NonEmptyString(),\n isOptional: false,\n },\n status: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n runningBalance: { type: ScalarTypeEnum.Float_unsecure(), isOptional: true },\n metadata: { type: ScalarTypeEnum.JSONObject(), isOptional: true },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const AccountBalanceRecord = new SchemaModel({\n name: 'AccountBalanceRecord',\n description:\n 'Canonical balance snapshot computed from Powens balance payloads.',\n fields: {\n id: { type: ScalarTypeEnum.ID(), isOptional: false },\n accountId: { type: ScalarTypeEnum.ID(), isOptional: false },\n tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },\n connectionId: { type: ScalarTypeEnum.ID(), isOptional: false },\n balanceType: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n currentBalance: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n availableBalance: {\n type: ScalarTypeEnum.Float_unsecure(),\n isOptional: true,\n },\n currency: { type: ScalarTypeEnum.Currency(), isOptional: false },\n lastUpdatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n metadata: { type: ScalarTypeEnum.JSONObject(), isOptional: true },\n },\n});\n\n\n\n\n\n"],"mappings":"sLAKA,MAAa,EAAoB,IAAI,EAAY,CAC/C,KAAM,oBACN,YACE,mFACF,OAAQ,CACN,GAAI,CAAE,KAAM,EAAe,IAAI,CAAE,WAAY,GAAO,CACpD,SAAU,CAAE,KAAM,EAAe,IAAI,CAAE,WAAY,GAAO,CAC1D,OAAQ,CAAE,KAAM,EAAe,IAAI,CAAE,WAAY,GAAO,CACxD,aAAc,CAAE,KAAM,EAAe,IAAI,CAAE,WAAY,GAAO,CAC9D,WAAY,CAAE,KAAM,EAAe,gBAAgB,CAAE,WAAY,GAAO,CACxE,cAAe,CAAE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Ae,IAAI,CAAE,WAAY,GAAO,CAC9D,YAAa,CAAE,KAAM,EAAe,gBAAgB,CAAE,WAAY,GAAO,CACzE,eAAgB,CAAE,KAAM,EAAe,gBAAgB,CAAE,WAAY,GAAO,CAC5E,iBAAkB,CAChB,KAAM,EAAe,gBAAgB,CACrC,WAAY,GACb,CACD,SAAU,CAAE,KAAM,EAAe,UAAU,CAAE,WAAY,GAAO,CAChE,cAAe,CAAE,KAAM,EAAe,UAAU,CAAE,WAAY,GAAO,CACrE,UAAW,CAAE,KAAM,EAAe,UAAU,CAAE,WAAY,GAAO,CACjE,SAAU,CAAE,KAAM,EAAe,YAAY,CAAE,WAAY,GAAM,CAClE,CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.js","names":[],"sources":["../../../../../../contracts/src/integrations/openbanking/telemetry.ts"],"sourcesContent":["export const OPENBANKING_PII_FIELDS = [\n 'iban',\n 'bic',\n 'accountNumberMasked',\n 'accountNumber',\n 'counterpartyName',\n 'counterpartyAccount',\n 'description',\n 'merchantName',\n 'merchantCategoryCode',\n 'reference',\n] as const;\n\nexport const OPENBANKING_TELEMETRY_EVENTS = {\n accountsSynced: 'openbanking.accounts.synced',\n accountsSyncFailed: 'openbanking.accounts.sync_failed',\n transactionsSynced: 'openbanking.transactions.synced',\n transactionsSyncFailed: 'openbanking.transactions.sync_failed',\n balancesRefreshed: 'openbanking.balances.refreshed',\n balancesRefreshFailed: 'openbanking.balances.refresh_failed',\n overviewGenerated: 'openbanking.overview.generated',\n} as const;\n\nexport type OpenBankingTelemetryEvent =\n (typeof OPENBANKING_TELEMETRY_EVENTS)[keyof typeof OPENBANKING_TELEMETRY_EVENTS];\n\nexport function redactOpenBankingTelemetryPayload<\n T extends Record<string, unknown>\n>(payload: T): T {\n const redacted: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(payload)) {\n if (OPENBANKING_PII_FIELDS.includes(key as (typeof OPENBANKING_PII_FIELDS)[number])) {\n redacted[key] = maskValue(value);\n } else if (Array.isArray(value)) {\n redacted[key] = value.map((item) =>\n typeof item === 'object' && item !== null\n ? redactOpenBankingTelemetryPayload(item as Record<string, unknown>)\n : item\n );\n } else if (typeof value === 'object' && value !== null) {\n redacted[key] = redactOpenBankingTelemetryPayload(\n value as Record<string, unknown>\n );\n } else {\n redacted[key] = value;\n }\n }\n return redacted as T;\n}\n\nfunction maskValue(value: unknown): string {\n if (value == null) return '';\n const str = String(value);\n if (str.length <= 4) return '*'.repeat(str.length);\n return `${'*'.repeat(Math.max(str.length - 4, 0))}${str.slice(-4)}`;\n}\n\n\n"],"mappings":"AAaA,MAAa,EAA+B,CAC1C,eAAgB,8BAChB,mBAAoB,mCACpB,mBAAoB,kCACpB,uBAAwB,uCACxB,kBAAmB,iCACnB,sBAAuB,sCACvB,kBAAmB,iCACpB"}
|
|
1
|
+
{"version":3,"file":"telemetry.js","names":[],"sources":["../../../../../../contracts/src/integrations/openbanking/telemetry.ts"],"sourcesContent":["export const OPENBANKING_PII_FIELDS = [\n 'iban',\n 'bic',\n 'accountNumberMasked',\n 'accountNumber',\n 'counterpartyName',\n 'counterpartyAccount',\n 'description',\n 'merchantName',\n 'merchantCategoryCode',\n 'reference',\n] as const;\n\nexport const OPENBANKING_TELEMETRY_EVENTS = {\n accountsSynced: 'openbanking.accounts.synced',\n accountsSyncFailed: 'openbanking.accounts.sync_failed',\n transactionsSynced: 'openbanking.transactions.synced',\n transactionsSyncFailed: 'openbanking.transactions.sync_failed',\n balancesRefreshed: 'openbanking.balances.refreshed',\n balancesRefreshFailed: 'openbanking.balances.refresh_failed',\n overviewGenerated: 'openbanking.overview.generated',\n} as const;\n\nexport type OpenBankingTelemetryEvent =\n (typeof OPENBANKING_TELEMETRY_EVENTS)[keyof typeof OPENBANKING_TELEMETRY_EVENTS];\n\nexport function redactOpenBankingTelemetryPayload<\n T extends Record<string, unknown>\n>(payload: T): T {\n const redacted: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(payload)) {\n if (OPENBANKING_PII_FIELDS.includes(key as (typeof OPENBANKING_PII_FIELDS)[number])) {\n redacted[key] = maskValue(value);\n } else if (Array.isArray(value)) {\n redacted[key] = value.map((item) =>\n typeof item === 'object' && item !== null\n ? redactOpenBankingTelemetryPayload(item as Record<string, unknown>)\n : item\n );\n } else if (typeof value === 'object' && value !== null) {\n redacted[key] = redactOpenBankingTelemetryPayload(\n value as Record<string, unknown>\n );\n } else {\n redacted[key] = value;\n }\n }\n return redacted as T;\n}\n\nfunction maskValue(value: unknown): string {\n if (value == null) return '';\n const str = String(value);\n if (str.length <= 4) return '*'.repeat(str.length);\n return `${'*'.repeat(Math.max(str.length - 4, 0))}${str.slice(-4)}`;\n}\n\n\n\n\n"],"mappings":"AAaA,MAAa,EAA+B,CAC1C,eAAgB,8BAChB,mBAAoB,mCACpB,mBAAoB,kCACpB,uBAAwB,uCACxB,kBAAmB,iCACnB,sBAAuB,sCACvB,kBAAmB,iCACpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"powens.js","names":["powensIntegrationSpec: IntegrationSpec"],"sources":["../../../../../../contracts/src/integrations/providers/powens.ts"],"sourcesContent":["import { StabilityEnum } from '../../ownership';\nimport type { IntegrationSpec } from '../spec';\nimport type { IntegrationSpecRegistry } from '../spec';\n\nexport const powensIntegrationSpec: IntegrationSpec = {\n meta: {\n key: 'openbanking.powens',\n version: 1,\n category: 'open-banking',\n displayName: 'Powens Open Banking',\n title: 'Powens Open Banking (Read)',\n description:\n 'Read-only Open Banking integration powered by Powens, exposing accounts, transactions, and balances.',\n domain: 'finance',\n owners: ['platform.finance'],\n tags: ['open-banking', 'powens', 'finance'],\n stability: StabilityEnum.Experimental,\n },\n supportedModes: ['byok'],\n capabilities: {\n provides: [\n { key: 'openbanking.accounts.read', version: 1 },\n { key: 'openbanking.transactions.read', version: 1 },\n { key: 'openbanking.balances.read', version: 1 },\n ],\n },\n configSchema: {\n schema: {\n type: 'object',\n required: ['environment'],\n properties: {\n environment: {\n type: 'string',\n enum: ['sandbox', 'production'],\n description:\n 'Powens environment to target. Sandbox uses Powens test API base URL, production uses live endpoints.',\n },\n baseUrl: {\n type: 'string',\n description:\n 'Optional override for the Powens API base URL. Defaults to Powens environment defaults.',\n },\n region: {\n type: 'string',\n description:\n 'Optional Powens region identifier when targeting a specific data residency cluster.',\n },\n pollingIntervalMs: {\n type: 'number',\n description:\n 'Optional custom polling interval in milliseconds for background sync jobs (defaults to platform standard).',\n },\n },\n },\n example: {\n environment: 'sandbox',\n baseUrl: 'https://api-sandbox.powens.com/v2',\n region: 'eu-west-1',\n pollingIntervalMs: 300000,\n },\n },\n secretSchema: {\n schema: {\n type: 'object',\n required: ['clientId', 'clientSecret'],\n properties: {\n clientId: {\n type: 'string',\n description:\n 'Powens OAuth client identifier obtained from the Powens Console (BYOK project).',\n },\n clientSecret: {\n type: 'string',\n description:\n 'Powens OAuth client secret used to exchange for access tokens.',\n },\n apiKey: {\n type: 'string',\n description:\n 'Optional Powens API key (if the tenant project exposes a dedicated API token).',\n },\n webhookSecret: {\n type: 'string',\n description:\n 'Optional webhook signing secret used to verify Powens webhook payloads.',\n },\n },\n },\n example: {\n clientId: 'powens-client-id',\n clientSecret: 'powens-client-secret',\n apiKey: 'powens-api-key',\n webhookSecret: 'powens-webhook-secret',\n },\n },\n healthCheck: {\n method: 'ping',\n timeoutMs: 8000,\n },\n docsUrl: 'https://docs.powens.com/',\n constraints: {\n rateLimit: {\n rph: 10000,\n rpm: 600,\n },\n },\n byokSetup: {\n setupInstructions:\n 'Create a Powens BYOK project, generate OAuth credentials, and optionally configure webhook delivery for account/transaction updates.',\n requiredScopes: ['accounts:read', 'transactions:read', 'balances:read'],\n },\n};\n\nexport function registerPowensIntegration(\n registry: IntegrationSpecRegistry\n): IntegrationSpecRegistry {\n return registry.register(powensIntegrationSpec);\n}\n\n\n"],"mappings":"mDAgBe,EAAc"}
|
|
1
|
+
{"version":3,"file":"powens.js","names":["powensIntegrationSpec: IntegrationSpec"],"sources":["../../../../../../contracts/src/integrations/providers/powens.ts"],"sourcesContent":["import { StabilityEnum } from '../../ownership';\nimport type { IntegrationSpec } from '../spec';\nimport type { IntegrationSpecRegistry } from '../spec';\n\nexport const powensIntegrationSpec: IntegrationSpec = {\n meta: {\n key: 'openbanking.powens',\n version: 1,\n category: 'open-banking',\n displayName: 'Powens Open Banking',\n title: 'Powens Open Banking (Read)',\n description:\n 'Read-only Open Banking integration powered by Powens, exposing accounts, transactions, and balances.',\n domain: 'finance',\n owners: ['platform.finance'],\n tags: ['open-banking', 'powens', 'finance'],\n stability: StabilityEnum.Experimental,\n },\n supportedModes: ['byok'],\n capabilities: {\n provides: [\n { key: 'openbanking.accounts.read', version: 1 },\n { key: 'openbanking.transactions.read', version: 1 },\n { key: 'openbanking.balances.read', version: 1 },\n ],\n },\n configSchema: {\n schema: {\n type: 'object',\n required: ['environment'],\n properties: {\n environment: {\n type: 'string',\n enum: ['sandbox', 'production'],\n description:\n 'Powens environment to target. Sandbox uses Powens test API base URL, production uses live endpoints.',\n },\n baseUrl: {\n type: 'string',\n description:\n 'Optional override for the Powens API base URL. Defaults to Powens environment defaults.',\n },\n region: {\n type: 'string',\n description:\n 'Optional Powens region identifier when targeting a specific data residency cluster.',\n },\n pollingIntervalMs: {\n type: 'number',\n description:\n 'Optional custom polling interval in milliseconds for background sync jobs (defaults to platform standard).',\n },\n },\n },\n example: {\n environment: 'sandbox',\n baseUrl: 'https://api-sandbox.powens.com/v2',\n region: 'eu-west-1',\n pollingIntervalMs: 300000,\n },\n },\n secretSchema: {\n schema: {\n type: 'object',\n required: ['clientId', 'clientSecret'],\n properties: {\n clientId: {\n type: 'string',\n description:\n 'Powens OAuth client identifier obtained from the Powens Console (BYOK project).',\n },\n clientSecret: {\n type: 'string',\n description:\n 'Powens OAuth client secret used to exchange for access tokens.',\n },\n apiKey: {\n type: 'string',\n description:\n 'Optional Powens API key (if the tenant project exposes a dedicated API token).',\n },\n webhookSecret: {\n type: 'string',\n description:\n 'Optional webhook signing secret used to verify Powens webhook payloads.',\n },\n },\n },\n example: {\n clientId: 'powens-client-id',\n clientSecret: 'powens-client-secret',\n apiKey: 'powens-api-key',\n webhookSecret: 'powens-webhook-secret',\n },\n },\n healthCheck: {\n method: 'ping',\n timeoutMs: 8000,\n },\n docsUrl: 'https://docs.powens.com/',\n constraints: {\n rateLimit: {\n rph: 10000,\n rpm: 600,\n },\n },\n byokSetup: {\n setupInstructions:\n 'Create a Powens BYOK project, generate OAuth credentials, and optionally configure webhook delivery for account/transaction updates.',\n requiredScopes: ['accounts:read', 'transactions:read', 'balances:read'],\n },\n};\n\nexport function registerPowensIntegration(\n registry: IntegrationSpecRegistry\n): IntegrationSpecRegistry {\n return registry.register(powensIntegrationSpec);\n}\n\n\n\n\n"],"mappings":"mDAgBe,EAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.js","names":[],"sources":["../../../../../contracts/src/knowledge/contracts.ts"],"sourcesContent":["import {\n ScalarTypeEnum,\n SchemaModel,\n} from '@lssm/lib.schema';\nimport {\n defineCommand,\n defineQuery,\n type ContractSpec,\n} from '../spec';\nimport type { SpecRegistry } from '../registry';\n\nconst KnowledgeSyncSchedule = new SchemaModel({\n name: 'KnowledgeSyncSchedule',\n fields: {\n enabled: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n cron: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n intervalMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n },\n});\n\nconst KnowledgeSourceRecord = new SchemaModel({\n name: 'KnowledgeSourceRecord',\n fields: {\n id: { type: ScalarTypeEnum.ID(), isOptional: false },\n tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },\n spaceKey: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n spaceVersion: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n label: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n sourceType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n syncSchedule: { type: KnowledgeSyncSchedule, isOptional: true },\n lastSyncStatus: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n lastSyncAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n itemsProcessed: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n },\n});\n\nconst CreateKnowledgeSourceInput = new SchemaModel({\n name: 'CreateKnowledgeSourceInput',\n fields: {\n tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },\n spaceKey: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n spaceVersion: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n label: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n sourceType: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n config: { type: ScalarTypeEnum.JSONObject(), isOptional: false },\n syncSchedule: { type: KnowledgeSyncSchedule, isOptional: true },\n },\n});\n\nconst UpdateKnowledgeSourceInput = new SchemaModel({\n name: 'UpdateKnowledgeSourceInput',\n fields: {\n sourceId: { type: ScalarTypeEnum.ID(), isOptional: false },\n label: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n config: { type: ScalarTypeEnum.JSONObject(), isOptional: true },\n syncSchedule: { type: KnowledgeSyncSchedule, isOptional: true },\n },\n});\n\nconst DeleteKnowledgeSourceInput = new SchemaModel({\n name: 'DeleteKnowledgeSourceInput',\n fields: {\n sourceId: { type: ScalarTypeEnum.ID(), isOptional: false },\n },\n});\n\nconst DeleteKnowledgeSourceOutput = new SchemaModel({\n name: 'DeleteKnowledgeSourceOutput',\n fields: {\n success: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n },\n});\n\nconst ListKnowledgeSourcesInput = new SchemaModel({\n name: 'ListKnowledgeSourcesInput',\n fields: {\n tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },\n spaceKey: { type: ScalarTypeEnum.NonEmptyString(), isOptional: true },\n },\n});\n\nconst ListKnowledgeSourcesOutput = new SchemaModel({\n name: 'ListKnowledgeSourcesOutput',\n fields: {\n sources: {\n type: KnowledgeSourceRecord,\n isOptional: false,\n isArray: true,\n },\n },\n});\n\nconst TriggerKnowledgeSyncInput = new SchemaModel({\n name: 'TriggerKnowledgeSyncInput',\n fields: {\n sourceId: { type: ScalarTypeEnum.ID(), isOptional: false },\n },\n});\n\nconst TriggerKnowledgeSyncOutput = new SchemaModel({\n name: 'TriggerKnowledgeSyncOutput',\n fields: {\n success: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n itemsProcessed: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n error: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\nexport const CreateKnowledgeSource = defineCommand({\n meta: {\n name: 'knowledge.source.create',\n version: 1,\n description: 'Create a knowledge source binding for a tenant.',\n goal: 'Onboard a new knowledge ingestion source such as Notion or uploads.',\n context:\n 'Used by Ops and App Studio to configure knowledge ingestion per tenant and space.',\n owners: ['platform.knowledge'],\n tags: ['knowledge', 'sources'],\n stability: 'experimental',\n },\n io: {\n input: CreateKnowledgeSourceInput,\n output: KnowledgeSourceRecord,\n },\n policy: {\n auth: 'admin',\n policies: [{ name: 'platform.knowledge.manage', version: 1 }],\n },\n});\n\nexport const UpdateKnowledgeSource = defineCommand({\n meta: {\n name: 'knowledge.source.update',\n version: 1,\n description: 'Update metadata or configuration for a knowledge source.',\n goal: 'Allow rotation of credentials, sync schedules, and labels.',\n context:\n 'Supports editing how a tenant ingests knowledge (e.g., toggling sync cadence).',\n owners: ['platform.knowledge'],\n tags: ['knowledge', 'sources'],\n stability: 'experimental',\n },\n io: {\n input: UpdateKnowledgeSourceInput,\n output: KnowledgeSourceRecord,\n },\n policy: {\n auth: 'admin',\n policies: [{ name: 'platform.knowledge.manage', version: 1 }],\n },\n});\n\nexport const DeleteKnowledgeSource = defineCommand({\n meta: {\n name: 'knowledge.source.delete',\n version: 1,\n description: 'Delete a knowledge source binding for a tenant.',\n goal: 'Remove obsolete or compromised knowledge ingestion paths.',\n context:\n 'Ensures ephemeral or external sources can be removed cleanly without leaving residual bindings.',\n owners: ['platform.knowledge'],\n tags: ['knowledge', 'sources'],\n stability: 'experimental',\n },\n io: {\n input: DeleteKnowledgeSourceInput,\n output: DeleteKnowledgeSourceOutput,\n },\n policy: {\n auth: 'admin',\n policies: [{ name: 'platform.knowledge.manage', version: 1 }],\n },\n});\n\nexport const ListKnowledgeSources = defineQuery({\n meta: {\n name: 'knowledge.source.list',\n version: 1,\n description: 'List knowledge sources configured for a tenant.',\n goal: 'Provide visibility into knowledge ingest configuration and schedules.',\n context:\n 'Used by App Studio and Ops flows to surface knowledge sources and their health.',\n owners: ['platform.knowledge'],\n tags: ['knowledge', 'sources'],\n stability: 'experimental',\n },\n io: {\n input: ListKnowledgeSourcesInput,\n output: ListKnowledgeSourcesOutput,\n },\n policy: {\n auth: 'admin',\n policies: [{ name: 'platform.knowledge.read', version: 1 }],\n },\n});\n\nexport const TriggerKnowledgeSourceSync = defineCommand({\n meta: {\n name: 'knowledge.source.triggerSync',\n version: 1,\n description: 'Trigger an immediate sync for a knowledge source.',\n goal: 'Support manual or automated sync retries for knowledge ingestion.',\n context:\n 'Invoked by Ops tooling or monitors when knowledge content must be refreshed or reprocessed.',\n owners: ['platform.knowledge'],\n tags: ['knowledge', 'sources'],\n stability: 'experimental',\n },\n io: {\n input: TriggerKnowledgeSyncInput,\n output: TriggerKnowledgeSyncOutput,\n },\n policy: {\n auth: 'admin',\n policies: [{ name: 'platform.knowledge.manage', version: 1 }],\n },\n});\n\nexport const knowledgeContracts: Record<string, ContractSpec<any, any>> = {\n CreateKnowledgeSource,\n UpdateKnowledgeSource,\n DeleteKnowledgeSource,\n ListKnowledgeSources,\n TriggerKnowledgeSourceSync,\n};\n\nexport function registerKnowledgeContracts(registry: SpecRegistry) {\n return registry\n .register(CreateKnowledge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9B,KAAM,CAAC,YAAa,UAAU,CAC9B,UAAW,eACZ,CACD,GAAI,CACF,MAAO,EACP,OAAQ,EACT,CACD,OAAQ,CACN,KAAM,QACN,SAAU,CAAC,CAAE,KAAM,0BAA2B,QAAS,EAAG,CAAC,CAC5D,CACF,CAAC,CAEwC,EAAc,CACtD,KAAM,CACJ,KAAM,+BACN,QAAS,EACT,YAAa,oDACb,KAAM,oEACN,QACE,8FACF,OAAQ,CAAC,qBAAqB,CAC9B,KAAM,CAAC,YAAa,UAAU,CAC9B,UAAW,eACZ,CACD,GAAI,CACF,MAAO,EACP,OAAQ,EACT,CACD,OAAQ,CACN,KAAM,QACN,SAAU,CAAC,CAAE,KAAM,4BAA6B,QAAS,EAAG,CAAC,CAC9D,CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"contracts.js","names":[],"sources":["../../../../../contracts/src/knowledge/contracts.ts"],"sourcesContent":["import {\n ScalarTypeEnum,\n SchemaModel,\n} from '@lssm/lib.schema';\nimport {\n defineCommand,\n defineQuery,\n type ContractSpec,\n} from '../spec';\nimport type { SpecRegistry } from '../registry';\n\nconst KnowledgeSyncSchedule = new SchemaModel({\n name: 'KnowledgeSyncSchedule',\n fields: {\n enabled: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n cron: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n intervalMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n },\n});\n\nconst KnowledgeSourceRecord = new SchemaModel({\n name: 'KnowledgeSourceRecord',\n fields: {\n id: { type: ScalarTypeEnum.ID(), isOptional: false },\n tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },\n spaceKey: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n spaceVersion: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n label: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n sourceType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n syncSchedule: { type: KnowledgeSyncSchedule, isOptional: true },\n lastSyncStatus: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n lastSyncAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n itemsProcessed: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n },\n});\n\nconst CreateKnowledgeSourceInput = new SchemaModel({\n name: 'CreateKnowledgeSourceInput',\n fields: {\n tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },\n spaceKey: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n spaceVersion: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n label: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n sourceType: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n config: { type: ScalarTypeEnum.JSONObject(), isOptional: false },\n syncSchedule: { type: KnowledgeSyncSchedule, isOptional: true },\n },\n});\n\nconst UpdateKnowledgeSourceInput = new SchemaModel({\n name: 'UpdateKnowledgeSourceInput',\n fields: {\n sourceId: { type: ScalarTypeEnum.ID(), isOptional: false },\n label: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n config: { type: ScalarTypeEnum.JSONObject(), isOptional: true },\n syncSchedule: { type: KnowledgeSyncSchedule, isOptional: true },\n },\n});\n\nconst DeleteKnowledgeSourceInput = new SchemaModel({\n name: 'DeleteKnowledgeSourceInput',\n fields: {\n sourceId: { type: ScalarTypeEnum.ID(), isOptional: false },\n },\n});\n\nconst DeleteKnowledgeSourceOutput = new SchemaModel({\n name: 'DeleteKnowledgeSourceOutput',\n fields: {\n success: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n },\n});\n\nconst ListKnowledgeSourcesInput = new SchemaModel({\n name: 'ListKnowledgeSourcesInput',\n fields: {\n tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },\n spaceKey: { type: ScalarTypeEnum.NonEmptyString(), isOptional: true },\n },\n});\n\nconst ListKnowledgeSourcesOutput = new SchemaModel({\n name: 'ListKnowledgeSourcesOutput',\n fields: {\n sources: {\n type: KnowledgeSourceRecord,\n isOptional: false,\n isArray: true,\n },\n },\n});\n\nconst TriggerKnowledgeSyncInput = new SchemaModel({\n name: 'TriggerKnowledgeSyncInput',\n fields: {\n sourceId: { type: ScalarTypeEnum.ID(), isOptional: false },\n },\n});\n\nconst TriggerKnowledgeSyncOutput = new SchemaModel({\n name: 'TriggerKnowledgeSyncOutput',\n fields: {\n success: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n itemsProcessed: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n error: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\nexport const CreateKnowledgeSource = defineCommand({\n meta: {\n name: 'knowledge.source.create',\n version: 1,\n description: 'Create a knowledge source binding for a tenant.',\n goal: 'Onboard a new knowledge ingestion source such as Notion or uploads.',\n context:\n 'Used by Ops and App Studio to configure knowledge ingestion per tenant and space.',\n owners: ['platform.knowledge'],\n tags: ['knowledge', 'sources'],\n stability: 'experimental',\n },\n io: {\n input: CreateKnowledgeSourceInput,\n output: KnowledgeSourceRecord,\n },\n policy: {\n auth: 'admin',\n policies: [{ name: 'platform.knowledge.manage', version: 1 }],\n },\n});\n\nexport const UpdateKnowledgeSource = defineCommand({\n meta: {\n name: 'knowledge.source.update',\n version: 1,\n description: 'Update metadata or configuration for a knowledge source.',\n goal: 'Allow rotation of credentials, sync schedules, and labels.',\n context:\n 'Supports editing how a tenant ingests knowledge (e.g., toggling sync cadence).',\n owners: ['platform.knowledge'],\n tags: ['knowledge', 'sources'],\n stability: 'experimental',\n },\n io: {\n input: UpdateKnowledgeSourceInput,\n output: KnowledgeSourceRecord,\n },\n policy: {\n auth: 'admin',\n policies: [{ name: 'platform.knowledge.manage', version: 1 }],\n },\n});\n\nexport const DeleteKnowledgeSource = defineCommand({\n meta: {\n name: 'knowledge.source.delete',\n version: 1,\n description: 'Delete a knowledge source binding for a tenant.',\n goal: 'Remove obsolete or compromised knowledge ingestion paths.',\n context:\n 'Ensures ephemeral or external sources can be removed cleanly without leaving residual bindings.',\n owners: ['platform.knowledge'],\n tags: ['knowledge', 'sources'],\n stability: 'experimental',\n },\n io: {\n input: DeleteKnowledgeSourceInput,\n output: DeleteKnowledgeSourceOutput,\n },\n policy: {\n auth: 'admin',\n policies: [{ name: 'platform.knowledge.manage', version: 1 }],\n },\n});\n\nexport const ListKnowledgeSources = defineQuery({\n meta: {\n name: 'knowledge.source.list',\n version: 1,\n description: 'List knowledge sources configured for a tenant.',\n goal: 'Provide visibility into knowledge ingest configuration and schedules.',\n context:\n 'Used by App Studio and Ops flows to surface knowledge sources and their health.',\n owners: ['platform.knowledge'],\n tags: ['knowledge', 'sources'],\n stability: 'experimental',\n },\n io: {\n input: ListKnowledgeSourcesInput,\n output: ListKnowledgeSourcesOutput,\n },\n policy: {\n auth: 'admin',\n policies: [{ name: 'platform.knowledge.read', version: 1 }],\n },\n});\n\nexport const TriggerKnowledgeSourceSync = defineCommand({\n meta: {\n name: 'knowledge.source.triggerSync',\n version: 1,\n description: 'Trigger an immediate sync for a knowledge source.',\n goal: 'Support manual or automated sync retries for knowledge ingestion.',\n context:\n 'Invoked by Ops tooling or monitors when knowledge content must be refreshed or reprocessed.',\n owners: ['platform.knowledge'],\n tags: ['knowledge', 'sources'],\n stability: 'experimental',\n },\n io: {\n input: TriggerKnowledgeSyncInput,\n output: TriggerKnowledgeSyncOutput,\n },\n policy: {\n auth: 'admin',\n policies: [{ name: 'platform.knowledge.manage', version: 1 }],\n },\n});\n\nexport const knowledgeContracts: Record<string, ContractSpec<any, any>> = {\n CreateKnowledgeSource,\n UpdateKnowledgeSource,\n DeleteKnowledgeSource,\n ListKnowledgeSources,\n TriggerKnowledgeSourceSync,\n};\n\nexport function registerKnowledgeContracts(registry: SpecRegistry) {\n return registry\n .register(CreateKnowledgeSource)\n .register(UpdateKnowledgeSource)\n .register(DeleteKnowledgeSource)\n .register(List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,GAAI,CACF,MAAO,EACP,OAAQ,EACT,CACD,OAAQ,CACN,KAAM,QACN,SAAU,CAAC,CAAE,KAAM,0BAA2B,QAAS,EAAG,CAAC,CAC5D,CACF,CAAC,CAEwC,EAAc,CACtD,KAAM,CACJ,KAAM,+BACN,QAAS,EACT,YAAa,oDACb,KAAM,oEACN,QACE,8FACF,OAAQ,CAAC,qBAAqB,CAC9B,KAAM,CAAC,YAAa,UAAU,CAC9B,UAAW,eACZ,CACD,GAAI,CACF,MAAO,EACP,OAAQ,EACT,CACD,OAAQ,CACN,KAAM,QACN,SAAU,CAAC,CAAE,KAAM,4BAA6B,QAAS,EAAG,CAAC,CAC9D,CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-canon.js","names":["productCanonKnowledgeSpace: KnowledgeSpaceSpec"],"sources":["../../../../../../contracts/src/knowledge/spaces/product-canon.ts"],"sourcesContent":["import { StabilityEnum } from '../../ownership';\nimport type { KnowledgeSpaceRegistry, KnowledgeSpaceSpec } from '../spec';\n\nexport const productCanonKnowledgeSpace: KnowledgeSpaceSpec = {\n meta: {\n key: 'knowledge.product-canon',\n version: 1,\n category: 'canonical',\n displayName: 'Product Canon',\n title: 'Product Canon Knowledge Space',\n description:\n 'Authoritative product knowledge covering strategy, roadmap, and delivery canon.',\n domain: 'product',\n owners: ['platform.product'],\n tags: ['knowledge', 'product'],\n stability: StabilityEnum.Stable,\n },\n retention: {\n ttlDays: null,\n },\n access: {\n policy: { name: 'knowledge.access.product-canon', version: 1 },\n trustLevel: 'high',\n automationWritable: false,\n },\n indexing: {\n embeddingModel: 'text-embedding-3-large',\n chunkSize: 800,\n vectorDbIntegration: 'vectordb.qdrant',\n },\n description:\n 'Single source of truth for product canon, principles, and strategic narratives.',\n};\n\nexport function registerProductCanonKnowledgeSpace(\n registry: KnowledgeSpaceRegistry\n): KnowledgeSpaceRegistry {\n return registry.register(productCanonKnowledgeSpace);\n}\n\n\n\n\n"],"mappings":"mDAee,EAAc"}
|
|
1
|
+
{"version":3,"file":"product-canon.js","names":["productCanonKnowledgeSpace: KnowledgeSpaceSpec"],"sources":["../../../../../../contracts/src/knowledge/spaces/product-canon.ts"],"sourcesContent":["import { StabilityEnum } from '../../ownership';\nimport type { KnowledgeSpaceRegistry, KnowledgeSpaceSpec } from '../spec';\n\nexport const productCanonKnowledgeSpace: KnowledgeSpaceSpec = {\n meta: {\n key: 'knowledge.product-canon',\n version: 1,\n category: 'canonical',\n displayName: 'Product Canon',\n title: 'Product Canon Knowledge Space',\n description:\n 'Authoritative product knowledge covering strategy, roadmap, and delivery canon.',\n domain: 'product',\n owners: ['platform.product'],\n tags: ['knowledge', 'product'],\n stability: StabilityEnum.Stable,\n },\n retention: {\n ttlDays: null,\n },\n access: {\n policy: { name: 'knowledge.access.product-canon', version: 1 },\n trustLevel: 'high',\n automationWritable: false,\n },\n indexing: {\n embeddingModel: 'text-embedding-3-large',\n chunkSize: 800,\n vectorDbIntegration: 'vectordb.qdrant',\n },\n description:\n 'Single source of truth for product canon, principles, and strategic narratives.',\n};\n\nexport function registerProductCanonKnowledgeSpace(\n registry: KnowledgeSpaceRegistry\n): KnowledgeSpaceRegistry {\n return registry.register(productCanonKnowledgeSpace);\n}\n\n\n\n\n\n\n"],"mappings":"mDAee,EAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"support-faq.js","names":["supportFaqKnowledgeSpace: KnowledgeSpaceSpec"],"sources":["../../../../../../contracts/src/knowledge/spaces/support-faq.ts"],"sourcesContent":["import { StabilityEnum } from '../../ownership';\nimport type { KnowledgeSpaceRegistry, KnowledgeSpaceSpec } from '../spec';\n\nexport const supportFaqKnowledgeSpace: KnowledgeSpaceSpec = {\n meta: {\n key: 'knowledge.support-faq',\n version: 1,\n category: 'operational',\n displayName: 'Support FAQ',\n title: 'Support & Success FAQ',\n description: 'Operational knowledge base for customer support and success.',\n domain: 'support',\n owners: ['platform.support'],\n tags: ['knowledge', 'support'],\n stability: StabilityEnum.Beta,\n },\n retention: {\n ttlDays: 365,\n archiveAfterDays: 180,\n },\n access: {\n policy: { name: 'knowledge.access.support', version: 1 },\n trustLevel: 'medium',\n automationWritable: true,\n },\n indexing: {\n embeddingModel: 'text-embedding-3-small',\n chunkSize: 700,\n vectorDbIntegration: 'vectordb.qdrant',\n },\n description:\n 'Operational FAQs, runbooks, and customer success playbooks augmented with automation updates.',\n};\n\nexport function registerSupportFaqKnowledgeSpace(\n registry: KnowledgeSpaceRegistry\n): KnowledgeSpaceRegistry {\n return registry.register(supportFaqKnowledgeSpace);\n}\n\n\n\n\n"],"mappings":"mDAce,EAAc"}
|
|
1
|
+
{"version":3,"file":"support-faq.js","names":["supportFaqKnowledgeSpace: KnowledgeSpaceSpec"],"sources":["../../../../../../contracts/src/knowledge/spaces/support-faq.ts"],"sourcesContent":["import { StabilityEnum } from '../../ownership';\nimport type { KnowledgeSpaceRegistry, KnowledgeSpaceSpec } from '../spec';\n\nexport const supportFaqKnowledgeSpace: KnowledgeSpaceSpec = {\n meta: {\n key: 'knowledge.support-faq',\n version: 1,\n category: 'operational',\n displayName: 'Support FAQ',\n title: 'Support & Success FAQ',\n description: 'Operational knowledge base for customer support and success.',\n domain: 'support',\n owners: ['platform.support'],\n tags: ['knowledge', 'support'],\n stability: StabilityEnum.Beta,\n },\n retention: {\n ttlDays: 365,\n archiveAfterDays: 180,\n },\n access: {\n policy: { name: 'knowledge.access.support', version: 1 },\n trustLevel: 'medium',\n automationWritable: true,\n },\n indexing: {\n embeddingModel: 'text-embedding-3-small',\n chunkSize: 700,\n vectorDbIntegration: 'vectordb.qdrant',\n },\n description:\n 'Operational FAQs, runbooks, and customer success playbooks augmented with automation updates.',\n};\n\nexport function registerSupportFaqKnowledgeSpace(\n registry: KnowledgeSpaceRegistry\n): KnowledgeSpaceRegistry {\n return registry.register(supportFaqKnowledgeSpace);\n}\n\n\n\n\n\n\n"],"mappings":"mDAce,EAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","names":[],"sources":["../../../../../contracts/src/regenerator/service.ts"],"sourcesContent":["import { setTimeout as delay } from 'node:timers/promises';\nimport type {\n ProposalSink,\n RegeneratorSignal,\n RegenerationRule,\n RegenerationContext,\n SpecChangeProposal,\n} from './types';\nimport type { SignalAdapters } from './adapters';\nimport { telemetryToEnvelope, errorToEnvelope, behaviorToEnvelope } from './utils';\n\nexport interface RegeneratorOptions {\n contexts: RegenerationContext[];\n adapters: SignalAdapters;\n rules: RegenerationRule[];\n sink: ProposalSink;\n pollIntervalMs?: number;\n batchDurationMs?: number;\n clock?: () => Date;\n}\n\nconst DEFAULT_POLL_INTERVAL = 60_000;\nconst DEFAULT_BATCH_DURATION = 5 * 60_000;\n\nexport class RegeneratorService {\n private readonly contexts: Map<string, RegenerationContext>;\n private readonly lastPoll = new Map<string, Date>();\n private timer?: NodeJS.Timeout;\n private running = false;\n private readonly pollInterval: number;\n private readonly batchDuration: number;\n private readonly clock: () => Date;\n\n constructor(private readonly options: RegeneratorOptions) {\n this.contexts = new Map(\n options.contexts.map((ctx) => [ctx.id, ctx])\n );\n this.pollInterval = options.pollIntervalMs ?? DEFAULT_POLL_INTERVAL;\n this.batchDuration = options.batchDurationMs ?? DEFAULT_BATCH_DURATION;\n this.clock = options.clock ?? (() => new Date());\n if (this.options.rules.length === 0) {\n throw new Error('RegeneratorService requires at least one rule');\n }\n }\n\n start() {\n if (this.running) return;\n this.running = true;\n void this.tick();\n this.timer = setInterval(() => {\n void this.tick();\n }, this.pollInterval);\n }\n\n stop() {\n if (!this.running) return;\n this.running = false;\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = undefined;\n }\n }\n\n async runOnce(): Promise<void> {\n await this.tick();\n }\n\n private async tick(): Promise<void> {\n const now = this.clock();\n const sinceDefault = new Date(now.getTime() - this.batchDuration);\n for (const context of this.contexts.values()) {\n const last = this.lastPoll.get(context.id) ?? sinceDefault;\n await this.evaluateContext(context, last, now);\n this.lastPoll.set(context.id, now);\n }\n }\n\n private async evaluateContext(\n context: RegenerationContext,\n since: Date,\n until: Date\n ): Promise<void> {\n const signals = await this.collectSignals(context, since, until);\n if (signals.length === 0) return;\n\n for (const rule of this.options.rules) {\n let proposals: SpecChangeProposal[] = [];\n try {\n proposals = await rule.evaluate(context, signals);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(\n `[regenerator] rule ${rule.id} failed`,\n error instanceof Error ? error : new Error(String(error))\n );\n continue;\n }\n await this.flushProposals(context, proposals);\n }\n }\n\n private async collectSignals(\n context: RegenerationContext,\n since: Date,\n until: Date\n ): Promise<RegeneratorSignal[]> {\n const envelopes: RegeneratorSignal[] = [];\n const { adapters } = this.options;\n if (adapters.telemetry) {\n const telemetrySignals = await adapters.telemetry.pollTelemetry(\n context,\n since,\n until\n );\n envelopes.push(\n ...telemetrySignals.map((signal) =>\n telemetryToEnvelope(context.id, signal, this.clock)\n )\n );\n }\n if (adapters.errors) {\n const errorSignals = await adapters.errors.pollErrors(\n context,\n since,\n until\n );\n envelopes.push(\n ...errorSignals.map((signal) =>\n errorToEnvelope(context.id, signal, this.clock)\n )\n );\n }\n if (adapters.behavior) {\n const behaviorSignals = await adapters.behavior.pollBehavior(\n context,\n since,\n until\n );\n envelopes.push(\n ...behaviorSignals.map((signal) =>\n behaviorToEnvelope(context.id, signal, this.clock)\n )\n );\n }\n return envelopes;\n }\n\n private async flushProposals(\n context: RegenerationContext,\n proposals: SpecChangeProposal[]\n ): Promise<void> {\n for (const proposal of proposals) {\n if (proposal.signalIds.length === 0) continue;\n await this.options.sink.submit(context, proposal);\n // allow event loop to breathe when large volumes\n if (proposals.length > 10) {\n await delay(0);\n }\n }\n }\n}\n\n\n\n\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"service.js","names":[],"sources":["../../../../../contracts/src/regenerator/service.ts"],"sourcesContent":["import { setTimeout as delay } from 'node:timers/promises';\nimport type {\n ProposalSink,\n RegeneratorSignal,\n RegenerationRule,\n RegenerationContext,\n SpecChangeProposal,\n} from './types';\nimport type { SignalAdapters } from './adapters';\nimport { telemetryToEnvelope, errorToEnvelope, behaviorToEnvelope } from './utils';\n\nexport interface RegeneratorOptions {\n contexts: RegenerationContext[];\n adapters: SignalAdapters;\n rules: RegenerationRule[];\n sink: ProposalSink;\n pollIntervalMs?: number;\n batchDurationMs?: number;\n clock?: () => Date;\n}\n\nconst DEFAULT_POLL_INTERVAL = 60_000;\nconst DEFAULT_BATCH_DURATION = 5 * 60_000;\n\nexport class RegeneratorService {\n private readonly contexts: Map<string, RegenerationContext>;\n private readonly lastPoll = new Map<string, Date>();\n private timer?: NodeJS.Timeout;\n private running = false;\n private readonly pollInterval: number;\n private readonly batchDuration: number;\n private readonly clock: () => Date;\n\n constructor(private readonly options: RegeneratorOptions) {\n this.contexts = new Map(\n options.contexts.map((ctx) => [ctx.id, ctx])\n );\n this.pollInterval = options.pollIntervalMs ?? DEFAULT_POLL_INTERVAL;\n this.batchDuration = options.batchDurationMs ?? DEFAULT_BATCH_DURATION;\n this.clock = options.clock ?? (() => new Date());\n if (this.options.rules.length === 0) {\n throw new Error('RegeneratorService requires at least one rule');\n }\n }\n\n start() {\n if (this.running) return;\n this.running = true;\n void this.tick();\n this.timer = setInterval(() => {\n void this.tick();\n }, this.pollInterval);\n }\n\n stop() {\n if (!this.running) return;\n this.running = false;\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = undefined;\n }\n }\n\n async runOnce(): Promise<void> {\n await this.tick();\n }\n\n private async tick(): Promise<void> {\n const now = this.clock();\n const sinceDefault = new Date(now.getTime() - this.batchDuration);\n for (const context of this.contexts.values()) {\n const last = this.lastPoll.get(context.id) ?? sinceDefault;\n await this.evaluateContext(context, last, now);\n this.lastPoll.set(context.id, now);\n }\n }\n\n private async evaluateContext(\n context: RegenerationContext,\n since: Date,\n until: Date\n ): Promise<void> {\n const signals = await this.collectSignals(context, since, until);\n if (signals.length === 0) return;\n\n for (const rule of this.options.rules) {\n let proposals: SpecChangeProposal[] = [];\n try {\n proposals = await rule.evaluate(context, signals);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(\n `[regenerator] rule ${rule.id} failed`,\n error instanceof Error ? error : new Error(String(error))\n );\n continue;\n }\n await this.flushProposals(context, proposals);\n }\n }\n\n private async collectSignals(\n context: RegenerationContext,\n since: Date,\n until: Date\n ): Promise<RegeneratorSignal[]> {\n const envelopes: RegeneratorSignal[] = [];\n const { adapters } = this.options;\n if (adapters.telemetry) {\n const telemetrySignals = await adapters.telemetry.pollTelemetry(\n context,\n since,\n until\n );\n envelopes.push(\n ...telemetrySignals.map((signal) =>\n telemetryToEnvelope(context.id, signal, this.clock)\n )\n );\n }\n if (adapters.errors) {\n const errorSignals = await adapters.errors.pollErrors(\n context,\n since,\n until\n );\n envelopes.push(\n ...errorSignals.map((signal) =>\n errorToEnvelope(context.id, signal, this.clock)\n )\n );\n }\n if (adapters.behavior) {\n const behaviorSignals = await adapters.behavior.pollBehavior(\n context,\n since,\n until\n );\n envelopes.push(\n ...behaviorSignals.map((signal) =>\n behaviorToEnvelope(context.id, signal, this.clock)\n )\n );\n }\n return envelopes;\n }\n\n private async flushProposals(\n context: RegenerationContext,\n proposals: SpecChangeProposal[]\n ): Promise<void> {\n for (const proposal of proposals) {\n if (proposal.signalIds.length === 0) continue;\n await this.options.sink.submit(context, proposal);\n // allow event loop to breathe when large volumes\n if (proposals.length > 10) {\n await delay(0);\n }\n }\n }\n}\n\n\n\n\n\n\n"],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lssm/lib.bus",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.3",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "bun build:bundle && bun build:types",
|
|
6
6
|
"build:bundle": "tsdown",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"typescript": "^5.9.3"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@lssm/lib.schema": "^1.7.
|
|
23
|
-
"@lssm/lib.contracts": "^1.7.
|
|
22
|
+
"@lssm/lib.schema": "^1.7.3",
|
|
23
|
+
"@lssm/lib.contracts": "^1.7.3"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"elysia": "^1.4.11",
|
|
@@ -36,10 +36,19 @@
|
|
|
36
36
|
"README.md"
|
|
37
37
|
],
|
|
38
38
|
"exports": {
|
|
39
|
-
".": "./
|
|
40
|
-
"./eventBus": "./
|
|
41
|
-
"./inMemoryBus": "./
|
|
42
|
-
"./subscriber": "./
|
|
39
|
+
".": "./src/index.ts",
|
|
40
|
+
"./eventBus": "./src/eventBus.ts",
|
|
41
|
+
"./inMemoryBus": "./src/inMemoryBus.ts",
|
|
42
|
+
"./subscriber": "./src/subscriber.ts",
|
|
43
43
|
"./*": "./*"
|
|
44
|
+
},
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"exports": {
|
|
47
|
+
".": "./dist/index.js",
|
|
48
|
+
"./eventBus": "./dist/eventBus.js",
|
|
49
|
+
"./inMemoryBus": "./dist/inMemoryBus.js",
|
|
50
|
+
"./subscriber": "./dist/subscriber.js",
|
|
51
|
+
"./*": "./*"
|
|
52
|
+
}
|
|
44
53
|
}
|
|
45
54
|
}
|