feat: preserve nested source projects across desktop and REST

This commit is contained in:
2026-09-06 00:17:20 +03:00
parent d364d3c058
commit 4e8575bd11
32 changed files with 4283 additions and 417 deletions
+41
View File
@@ -0,0 +1,41 @@
// Operational Analysis describes the need without choosing a technical solution.
oa_actor vessel "Vessel in distress" id "00000000-0000-4000-8000-000000000101" {
description "The vessel's crew needs to communicate its position and obtain assistance.";
}
oa_entity rescue_team "Rescue coordination" id "00000000-0000-4000-8000-000000000102" {
description "The coordination team assesses the report and decides on a response.";
}
// This is work decomposition. It does not assign either activity to a participant.
oa_activity respond "Respond to distress" id "00000000-0000-4000-8000-000000000103" {
// Keep the crew's reporting responsibility visible when decomposing the need.
oa_activity report_distress "Report distress" id "00000000-0000-4000-8000-000000000104" {
description "Provide the vessel's situation and last known position.";
}
oa_activity assess_incident "Assess incident" id "00000000-0000-4000-8000-000000000105" {
description "Decide which assistance is needed using the received report.";
}
}
oa_capability protect_life "Protect life at sea" id "00000000-0000-4000-8000-000000000106" {}
oa_exchange_item oa_report_data "Distress report" id "00000000-0000-4000-8000-000000000107" {
kind Information;
oa_data_field reported_latitude "Reported latitude" id "00000000-0000-4000-8000-000000000108" {
type_ref Real;
unit "degrees north";
}
}
// Allocation remains explicit even though the saved architecture view nests work.
allocation crew_reports "Crew reports distress" id "00000000-0000-4000-8000-000000000201" {
source @vessel; target @report_distress;
}
allocation team_assesses "Team assesses incident" id "00000000-0000-4000-8000-000000000202" {
source @rescue_team; target @assess_incident;
}
interaction distress_signal "Distress signal" id "00000000-0000-4000-8000-000000000203" {
source @report_distress; target @assess_incident; items [@oa_report_data];
}
capability_involvement operational_contribution "Assessment supports rescue" id "00000000-0000-4000-8000-000000000204" {
source @assess_incident; target @protect_life;
}
+11
View File
@@ -0,0 +1,11 @@
arcadia 3;
project distress_response "Distress response — nested source project" id "00000000-0000-4000-8000-000000000001" {
description "A small OA/SA model for learning source ownership, typed ports and reviewed graphical edits. Open this file. Start with the saved allocation views, then browse Handle distress reports and use Source for selection.";
// Includes organize documents; aliases are shared by the whole project.
include "oa.arcadia";
include "sa/participants.arcadia";
include "sa/reporting.arcadia";
include "sa/assurance.arcadia";
include "views.arcadia";
}
@@ -0,0 +1,11 @@
// A separate functional aggregate provides a cross-file reparenting example.
// Move Assess report here through Properties, then inspect both source files.
sa_function assure_response "Assure response quality" id "00000000-0000-4000-8000-000000000411" {
description "Review the service response independently of report transport.";
sa_function review_response "Review response" id "00000000-0000-4000-8000-000000000412" {
description "Check that a coordinator can review the received information.";
}
}
allocation system_reviews "System supports response review" id "00000000-0000-4000-8000-000000000504" {
source @rescue_system; target @review_response;
}
@@ -0,0 +1,22 @@
// System Analysis identifies one system of interest and its external participant.
sa_system rescue_system "Rescue coordination system" id "00000000-0000-4000-8000-000000000301" {
description "The selected system receives reports and supports the coordinator.";
// A component port belongs to its participant, not to an allocated function.
sa_port reporting_input "Reporting input" id "00000000-0000-4000-8000-000000000303" {
contract { Component { kind Flow; orientation In; }; };
}
}
sa_actor vessel_service "Vessel communication service" id "00000000-0000-4000-8000-000000000302" {
description "An external service sends distress information across the system boundary.";
sa_port reporting_output "Reporting output" id "00000000-0000-4000-8000-000000000304" {
contract { Component { kind Flow; orientation Out; }; };
}
}
// The boundary exchange connects actual participant ports. Function realization
// is declared separately in reporting.arcadia using port/exchange allocations.
boundary_exchange radio_reporting "Radio reporting" id "00000000-0000-4000-8000-000000000501" {
source @reporting_output; target @reporting_input;
oriented true;
items [@sa_report_data];
}
@@ -0,0 +1,52 @@
// Functional containment is independent of the participant allocations below.
sa_function handle_reports "Handle distress reports" id "00000000-0000-4000-8000-000000000401" {
description "A functional decomposition of reporting and assessment.";
sa_function transmit_report "Transmit report" id "00000000-0000-4000-8000-000000000402" {
description "Encode and send the vessel's distress report.";
sa_port report_out "Report output" id "00000000-0000-4000-8000-000000000404" {
contract { FunctionOutput { outgoing_items [@sa_report_data]; }; };
}
}
// Assessment rationale travels with this declaration when it is reparented.
sa_function assess_report "Assess report" id "00000000-0000-4000-8000-000000000403" {
description "Validate the received report and present it to the coordinator.";
sa_port report_in "Report input" id "00000000-0000-4000-8000-000000000405" {
contract { FunctionInput { incoming_items [@sa_report_data]; }; };
}
} // Assessment remains performed by rescue_system after a hierarchy edit.
}
// This group comment stays in this file; it is not attached to the function above.
sa_exchange_item sa_report_data "Digital distress report" id "00000000-0000-4000-8000-000000000406" {
kind Information;
sa_data_field encoded_latitude "Encoded latitude" id "00000000-0000-4000-8000-000000000407" {
type_ref Real;
unit "degrees north";
}
}
sa_capability coordinate_response "Coordinate distress response" id "00000000-0000-4000-8000-000000000408" {}
allocation vessel_transmits "Vessel service transmits" id "00000000-0000-4000-8000-000000000502" {
source @vessel_service; target @transmit_report;
}
allocation system_assesses "System assesses report" id "00000000-0000-4000-8000-000000000503" {
source @rescue_system; target @assess_report;
}
functional_exchange validated_report "Validated report" id "00000000-0000-4000-8000-000000000505" {
source @transmit_report; source_port @report_out;
target @assess_report; target_port @report_in;
items [@sa_report_data];
}
port_allocation output_realization "Reporting output realizes function output" id "00000000-0000-4000-8000-000000000506" {
source @reporting_output; target @report_out;
}
port_allocation input_realization "Reporting input realizes function input" id "00000000-0000-4000-8000-000000000507" {
source @reporting_input; target @report_in;
}
exchange_allocation report_transport "Radio reporting carries the function exchange" id "00000000-0000-4000-8000-000000000508" {
source @radio_reporting; target @validated_report;
}
capability_involvement system_contribution "Assessment supports coordination" id "00000000-0000-4000-8000-000000000509" {
source @assess_report; target @coordinate_response;
}
+71
View File
@@ -0,0 +1,71 @@
// Views are projections. Their visual allocation containers do not set parent.
diagram oa_architecture "OA — participants and activities" id "00000000-0000-4000-8000-000000000601" {
description "The crew reports; the coordination team assesses. Containment of work is shown separately in the Model explorer.";
layer Oa; projection Allocation;
}
node oa_vessel_view id "00000000-0000-4000-8000-000000000701" {
diagram @oa_architecture; element @vessel;
position { x 60; y 60; }; size { width 272; height 210; };
}
node oa_team_view id "00000000-0000-4000-8000-000000000702" {
diagram @oa_architecture; element @rescue_team;
position { x 540; y 60; }; size { width 300; height 210; };
}
node oa_report_view id "00000000-0000-4000-8000-000000000703" {
diagram @oa_architecture; element @report_distress;
position { x 84; y 128; }; size { width 224; height 104; };
}
node oa_assessment_view id "00000000-0000-4000-8000-000000000704" {
diagram @oa_architecture; element @assess_incident;
position { x 564; y 128; }; size { width 252; height 104; };
}
diagram sa_architecture "SA — system boundary and functions" id "00000000-0000-4000-8000-000000000602" {
description "Flow component ports define the boundary; separate function ports carry the functional exchange.";
layer Sa; projection Allocation;
}
node sa_vessel_view id "00000000-0000-4000-8000-000000000711" {
diagram @sa_architecture; element @vessel_service;
position { x 60; y 60; }; size { width 272; height 220; };
}
node sa_system_view id "00000000-0000-4000-8000-000000000712" {
diagram @sa_architecture; element @rescue_system;
position { x 540; y 60; }; size { width 300; height 340; };
}
node sa_transmission_view id "00000000-0000-4000-8000-000000000713" {
diagram @sa_architecture; element @transmit_report;
position { x 84; y 128; }; size { width 224; height 104; };
}
node sa_assessment_view id "00000000-0000-4000-8000-000000000714" {
diagram @sa_architecture; element @assess_report;
position { x 564; y 128; }; size { width 252; height 104; };
}
node sa_review_view id "00000000-0000-4000-8000-000000000715" {
diagram @sa_architecture; element @review_response;
position { x 564; y 272; }; size { width 252; height 104; };
}
diagram sa_decomposition "SA — functional containment" id "00000000-0000-4000-8000-000000000603" {
description "These containers represent real function parents. Compare them with the explicit allocations in the architecture view.";
layer Sa; projection FunctionalDataflow;
}
node handling_view id "00000000-0000-4000-8000-000000000721" {
diagram @sa_decomposition; element @handle_reports;
position { x 40; y 60; }; size { width 500; height 230; };
}
node transmission_view id "00000000-0000-4000-8000-000000000722" {
diagram @sa_decomposition; element @transmit_report;
position { x 64; y 136; }; size { width 204; height 104; };
}
node assessment_view id "00000000-0000-4000-8000-000000000723" {
diagram @sa_decomposition; element @assess_report;
position { x 310; y 136; }; size { width 204; height 104; };
}
node assurance_view id "00000000-0000-4000-8000-000000000724" {
diagram @sa_decomposition; element @assure_response;
position { x 590; y 60; }; size { width 300; height 230; };
}
node review_view id "00000000-0000-4000-8000-000000000725" {
diagram @sa_decomposition; element @review_response;
position { x 614; y 136; }; size { width 252; height 104; };
}