Files
dbis_core/scripts/seed-gateway-capability.ts
defiQUG 6ebf71dda8 feat: SolaceNet gateway rails, IRU marketplace hardening, and docs
- Gateway adapter registry, rails routes, optional SOLACENET_GATEWAY_RAILS_ENFORCE; HTTP integration tests.
- IRU marketplace: rate limits, public routes, notifications/SMTP env docs; marketplace UI constants and flows.
- Quantum proxy legacy protocol types; debank/tezos/GSDS touch-ups; .env.example operator notes.
- SolaceNet doc set (gaps, runbooks, telecom schema example).

Tests: npm run test:iru-marketplace, npm run test:gateway (pass).
Note: full-repo tsc still reports unrelated legacy errors outside this change set.
Made-with: Cursor
2026-04-07 23:21:55 -07:00

59 lines
2.0 KiB
TypeScript

import { capabilityRegistryService } from '@/core/solacenet/registry/capability-registry.service';
import { logger } from '@/infrastructure/monitoring/logger';
async function main() {
try {
logger.info('Registering DBIS Gateway Microservices capability...');
await capabilityRegistryService.createCapability({
capabilityId: 'gateway-microservices',
name: 'DBIS Gateway Microservices',
version: '1.0.0',
description:
'SolaceNet-maintained gateway rail adapters and HTTP surface; many connectors are scaffolds until production APIs (see marketplace copy + PROTOCOL_GAPS_CHECKLIST). Governance: docs/solacenet/RAIL_AND_PROTOCOL_GOVERNANCE.md',
defaultState: 'enabled' as any,
dependencies: ['ledger', 'iso20022', 'reconciliation'].filter(Boolean),
});
const subCapabilities = [
{ capabilityId: 'gateway-edge', name: 'Gateway Edge Plane' },
{ capabilityId: 'gateway-control', name: 'Gateway Control Plane' },
{ capabilityId: 'gateway-operations', name: 'Gateway Operations Plane' },
{ capabilityId: 'gateway-adapters', name: 'Gateway Adapter Plane' },
];
for (const sub of subCapabilities) {
try {
await capabilityRegistryService.createCapability({
capabilityId: sub.capabilityId,
name: sub.name,
version: '1.0.0',
description: sub.name,
defaultState: 'enabled' as any,
dependencies: ['gateway-microservices'],
});
} catch (err: any) {
if (err?.message?.includes('already exists')) {
logger.info(`Capability ${sub.capabilityId} already exists, skipping`);
} else {
throw err;
}
}
}
logger.info('Gateway capabilities registered.');
} catch (error: any) {
if (error?.message?.includes('already exists')) {
logger.info('Capability gateway-microservices already exists, skipping');
} else {
logger.error('Failed to register gateway capability', { error: error?.message || error });
process.exitCode = 1;
}
}
}
if (require.main === module) {
// eslint-disable-next-line @typescript-eslint/no-floating-promises
main();
}