REPOSITORY
via/asw-service-platform Private
[참조 MVP] A-SW 공유·협업 서비스 플랫폼 — 컴포넌트 릴리스의 제출·검증·승인·공개 생명주기를 집행하는 플랫폼 코어입니다.
https://git.agrithing.ai/via/asw-service-platform.git ab9e3ed feat: adopt typescript SERVICE SDV reference implementation
91dc795 ci: add language-specific static and dynamic analysis
f1bc631 docs: define component scope and interface contract
0033c98 docs: register platform manifest
edea914 ci: verify contract tests and evidence package
72991ee feat: add executable reference MVP
0dbe22f docs: define component scope and interface contract
2 items · main
·/ src/component.ts
typescript · 787 B · b789698 Download
const transitions = new Map([['DRAFT:submit:component_owner', 'SUBMITTED'], ['SUBMITTED:verify:validator', 'VERIFIED'], ['VERIFIED:approve:integration_approver', 'APPROVED'], ['APPROVED:publish:release_manager', 'PUBLISHED']]);export function transition(input) { const current = String(input.current_state).toUpperCase(); if (['verify', 'approve', 'publish'].includes(input.action) && Number(input.evidence_count ?? 0) < 1) return { accepted: false, state: current, reason: 'evidence_required' }; const key = [current, input.action, input.actor_role].join(':'); const state = transitions.get(key); return state ? { accepted: true, previous_state: current, state, audit_event: [key, state].join(':') } : { accepted: false, state: current, reason: 'transition_not_allowed' };}